Can only play one song from songs with same title/album/album artist

Issue description:

Hi,
I have multiple songs with the same title. Because Navidrome sorts songs by album I gave all songs without an album the album title “Unbekannt” (“unknown” in german) and album artist “Unbekannt”. So they only differ in tags like the songs artist and maybe year, genre, etc…

After local sync of my playlist I can only listen to one of those songs. Artists and titles are displayed correctly in the playlist, but for all entries just one of those songs is played (always the same). I believe that would be the last song downloaded from Navidrome. Could it be that the songs are stored in a path format like ./album artist/album/song-id - song-title.mp3? That would explain why the songs get overridden on sync.

In my log file I played multiple songs with the same title/album artist/album title and one with the same title but different album title and album artist. The first songs all played the same song and the last song was played correctly, which gave me a hint for your save path format.

Logs:

debug-20230409_144029.zip (24,6 KB)

Screenshots:

Additional information:

Phone: Android 13
Server: Navidrome 0.49.3 (8b93962f)

Yes this is a strange default configuration in Navidrome to not return the real files.

You can configure Navidrome to return real path api returns wrong song path · Issue #625 · navidrome/navidrome · GitHub then force sync.

This will solve this. Songs with the same file are supposed to be the same song so they are not downloaded multiple times.

@deluan since you seem to be the only one to do that by default any reason?

@Tolriq switching on the “Report Real Path” Option for the Symfonium player in Navidrome did indeed fix the issue. Thank you!

Yes, this was a deliberate personal (even selfish) decision I took in the beginning of the project. The player I use, the ancient DSub, when put in offline mode, only let’s you browse your cached songs by path. As my paths are all over the place, it is really hard to browse my music in DSub while in offline mode. Making the path follow the standard /Artist/Album/TrackNumber - Title.mp3 format, the cache stays in a sane format.

I understand that this breaks the browsing experience for a small percentage of the users, hence I added the option to report real paths.

I may change this in the future, but don’t have any plans to do it for now.

@deluan the problem here is not really the value itself but the uniqueness of it.

You added the track number when requested it helped a lot to reduce clash, but there’s still cases like this.
Maybe add an hash/the id/ something in () at the end in this mode to avoid same file representing 2 different songs.

This would break offline scrobble (at least in DSub). I have to think more about a proper solution for this.

Why would a different filename break that?
When you added the track number it did not break it.

It’s just adding something more to ensure that a unique real file generate an unique filename in the API.