navidrome / navidrome

🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic
https://www.navidrome.org
GNU General Public License v3.0
10.16k stars 783 forks source link

[Bug]: Sync issue with Symfonium when TPOS is not an int #2990

Closed Steltek closed 2 weeks ago

Steltek commented 2 weeks ago

I confirm that:

Version

0.52.0 (92a98cd5)

Current Behavior

While trying to sync, Symfonium outputs this error:

2024-05-01 09:45:47.859 Error/SubsonicLogger: Error androidx.datastore.preferences.protobuf.i1: Expected an int but was 88697893262 at path $.subsonic-response.searchResult3.album[888].discTitles[0].disc at lw.o.r(Unknown Source:66) at lw.c0.c(Unknown Source:323) at app.symfonik.provider.subsonic.models.DiscTitleJsonAdapter.c(Unknown Source:44) at nw.b.c(Unknown Source:15) at lw.g.c(Unknown Source:15) at nw.b.c(Unknown Source:15) at app.symfonik.provider.subsonic.models.SearchResult_AlbumJsonAdapter.c(Unknown Source:80) at nw.b.c(Unknown Source:15) at jf.v.r(Unknown Source:266) at jf.v.invoke(Unknown Source:12) at e7.i.h(Unknown Source:191) at jf.l0.e0(Unknown Source:19148) at jf.t.r(Unknown Source:16) at ox.a.m(Unknown Source:5) at my.f0.run(Unknown Source:109) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)

Checking search3.view's JSON output, I found an album where all the MP3s had this ID3 tag:

TPOS (Part of a set): 88697893262

The relevant JSON party looked like this:

   "discTitles": [
      {
         "disc": 88697893262,
         "title": ""
      }
   ],

Changing that to 1 and rescanning my library made things work.

This issue is new (the album has been in my collection for over 10 years).

Expected Behavior

The spec at https://id3.org/id3v2.4.0-frames states that TPOS is:

TPOS The 'Part of a set' frame is a numeric string that describes which part of a set the audio came from. This frame is used if the source described in the "TALB" frame is divided into several mediums, e.g. a double CD. The value MAY be extended with a "/" character and a numeric string containing the total number of parts in the set. E.g. "1/2".

According to that its field type can be non-int.

Could this line

Disc int xml:"disc,attr" json:"disc"

in server/subsonic/responses/responses.go be at fault?

Steps To Reproduce

  1. Have on album with MP3 files that have 'TPOS (Part of a set): 88697893262' in their tags. (Potentially also others like a value of '1/2')
  2. Set up Symfonium to use Navidrome as Media Provider and try to sync.

Environment

- OS: Debian bookworm
- Client: Symfonium 10.0.0

How Navidrome is installed?

Docker

Configuration

No response

Relevant log output

No response

Anything else?

No response

Code of Conduct

Steltek commented 2 weeks ago

Fixed in https://github.com/navidrome/navidrome/commit/2c06a4234ecccfd4cecc5c99aaada9941e9da13f