mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
Jellyfin doesn't read track numbers from Vinyl records correctly e.g. A1, A2 & B1 etc #2491
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#2491
Loading…
Add table
Add a link
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?
Originally created by @CluelessTechnologist on GitHub (Jan 9, 2021).
Description of issue
So the usual way of numbering tracks on digital music is obviously:
or
But I sometimes listen to Vinyl records that have been digitized and they sometimes use track number like these:
Now this is no problem in most media players, for example Plex has the tracks in the correct order. But in Jellyfin the order is by song name instead. My guess is that jellyfin don't recongize the track numbers correctly and therefore falls back to sorting by song name instead.
Media Info of the file
Logs
N/A
FFmpeg Logs
N/A
Stats for Nerds Screenshots
N/A
Server System (please complete the following information):
Client System (please complete the following information):
@CluelessTechnologist commented on GitHub (Jun 13, 2021):
Update:
Seems like this is fixed in 10.8.0. After a friend was unable to reproduce the error I checked out the latest code and to my surprise the tracks were in the correct order. (it now seems to sort tracks by file name if unable to read tags).
I guess the best solution would be to get Jellyfin to understand and sort tags that contains alphabetic characters. But I'm quite happy with the current solution as well.
@anthonylavado Can we find out what commit fixed this issue?
@anthonylavado commented on GitHub (Jun 14, 2021):
@CluelessTechnologist I'll check and let you know.
@CluelessTechnologist commented on GitHub (Jul 5, 2021):
Did you find it?
@CluelessTechnologist commented on GitHub (Nov 25, 2021):
@anthonylavado
So I downloaded the docker image with the
10.8.0-alpha2tag, and the problem is still there.Why? I don't understand it was working on 10.8.0 master in June.
Am I missing something? Do you need some add-on to be able to read the ID3 tags or something?
@srcrist commented on GitHub (Oct 19, 2023):
Can anyone confirm that this issue still exists in 10.8.11? Is this still a regression?
@CluelessTechnologist commented on GitHub (Oct 20, 2023):
Still an issue on my setup:
I'm using the docker image
ghcr.io/linuxserver/jellyfin:latestI'd be happy to supply example FLAC files for debugging.
We also have a open PR that should fix the issue: https://github.com/jellyfin/jellyfin/pull/9331
@srcrist commented on GitHub (Oct 20, 2023):
Great news on both counts. I'm going to move this issue to "in progress" then.
@soundsbyjs commented on GitHub (Jun 16, 2024):
Could not reproduce on the Arch Linux native version, no Docker. Have several vinyls on file, labeled as such, and all of them scanned as normal.
@CluelessTechnologist commented on GitHub (Jun 26, 2024):
Thanks for the information! I will try on Arch (10.9.7-1 as of 20240626) and report back!
@CluelessTechnologist commented on GitHub (Jun 27, 2024):
@soundsbyjs I just tried a clean Arch install and Jellyfin still doesn't read track numbers correct for me. Would you mind sharing mediainfo on one of your tracks? Also, what settings did you select when adding the music library? I just used the default now (MusicBrainz).
I'm idling in IRC if you have time to chat.
@soundsbyjs commented on GitHub (Jun 29, 2024):
Yeah, I'll ping you. I'm aqua_lily on irc :)
Edit: everything seems to be in order. (this album is amazing btw)
@CluelessTechnologist commented on GitHub (Jul 2, 2024):
I've been idling in #lilyspad for the last few days, haven't seen anyone there though :)
Compare this to my track:
The issue is in the "Track name/Position". Jellyfin cannot parse
A1. Your track1is purely numerical and thus Jellyfin can parse it and sort the album in the correct order.My suggestion for a fix would to either parse tarcks that contains characters other than numericals. (don't know how complicated that would be) or have Jellyfin sort by file names as a backup if it can't parse the track name/Position.
Coincidentally, you have the opposite naming scheme; filename starts with
A1and Track name/Position starts with1. So it may not be that far fetched that some user might have both filename & Track name/Position starting withA1and thus my suggested solution sorting by filename wouldn't help.I hope some developer can chime in here and offer some insight into why this is happening and how we can fix it.
@CluelessTechnologist commented on GitHub (Dec 28, 2024):
I have been doing some digging during the holidays. I'm pretty sure the issue lies in the way Jellyfin handles the track number tag. If I am correct in my research this is how Jellyfin generates the Track number for each track:
ffprobereads the tags from the music fileMediaBrowser.MediaEncoding/Probing/MediaFormatInfo.csorMediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs, I'm not sure which one TBHMediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cshandles the parsing of the data@Maxr1998 maybe you can help me out in finding the best approach to fix my issue. I saw that you did a refactor of
ProbeResultNormalizerin commit11a5551.I have no idea what the best approach for a fix would be, maybe change
GetDictionaryTrackOrDiscNumberto parse alphabetical characters as well and then convert it to numerical since the DB only accepts int, or change indexNumber to a string instead and sort in alphabetical order.This is the method I believe is the culprit of my issue:
As you can see if the track data is not in the form of '1', or '1/3', the result will be null.
@gnattu commented on GitHub (Dec 28, 2024):
The track number field is expected to be numeric, and unfortunately, you cannot force a non-numeric value into that field. This would break numerous things even if you managed to modify the parser and the db is only the most obvious one. Moreover, converting this to a number is impractical because the parser doesn’t always know the number of tracks per side, making it impossible to convert the B-side tracks as well.
The current schema (and most of the audio tagging system) is designed for CD and the CD does not have two sides and adding support for such kind of media (sided recording media) is not as trivial as many may think of. This is a whole new type of music file the most proper implementation would require changes to both the server and the clients because almost all clients also assumes the tracks are not sided.
A hacks way to do this that does not require lots of work is to play with the disc number. For sided media, we store the disc number as (2-disc number) * side(A as 1 and B as 2). So that we will have doubled disc numbers where the odd discs are side As and eve discs are side Bs. This is easier as we only need to modify the parser.
@Shadowghost commented on GitHub (Dec 28, 2024):
Wouldn*t it work to just treat A is Disc 1 and B is disc 2?
@gnattu commented on GitHub (Dec 28, 2024):
No because you can have a series of discs with double sided tracks
@CluelessTechnologist commented on GitHub (Dec 29, 2024):
Yes, this makes sense, I was thinking about it wrongly. Jellyfin works differently from a music player which is what I was thinking of. In foobar for example the sorting works, but that was probably not hard for them to implement since you add all the files to a playlist and then sort them in alphabetical order.
As you point out this is not the case for the jellyfin parser which reads each track separately and thus has no knowledge of how the entire record is structured.
The only way to fix this would be to allow track numbers to be strings in the db and then have the music player sort the files correctly. But I gather that's a huge task since it affects so much.
As for the hacks way of doing things where you thinking of something like this:
Disc 1, Side A → Disc Number = 1
Disc 1, Side B → Disc Number = 2
Disc 2, Side A → Disc Number = 3
Disc 2, Side B → Disc Number = 4
etc etc?
@CluelessTechnologist commented on GitHub (Jun 28, 2025):
Hey, @gnattu After your work on #13521, do you mind explaining what the next step is? What other parts of the codebase need to be updated in order to fully support text-based track numbers like "A1" or "B2"? Would be great to understand what’s left to make this work end-to-end.
@citrudevmobile commented on GitHub (Nov 26, 2025):
Summary: Modern FLAC Files & Vinyl Track Number Support
Current State of FLAC Files
In modern digital music libraries, FLAC files are universally used as individual track containers - each file stores exactly one song with complete metadata. This is the standard practice for both digital releases and digitized vinyl recordings.
Why This is the Right Approach
The changes in PR #15066 target the metadata parsing layer, which is precisely where this functionality belongs because:
How the Feature Works
TRACKNAME/POSITION,TRACKTOTAL,TRACK) for vinyl formatsKey Insight
This solution respects Jellyfin's architecture while solving the real-world problem: vinyl rips already exist as individual FLAC files with vinyl-style track numbers in their metadata. By parsing these at the individual file level, we enable proper organization without requiring fundamental schema changes or client modifications.
The approach in PR #15066 is conservative, targeted, and aligns with how digital music libraries actually work today.