The wrong audiobook (album) is opening

Issue description:

I’ve encountered an issue: an audiobook displays correctly in the albums view, but opening it takes me to a different audiobook. This problem is specific to Symfonium, as other clients work correctly.

The logic of the Jellyfin API requests isn’t immediately obvious, but I’m quite certain that Symfonium is processing the response data incorrectly. I pulled the database.db file from my smartphone and found something interesting in the albums table. The values in the external_id column contain chapter titles instead of actual identifiers. I have a rough theory of how this might happen: the app likely fetches data from the /Users/:user_id/Items?Recursive=true&IncludeItemTypes=Audio,AudioBook&ParentId=:parent_id&ExcludeLocationTypes=Virtual&Fields=MediaSources,Genres,SortName,Path,RunTimeTicks,DateCreated,ProductionYear,CommunityRating,UserDataPlayCount,UserDataLastPlayedDate,Tags&startIndex=0&limit=2000&UserId=:user_id endpoint, then creates a unique list based on Artist + Album, keeping the first entry it encounters for each unique pair. However, it’s unclear how and why the Name is then used as the external_id.

This incorrect behavior occurs with audiobooks (albums) that share the same external_id. When there’s a duplicate external_id, the app opens the audiobook (album) with the lower _id value in the albums table. I don’t fully understand the mechanics, but the fact remains.

I sent the logs from Symfonium. I specified bit_imp as the nickname.

Logs:

Upload description: bit_imp

Additional information:

Reproduction steps:

Media provider:

Jellyfin

Screenshots:

So yes the usual Jellyfin :slight_smile:

2025-09-15 10:46:42.171 Verbose JellyfinLogger  <-- [255] 200 https://xxxxxp/Users/223e47dcf0c341aeb725759908253d1f/Items?Recursive=true&IncludeItemTypes=MusicAlbum&ParentId=ff5cfbe68eb4f8d84727ffcce4f1f290&ExcludeLocationTypes=Virtual&Fields=Genres,SortName,Path,DateCreated,ProductionYear,CommunityRating,Studios,Tags,Overview,UserDataPlayCount,UserDataLastPlayedDate&startIndex=0&limit=1000&UserId=223e47dcf0c341aeb725759908253d1f (179ms, unknown-length body)
2025-09-15 10:46:42.175 Verbose JellyfinLogger  <-- [255] {"Items":[],"TotalRecordCount":0,"StartIndex":0}
2025-09-15 10:46:42.176 Verbose JellyfinLogger  <-- [255] END HTTP (179ms, 48-byte body)
2025-09-15 10:46:42.178 Verbose Jellyfin  End Insert Audio Albums (true): 0 [0,19s]

Ask for Albums Jellyfin returns none.

Ask for the tracks

{
      "Name": "Глава 7",
      "ServerId": "xxxxxx",
      "Id": "004902ed579e787dd8ee6d244a94abfc",
      "DateCreated": "2023-11-16T17:27:23.0815347Z",
      "HasLyrics": false,
      "SortName": "0007 - Глава 7",
      "PremiereDate": "1997-01-01T00:00:00.0000000Z",
      "MediaSources": [
        {
          "Protocol": "File",
          "Id": "004902ed579e787dd8ee6d244a94abfc",
          "Path": "D:\\media\\audiobooks\\Анджей Сапковский\\Башня ласточки\\07.mp3",
          "Type": "Default",
          "Container": "mp3",
          "Size": 38305474,
          "Name": "07",
          "IsRemote": false,
          "ETag": "cf4c9cf724369f1474b147e58cf65e9c",
          "RunTimeTicks": 51135216330,
          "ReadAtNativeFramerate": false,
          "IgnoreDts": false,
          "IgnoreIndex": false,
          "GenPtsInput": false,
          "SupportsTranscoding": true,
          "SupportsDirectStream": true,
          "SupportsDirectPlay": true,
          "IsInfiniteStream": false,
          "UseMostCompatibleTranscodingProfile": false,
          "RequiresOpening": false,
          "RequiresClosing": false,
          "RequiresLooping": false,
          "SupportsProbing": true,
          "MediaStreams": [
            {
              "Codec": "mp3",
              "TimeBase": "1/14112000",
              "VideoRange": "Unknown",
              "VideoRangeType": "Unknown",
              "AudioSpatialFormat": "None",
              "LocalizedDefault": "По умолчанию",
              "LocalizedExternal": "Внешние",
              "DisplayTitle": "MP3 - Stereo",
              "IsInterlaced": false,
              "IsAVC": false,
              "ChannelLayout": "stereo",
              "BitRate": 59539,
              "Channels": 2,
              "SampleRate": 44100,
              "IsDefault": false,
              "IsForced": false,
              "IsHearingImpaired": false,
              "Type": "Audio",
              "Index": 0,
              "IsExternal": false,
              "IsTextSubtitleStream": false,
              "SupportsExternalStream": false,
              "Level": 0
            },
            {
              "Codec": "mjpeg",
              "ColorSpace": "bt470bg",
              "Comment": "Cover (front)",
              "TimeBase": "1/90000",
              "VideoRange": "Unknown",
              "VideoRangeType": "Unknown",
              "AudioSpatialFormat": "None",
              "IsInterlaced": false,
              "IsAVC": false,
              "BitDepth": 8,
              "RefFrames": 1,
              "IsDefault": false,
              "IsForced": false,
              "IsHearingImpaired": false,
              "Height": 500,
              "Width": 500,
              "RealFrameRate": 90000,
              "ReferenceFrameRate": 90000,
              "Profile": "Baseline",
              "Type": "EmbeddedImage",
              "AspectRatio": "1:1",
              "Index": 1,
              "IsExternal": false,
              "IsTextSubtitleStream": false,
              "SupportsExternalStream": false,
              "PixelFormat": "yuvj444p",
              "Level": -99,
              "IsAnamorphic": false
            }
          ],
          "MediaAttachments": [],
          "Formats": [],
          "Bitrate": 59928,
          "RequiredHttpHeaders": {},
          "TranscodingSubProtocol": "http",
          "DefaultAudioStreamIndex": 0,
          "HasSegments": false
        }
      ],
      "Path": "D:\\media\\audiobooks\\Анджей Сапковский\\Башня ласточки\\07.mp3",
      "ChannelId": null,
      "Genres": [
        "Зарубежное фэнтези"
      ],
      "RunTimeTicks": 51135216330,
      "ProductionYear": 1997,
      "IndexNumber": 7,
      "IsFolder": false,
      "Type": "AudioBook",
      "GenreItems": [
        {
          "Name": "Зарубежное фэнтези",
          "Id": "306bd5050f424100ef42eba2342479b2"
        }
      ],
      "UserData": {
        "PlaybackPositionTicks": 0,
        "PlayCount": 2,
        "IsFavorite": false,
        "LastPlayedDate": "2023-11-18T02:14:11.2719415Z",
        "Played": true,
        "Key": "Анджей Сапковский-Башня Ласточки-0007Глава 7",
        "ItemId": "00000000000000000000000000000000"
      },
      "Tags": [],
      "Artists": [
        "Анджей Сапковский"
      ],
      "ArtistItems": [
        {
          "Name": "Анджей Сапковский",
          "Id": "33767dc2d60dda3e850d84c6b38ef173"
        }
      ],
      "Album": "Башня Ласточки",
      "AlbumArtist": "Анджей Сапковский",
      "AlbumArtists": [
        {
          "Name": "Анджей Сапковский",
          "Id": "33767dc2d60dda3e850d84c6b38ef173"
        }
      ],
      "ImageTags": {
        "Primary": "53f01150fad8f9a88828b808289c142e"
      },
      "BackdropImageTags": [],
      "ImageBlurHashes": {
        "Primary": {
          "53f01150fad8f9a88828b808289c142e": "eCGb}3kDx_.8t8_4R%o#ozaw4.j[M{RkRjx^t7ITITbHM_ogt7s.bI"
        }
      },
      "LocationType": "FileSystem",
      "MediaType": "Audio"
    },

Get tracks with an album name but no fucking albumID so no way to get the actual album details from Jellyfin and so can’t identify duplicates by names or anything.

Symfonium generate fakes albums to allow handling things in Symfonium but can’t invent data that Jellyfin does not properly provide.

I realized Jellyfin’s API was terrible when I couldn’t authenticate and had to start researching how to do it. That said, Jellyfin’s database structure is also horrifying.)

Unfortunately, after a quick search, I couldn’t find a suitable self-hosted alternative for audiobooks with a client that would be intuitive for my parents.

Just add numbers on the album tags to have them split properly.

Seems AudioBookshelf is nice as the server part, one day maybe I’ll add support for it.

If you’re referring to the tags in the audiobook’s metadata in Jellyfin, that didn’t work.

​I think I’ve come up with a clunky, but working, solution: changing the chapter titles in the metadata of the files themselves to make them unique across different books.