A stack's later parts do not inherit the owner's mixed-folder flag #205
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?
A stack's later parts are filed with
in_mixed_folder: falseregardless of where the stack sits. Upstream copies the owner's flag.Both sides
Ours:
crates/ephyra-app/src/scan/tree/movies.rs:286hardcodes it.Upstream,
upstream/MediaBrowser.Controller/Entities/Video.cs:691:— the owner's flag, which
LibraryManagerset fromisInMixedFolder = resolverResult.Count > 1 || parent.IsTopParent.What it costs
/m/Concert - cd1.mp4and/m/Concert - cd2.mp4at a library root: the owner ismixed=true(the root is a top parent), and upstream gives the parttrueas well. We give the partfalse.IsInMixedFolderis whatBeforeMetadataRefreshconsults before reading a year off the folder above (BaseItem.cs), so a wrong flag on a part is a wrong name or year on it.Pre-existing rather than introduced by #194, but
7e3804f5rewrotepart_nodesand added a stack to the answer key one directory deep (Stacked/). Putting that case at the library root instead would have caught it, which is the cheap way to pin the fix.Found reviewing #194.
Landed on
main:2a5a91ec,e0653be6,085fdd2a,f06fbc21,f66e2ab8.A stack's later part now takes its owner's
in_mixed_folder(crates/ephyra-app/src/scan/tree/movies.rs,part_nodes), asVideo.cs:691does. Upstream's answer for a stack at the library root, from the regenerated key:Recital - cd2.mp4is aVideo, parentless,in_mixed_folder: true.tests/scan.rspins both the root case and the one-directory-down contrast.Verified
movies/Recital - cd1/cd2), a film alone in a disc folder (movies/I, Robot (2004)/CD 01/…), andmusicvideos/Versions/renamed toAnthem/so its files really start with the folder name.gen-library-kindswas regenerated from a live upstream container and everylibrary_kindstest agrees with it.filed_in_orderwas probed against two levels of ownership, a diamond, a cycle and an owner outside the batch. Mutation-checked: each change reverted alone turns its own tests red.Anthem,CD 01 · 2004,ConcertandLoose Film · 1999— no secondAnthemfrom the owned cut and no stack part — which is the same predicate upstream hides them on (BaseItemRepository.TranslateQuery.cs:810-814).On an existing install, an incremental scan decides a row is unchanged from its file (path, mtime, size), so rows filed before this change keep their old value until the file is touched or a full refresh runs. New rows are right immediately.