0.2.68
This commit is contained in:
@@ -740,3 +740,29 @@ CREATE TABLE IF NOT EXISTS credits_markers (
|
||||
CREATE INDEX IF NOT EXISTS credits_markers_season_idx
|
||||
ON credits_markers (series_id, season_number, confidence DESC)
|
||||
WHERE series_id <> '';
|
||||
|
||||
-- Operational history for credits scans. This is deliberately separate from queue state:
|
||||
-- the queue remains disposable, while completed attempts explain repeated candidates and
|
||||
-- provide the cooldown that stops an inconclusive episode being scanned every ten minutes.
|
||||
CREATE TABLE IF NOT EXISTS credits_scan_history (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
item_id TEXT NOT NULL,
|
||||
series_id TEXT NOT NULL DEFAULT '',
|
||||
season_number INT NOT NULL DEFAULT 0,
|
||||
episode_number INT NOT NULL DEFAULT 0,
|
||||
reason TEXT NOT NULL DEFAULT '',
|
||||
priority INT NOT NULL DEFAULT 0,
|
||||
outcome TEXT NOT NULL,
|
||||
marker_ms BIGINT NOT NULL DEFAULT 0,
|
||||
confidence REAL NOT NULL DEFAULT 0,
|
||||
method TEXT NOT NULL DEFAULT '',
|
||||
frames_sampled INT NOT NULL DEFAULT 0,
|
||||
error_text TEXT NOT NULL DEFAULT '',
|
||||
started_at TIMESTAMPTZ NOT NULL,
|
||||
finished_at TIMESTAMPTZ NOT NULL,
|
||||
duration_ms BIGINT NOT NULL DEFAULT 0
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS credits_scan_history_item_time_idx
|
||||
ON credits_scan_history (item_id, finished_at DESC);
|
||||
CREATE INDEX IF NOT EXISTS credits_scan_history_time_idx
|
||||
ON credits_scan_history (finished_at DESC);
|
||||
|
||||
Reference in New Issue
Block a user