29c31beceb
DESIGN.md §15 as amended: a language is satisfied by exactly one sidecar, and no filename segment distinguishes forced from plain from SDH. A unique index over sidecar rows says so; embedded rows keep their own key, since several tracks for one language can legitimately coexist inside a video. Existing databases may hold a duplicate from a manual grab that beat the API's path check, so the migration resolves them rather than failing: a real subtitle beats a machine translation, and of two of the same kind the newest wins. The files stay on disk for the manual delete to clean up. `record_file` no longer swallows every conflict — only the two that mean "arr already knows this file".
27 lines
599 B
JSON
27 lines
599 B
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "SELECT path AS \"path!: String\" FROM subtitle_files\n WHERE media_file_id = ? AND language = ? AND path IS NOT NULL",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "path!: String",
|
|
"ordinal": 0,
|
|
"type_info": "Text",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "subtitle_files",
|
|
"name": "path"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 2
|
|
},
|
|
"nullable": [
|
|
true
|
|
]
|
|
},
|
|
"hash": "e17b71f67d8b79c54d2d6f32d5e4197d77faac1763b360e8e609b0b9ba5820f1"
|
|
}
|