feat(api): move title files on root change
Changing a movie's or series' root previously rewrote root_id and left the files behind, so the §7.4 layout stopped describing the disk and the root's policy applied to a library the files were not in. Series had no root control at all. All roots share one ZFS dataset, so the move is a rename of the title folder into the new root, never a copy — hardlinks and the seeding torrent survive it (§7.3). Disk first, row second: a destination that already holds the folder is a 409, a failed rename leaves the row unchanged, and a title with nothing on disk moves with no filesystem work. media_files rows are rewritten in the same transaction as the root_id, and a successful move triggers the §7.5 Jellyfin refresh. Issue #228 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"db_name": "SQLite",
|
||||
"query": "SELECT path AS \"path!: String\" FROM roots WHERE id = ?",
|
||||
"describe": {
|
||||
"columns": [
|
||||
{
|
||||
"name": "path!: String",
|
||||
"ordinal": 0,
|
||||
"type_info": "Text",
|
||||
"origin": {
|
||||
"Table": {
|
||||
"table": "roots",
|
||||
"name": "path"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"parameters": {
|
||||
"Right": 1
|
||||
},
|
||||
"nullable": [
|
||||
false
|
||||
]
|
||||
},
|
||||
"hash": "6ef45d7e6fc113b578fab91148f9ab5455e7a2d06fc86291e2c6c9696fd08953"
|
||||
}
|
||||
Reference in New Issue
Block a user