c3bd009442
Recording a subtitle is idempotent on both keys the schema carries: the sidecar path, and the language an embedded track satisfies, so a second probe or a re-import converges instead of duplicating. Attempts are upserted per (media file, language); the work list is every language that is not satisfied, newest import first, which is the order §15 wants the daily allowance spent in.
27 lines
765 B
JSON
27 lines
765 B
JSON
{
|
|
"db_name": "SQLite",
|
|
"query": "INSERT INTO subtitle_files\n (media_file_id, language, origin, provider, candidate_id, engine,\n forced, sdh, synced, sync_rejected, path)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\n ON CONFLICT DO NOTHING\n RETURNING id AS \"id!: i64\"",
|
|
"describe": {
|
|
"columns": [
|
|
{
|
|
"name": "id!: i64",
|
|
"ordinal": 0,
|
|
"type_info": "Integer",
|
|
"origin": {
|
|
"Table": {
|
|
"table": "subtitle_files",
|
|
"name": "id"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"parameters": {
|
|
"Right": 11
|
|
},
|
|
"nullable": [
|
|
null
|
|
]
|
|
},
|
|
"hash": "6eaeee584dc98b28b9605faabab0eecf7839b7755c956731617b475921481701"
|
|
}
|