mkv2cast.history
History database for mkv2cast conversions.
Tracks all conversions with timestamps, durations, and results. Uses SQLite as primary storage with JSONL fallback if SQLite is unavailable.
Classes
|
History storage with SQLite primary and JSONL text fallback. |
|
Track in-flight conversions and safely persist history updates. |
- class mkv2cast.history.HistoryDB(state_dir: Path)[source]
Bases:
objectHistory storage with SQLite primary and JSONL text fallback.
- record_start(input_path: Path, backend: str, input_size: int = 0) int[source]
Record conversion start, return entry ID.
- class mkv2cast.history.HistoryRecorder(history_db: HistoryDB | None, backend: str)[source]
Bases:
objectTrack in-flight conversions and safely persist history updates.
- start(input_path: Path, input_size: int = 0) int[source]
Record a conversion start and track it for later completion.
- finish(input_path: Path, status: str, output_path: Path | None = None, encode_time: float = 0, integrity_time: float = 0, output_size: int = 0, duration_ms: int = 0, error_msg: str | None = None) None[source]
Record completion for a tracked conversion.