An item keeps a parent that has stopped being a row #34
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
An item a rescan leaves alone keeps the
ParentIdit was filed with. When thefolder that column names stops being a row, the item goes with it and comes
back on the next scan.
Reproduced with a film dropped directly into a folder that until then only held
other folders:
Bstops keeping a row of its own — the movies resolver files a folder onlywhile it holds no film — so
remove_missingdeletes it, andFK_BaseItems_BaseItems_ParentId ON DELETE CASCADEtakesFilm 1with it.Film 1is unchanged, so nothing rewrote itsParentIdto the folder it nowbelongs to.
The ancestor chain of an unchanged row is compared against what is on record
and filed again when it differs (
crates/jellyfin-app/src/scan/run.rs). ItsParentIdis not: that column is only written when the row is. Whatever thefix, it wants a test beside the ones in
crates/jellyfin-app/tests/scan_incremental.rs.The item does come back, so this is a library that is briefly wrong rather than
one that stays wrong — unlike [#33].
Fixed and merged.
What a row hangs under is on record now —
Knowncarries its parent — and apass compares it by id rather than by path, so a folder that stopped being a row
and a folder whose id changed are both caught. The row is filed again under the
folder it now belongs to, rather than being taken with the old one by the
cascade and coming back on the next scan.
Comparing by id matters where two libraries file one path as two kinds; the
path alone would not tell them apart.
Settles: the scenario in the issue writes the row once and then nothing on every
later pass, including the variant where the film lands two levels up.