Jellyfin doesn't read track numbers from Vinyl records correctly e.g. A1, A2 & B1 etc #2491

Open
opened 2025-12-21 20:41:01 +01:00 by backuprepo · 19 comments
Owner

Originally created by @CluelessTechnologist on GitHub (Jan 9, 2021).

Description of issue

So the usual way of numbering tracks on digital music is obviously:

01 - Song 1, 02 - Song 2, 03 - Song 3

or

1 - Song 1, 2 - Song 2, 3 - Song 3

But I sometimes listen to Vinyl records that have been digitized and they sometimes use track number like these:

A1 - Song 1, A2 - Song 2, B1 - Song 3

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

General
Complete name                            : /The Vels/01. Danger Zone.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 68.4 MiB
Duration                                 : 3 min 16 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 923 kb/s
Album                                    : House Of Miracles
Track name                               : Danger Zone
Track name/Position                      : A1
Performer                                : The Vels
Producer                                 : Mercury, Mercury
Genre                                    : Rock, Pop
Recorded date                            : 1986
Cover                                    : Yes
Cover type                               : Cover (front)
Cover MIME                               : image/jpeg
CATALOGID                                : 826 804-1 M-1, 422-826 804-1M-1
COUNTRY                                  : US
DISCOGS_RELEASE_ID                       : 2190207
MEDIATYPE                                : Vinyl (LP, Album)
STYLE                                    : New Wave
WWW                                      : https://www.discogs.com/The-Vels-House-Of-Miracles/release/2190207

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 3 min 16 s
Bit rate mode                            : Variable
Bit rate                                 : 2 891 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 96.0 kHz
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 67.6 MiB (99%)
Writing library                          : libFLAC 1.3.0 (UTC 2013-05-26)

Logs
N/A

FFmpeg Logs
N/A

Stats for Nerds Screenshots
N/A

Server System (please complete the following information):

  • OS: Docker on Linux
  • Jellyfin Version: 10.6.4
  • Hardware settings & device: N/A
  • Reverse proxy: nginx
  • Other hardware notes: Media mounted in NFS share

Client System (please complete the following information):

  • Device: Tested on Android & Web Browser
  • OS: Android & Windows
  • Client: Web/Browser & Android
  • Browser (if Web client): Firefox
  • Client and Browser Version: 84.0
Originally created by @CluelessTechnologist on GitHub (Jan 9, 2021). **Description of issue** So the usual way of numbering tracks on digital music is obviously: > 01 - Song 1, 02 - Song 2, 03 - Song 3 or > 1 - Song 1, 2 - Song 2, 3 - Song 3 But I sometimes listen to Vinyl records that have been digitized and they sometimes use track number like these: > A1 - Song 1, A2 - Song 2, B1 - Song 3 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** ``` General Complete name : /The Vels/01. Danger Zone.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 68.4 MiB Duration : 3 min 16 s Overall bit rate mode : Variable Overall bit rate : 2 923 kb/s Album : House Of Miracles Track name : Danger Zone Track name/Position : A1 Performer : The Vels Producer : Mercury, Mercury Genre : Rock, Pop Recorded date : 1986 Cover : Yes Cover type : Cover (front) Cover MIME : image/jpeg CATALOGID : 826 804-1 M-1, 422-826 804-1M-1 COUNTRY : US DISCOGS_RELEASE_ID : 2190207 MEDIATYPE : Vinyl (LP, Album) STYLE : New Wave WWW : https://www.discogs.com/The-Vels-House-Of-Miracles/release/2190207 Audio Format : FLAC Format/Info : Free Lossless Audio Codec Duration : 3 min 16 s Bit rate mode : Variable Bit rate : 2 891 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 96.0 kHz Bit depth : 24 bits Compression mode : Lossless Stream size : 67.6 MiB (99%) Writing library : libFLAC 1.3.0 (UTC 2013-05-26) ``` **Logs** N/A **FFmpeg Logs** N/A **Stats for Nerds Screenshots** N/A **Server System (please complete the following information):** - OS: Docker on Linux - Jellyfin Version: 10.6.4 - Hardware settings & device: N/A - Reverse proxy: nginx - Other hardware notes: Media mounted in NFS share **Client System (please complete the following information):** - Device: Tested on Android & Web Browser - OS: Android & Windows - Client: Web/Browser & Android - Browser (if Web client): Firefox - Client and Browser Version: 84.0
backuprepo added the
enhancement
confirmed
labels 2025-12-21 20:41:01 +01:00
Author
Owner

@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?

@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?
Author
Owner

@anthonylavado commented on GitHub (Jun 14, 2021):

@CluelessTechnologist I'll check and let you know.

@anthonylavado commented on GitHub (Jun 14, 2021): @CluelessTechnologist I'll check and let you know.
Author
Owner

@CluelessTechnologist commented on GitHub (Jul 5, 2021):

@CluelessTechnologist I'll check and let you know.

Did you find it?

@CluelessTechnologist commented on GitHub (Jul 5, 2021): > > > @CluelessTechnologist I'll check and let you know. Did you find it?
Author
Owner

@CluelessTechnologist commented on GitHub (Nov 25, 2021):

@anthonylavado

So I downloaded the docker image with the 10.8.0-alpha2 tag, 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?

@CluelessTechnologist commented on GitHub (Nov 25, 2021): @anthonylavado So I downloaded the docker image with the `10.8.0-alpha2` tag, 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?
Author
Owner

@srcrist commented on GitHub (Oct 19, 2023):

Can anyone confirm that this issue still exists in 10.8.11? Is this still a regression?

@srcrist commented on GitHub (Oct 19, 2023): Can anyone confirm that this issue still exists in 10.8.11? Is this still a regression?
Author
Owner

@CluelessTechnologist commented on GitHub (Oct 20, 2023):

Can anyone confirm that this issue still exists in 10.8.11? Is this still a regression?

Still an issue on my setup:

Version: 10.8.11
Operating System: Linux
Architecture: X64

I'm using the docker image ghcr.io/linuxserver/jellyfin:latest
I'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

@CluelessTechnologist commented on GitHub (Oct 20, 2023): > Can anyone confirm that this issue still exists in 10.8.11? Is this still a regression? Still an issue on my setup: ``` Version: 10.8.11 Operating System: Linux Architecture: X64 ``` I'm using the docker image `ghcr.io/linuxserver/jellyfin:latest` I'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
Author
Owner

@srcrist commented on GitHub (Oct 20, 2023):

Great news on both counts. I'm going to move this issue to "in progress" then.

@srcrist commented on GitHub (Oct 20, 2023): Great news on both counts. I'm going to move this issue to "in progress" then.
Author
Owner

@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.

@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.
Author
Owner

@CluelessTechnologist commented on GitHub (Jun 26, 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.

Thanks for the information! I will try on Arch (10.9.7-1 as of 20240626) and report back!

@CluelessTechnologist commented on GitHub (Jun 26, 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. Thanks for the information! I will try on Arch (**10.9.7-1** as of _20240626_) and report back!
Author
Owner

@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.

@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](https://security.archlinux.org/package/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.
Author
Owner

@soundsbyjs commented on GitHub (Jun 29, 2024):

I'm idling in IRC if you have time to chat.

Yeah, I'll ping you. I'm aqua_lily on irc :)

Edit: everything seems to be in order. (this album is amazing btw)

2024-06-29_13-45

Complete name                            : Kylesa - Ultraviolet (2013) (2LP 45RPM) (2496 Vinyl)/A1 - Exhale.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 63.3 MiB
Duration                                 : 3 min 1 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 932 kb/s
Album                                    : Ultraviolet (2496)
Track name                               : Exhale
Track name/Position                      : 1
Performer                                : Kylesa
Genre                                    : Stoner Metal
Recorded date                            : 2013

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 3 min 1 s
Bit rate mode                            : Variable
Bit rate                                 : 2 931 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 96.0 kHz
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 63.2 MiB (100%)
Writing library                          : libFLAC 1.2.1 (2007-09-17)
MD5 of the unencoded content             : BC0D5DFDFE7AE4902E2EB63F635283CD

General
Complete name                            : Kylesa - Ultraviolet (2013) (2LP 45RPM) (2496 Vinyl)/A2 - Unspoken.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 99.6 MiB
Duration                                 : 4 min 48 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 898 kb/s
Album                                    : Ultraviolet (2496)
Track name                               : Unspoken
Track name/Position                      : 2
Performer                                : Kylesa
Genre                                    : Stoner Metal
Recorded date                            : 2013```

etc...
@soundsbyjs commented on GitHub (Jun 29, 2024): > I'm idling in IRC if you have time to chat. Yeah, I'll ping you. I'm aqua_lily on irc :) Edit: everything seems to be in order. (this album is amazing btw) ![2024-06-29_13-45](https://github.com/jellyfin/jellyfin/assets/85450032/90b5b183-7abc-48f6-9e33-3e7c2ecd9e8d) ```General Complete name : Kylesa - Ultraviolet (2013) (2LP 45RPM) (2496 Vinyl)/A1 - Exhale.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 63.3 MiB Duration : 3 min 1 s Overall bit rate mode : Variable Overall bit rate : 2 932 kb/s Album : Ultraviolet (2496) Track name : Exhale Track name/Position : 1 Performer : Kylesa Genre : Stoner Metal Recorded date : 2013 Audio Format : FLAC Format/Info : Free Lossless Audio Codec Duration : 3 min 1 s Bit rate mode : Variable Bit rate : 2 931 kb/s Channel(s) : 2 channels Channel layout : L R Sampling rate : 96.0 kHz Bit depth : 24 bits Compression mode : Lossless Stream size : 63.2 MiB (100%) Writing library : libFLAC 1.2.1 (2007-09-17) MD5 of the unencoded content : BC0D5DFDFE7AE4902E2EB63F635283CD General Complete name : Kylesa - Ultraviolet (2013) (2LP 45RPM) (2496 Vinyl)/A2 - Unspoken.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 99.6 MiB Duration : 4 min 48 s Overall bit rate mode : Variable Overall bit rate : 2 898 kb/s Album : Ultraviolet (2496) Track name : Unspoken Track name/Position : 2 Performer : Kylesa Genre : Stoner Metal Recorded date : 2013``` etc...
Author
Owner

@CluelessTechnologist commented on GitHub (Jul 2, 2024):

I'm idling in IRC if you have time to chat.

Yeah, I'll ping you. I'm aqua_lily on irc :)

I've been idling in #lilyspad for the last few days, haven't seen anyone there though :)

Complete name                            : Kylesa - Ultraviolet (2013) (2LP 45RPM) (2496 Vinyl)/A1 - Exhale.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 63.3 MiB
Duration                                 : 3 min 1 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 932 kb/s
Album                                    : Ultraviolet (2496)
Track name                               : Exhale
Track name/Position                      : 1
Performer                                : Kylesa

Compare this to my track:

Complete name                            : /The Vels/01. Danger Zone.flac
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
File size                                : 68.4 MiB
Duration                                 : 3 min 16 s
Overall bit rate mode                    : Variable
Overall bit rate                         : 2 923 kb/s
Album                                    : House Of Miracles
Track name                               : Danger Zone
Track name/Position                      : A1
Performer                                : The Vels

The issue is in the "Track name/Position". Jellyfin cannot parse A1. Your track 1 is 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 A1 and Track name/Position starts with 1. So it may not be that far fetched that some user might have both filename & Track name/Position starting with A1 and 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 (Jul 2, 2024): > > I'm idling in IRC if you have time to chat. > > Yeah, I'll ping you. I'm aqua_lily on irc :) I've been idling in #lilyspad for the last few days, haven't seen anyone there though :) ``` Complete name : Kylesa - Ultraviolet (2013) (2LP 45RPM) (2496 Vinyl)/A1 - Exhale.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 63.3 MiB Duration : 3 min 1 s Overall bit rate mode : Variable Overall bit rate : 2 932 kb/s Album : Ultraviolet (2496) Track name : Exhale Track name/Position : 1 Performer : Kylesa ``` Compare this to my track: ``` Complete name : /The Vels/01. Danger Zone.flac Format : FLAC Format/Info : Free Lossless Audio Codec File size : 68.4 MiB Duration : 3 min 16 s Overall bit rate mode : Variable Overall bit rate : 2 923 kb/s Album : House Of Miracles Track name : Danger Zone Track name/Position : A1 Performer : The Vels ``` The issue is in the "**Track name/Position**". Jellyfin cannot parse `A1`. Your track `1` is 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 `A1` and Track name/Position starts with `1`. So it may not be that far fetched that some user might have both filename & Track name/Position starting with `A1` and 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.
Author
Owner

@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:

  1. ffprobe reads the tags from the music file
  2. The tag reading is either in MediaBrowser.MediaEncoding/Probing/MediaFormatInfo.cs or MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs, I'm not sure which one TBH
  3. MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs handles the parsing of the data
  4. The track number is then sent to the DB

@Maxr1998 maybe you can help me out in finding the best approach to fix my issue. I saw that you did a refactor of ProbeResultNormalizer in commit 11a5551.

I have no idea what the best approach for a fix would be, maybe change GetDictionaryTrackOrDiscNumber to 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:

        /// <summary>
        /// Gets the track or disc number, which can be in the form of '1', or '1/3'.
        /// </summary>
        /// <param name="tags">The tags.</param>
        /// <param name="tagName">Name of the tag.</param>
        /// <returns>The track or disc number, or null, if missing or not parseable.</returns>
        private static int? GetDictionaryTrackOrDiscNumber(IReadOnlyDictionary<string, string> tags, string tagName)
        {
            var disc = tags.GetValueOrDefault(tagName);

            if (int.TryParse(disc.AsSpan().LeftPart('/'), out var discNum))
            {
                return discNum;
            }

            return null;
        }

As you can see if the track data is not in the form of '1', or '1/3', the result will be null.

@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: 1. `ffprobe` reads the tags from the music file 2. The tag reading is either in `MediaBrowser.MediaEncoding/Probing/MediaFormatInfo.cs` or `MediaBrowser.MediaEncoding/Probing/MediaStreamInfo.cs`, I'm not sure which one TBH 3. `MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs` handles the parsing of the data 4. The track number is then sent to the DB @Maxr1998 maybe you can help me out in finding the best approach to fix my issue. I saw that you did a refactor of `ProbeResultNormalizer` in commit 11a5551. I have no idea what the best approach for a fix would be, maybe change `GetDictionaryTrackOrDiscNumber` to 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](https://github.com/jellyfin/jellyfin/blob/c966ad906cebf47d816d78922e76b7d6d59675d2/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs#L1469) I believe is the culprit of my issue: ``` /// <summary> /// Gets the track or disc number, which can be in the form of '1', or '1/3'. /// </summary> /// <param name="tags">The tags.</param> /// <param name="tagName">Name of the tag.</param> /// <returns>The track or disc number, or null, if missing or not parseable.</returns> private static int? GetDictionaryTrackOrDiscNumber(IReadOnlyDictionary<string, string> tags, string tagName) { var disc = tags.GetValueOrDefault(tagName); if (int.TryParse(disc.AsSpan().LeftPart('/'), out var discNum)) { return discNum; } return null; } ``` As you can see if the track data is not in the form of '1', or '1/3', the result will be null.
Author
Owner

@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.

@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.
Author
Owner

@Shadowghost commented on GitHub (Dec 28, 2024):

Wouldn*t it work to just treat A is Disc 1 and B is disc 2?

@Shadowghost commented on GitHub (Dec 28, 2024): Wouldn*t it work to just treat A is Disc 1 and B is disc 2?
Author
Owner

@gnattu commented on GitHub (Dec 28, 2024):

No because you can have a series of discs with double sided tracks

@gnattu commented on GitHub (Dec 28, 2024): No because you can have a series of discs with double sided tracks
Author
Owner

@CluelessTechnologist commented on GitHub (Dec 29, 2024):

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.

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 (Dec 29, 2024): > 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. 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?
Author
Owner

@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.

@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.
Author
Owner

@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:

  1. Each FLAC file is processed independently - Jellyfin's scanner reads files one by one, so track number parsing must work at the individual file level
  2. Metadata is file-specific - Vinyl track numbers (A1, B2) are stored in each file's tags, just like standard track numbers
  3. No schema changes required - We're converting vinyl formats to integers at parse time, maintaining compatibility with existing database structure
  4. Progressive enhancement - This adds new capability without breaking existing functionality

How the Feature Works

  • Detection: Scans additional metadata fields (TRACKNAME/POSITION, TRACKTOTAL, TRACK) for vinyl formats
  • Parsing: Extracts the numeric portion from vinyl notations (A1 → 1, B2 → 2, etc.)
  • Side Handling: Each side (A, B, C) is treated independently with track numbers starting from 1
  • Fallback: Maintains full backward compatibility with standard numeric track numbers

Key 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.

@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: 1. **Each FLAC file is processed independently** - Jellyfin's scanner reads files one by one, so track number parsing must work at the individual file level 2. **Metadata is file-specific** - Vinyl track numbers (A1, B2) are stored in each file's tags, just like standard track numbers 3. **No schema changes required** - We're converting vinyl formats to integers at parse time, maintaining compatibility with existing database structure 4. **Progressive enhancement** - This adds new capability without breaking existing functionality ### How the Feature Works - **Detection**: Scans additional metadata fields (`TRACKNAME/POSITION`, `TRACKTOTAL`, `TRACK`) for vinyl formats - **Parsing**: Extracts the numeric portion from vinyl notations (A1 → 1, B2 → 2, etc.) - **Side Handling**: Each side (A, B, C) is treated independently with track numbers starting from 1 - **Fallback**: Maintains full backward compatibility with standard numeric track numbers ### Key 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.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#2491
No description provided.