Track number is parsed from the first ' - ' in the filename #5
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?
track_node(crates/jellyfin-app/src/scan/tree.rs:376) takesstem.split_once(" - ")and parses the first segment as the index. Realfilenames put the artist there:
1 of our 2 340 audio rows has an
IndexNumber; upstream reads thetracktag and has 4 452. Without it tracks cannot sort into album order.
Reading the tag would make this fallback mostly moot, but the fallback is still
wrong for any library without tags.
Found by scanning
/mnt/media(285 movies, 289 shows, 74 music artists —~13 000 media files on a CIFS mount) with both this server and upstream
Jellyfin at the pinned commit, remote metadata and image fetchers disabled on
upstream so both were reading files only. Upstream was given the same mount
path so
MD5(UTF-16LE(path))agrees and rows compare directly.Fixed in
5c17bf8and1c301b5.Upstream never reads a track's number off its filename — only the
tracktaggives one, and 437 of this library's tracks have none at all. The decisive case
is
12 - Daft Punk - Elhea.mp3, which upstream stored asIndexNumber = 0: noreader of that filename could produce it.
So the resolution now numbers nothing and names a track after its whole file,
and the probe fills both. The same
" - "split had been taking the name apartas well, where upstream keeps the stem until a
titletag replaces it.Review found the sort name had been wrong for as long as it existed: a track
sorted by number and name where upstream puts the disc in front of both
(3530 tracks here carry one), and an unnumbered track sorted by a normalised
name where upstream leaves it exactly as written (437 tracks).
Every column of a probed track is now diffed against upstream's snapshot rather
than the tag columns alone.