owntone / owntone-server

Linux/FreeBSD DAAP (iTunes) and MPD audio server with support for AirPlay 1 and 2 speakers (multiroom), Apple Remote (and compatibles), Chromecast, Spotify and internet radio.
https://owntone.github.io/owntone-server
GNU General Public License v2.0
2.1k stars 237 forks source link

two spotify playlists with same name #504

Closed snizzleorg closed 6 years ago

snizzleorg commented 6 years ago

i'm facing the problem that forked-daapd somehow has two spotify playlists with the same name in its library. Is there any way to delete them or re-initilise the spotify lists? Library rebuilt?

The offending playlist is mpc lsplaylists ...

spotify:/Discover Weekly (spotify)
spotify:/Discover Weekly (spotify)

...

ejurgensen commented 6 years ago

If you place a file in your library ending with .full-rescan ending it should be cleaned up.

@chme I couldn't see where in the new Spotify library code that playlists get cleaned up - am I missing something or is the code missing something?

snizzleorg commented 6 years ago

Thanks that helped. However now the discover weekly playlist has completely disappeared. Probably spotify is to be blamed for that.

I would love if there would be some kind of access to their mix playlists....

chme commented 6 years ago

@ejurgensen the cleanup is done in db_purge_cruft after a rescan/initscan. In library.c rescan first rescans the local library and then the spotify saved ablums/playlists and at last calls db_purge_cruft, which removes all files/playlists that were not updated.

ejurgensen commented 6 years ago

Oh yes that is true. Why do you think @snizzleorg ends up with two playlists? Are both being pinged because they have the same name?

ejurgensen commented 6 years ago

@snizzleorg I just tried a full rescan, and I still have my Discover weekly, so it should be there. I can't say why you don't have it, but you can try first doing a library update via the web interface, and if that doesn't work then maybe try to re-authorize web api access for forked-daapd, also via the web interface.

chme commented 6 years ago

Not sure why this happened. Only the path (spotify-playlist-uri) is used to ping the playlist. The same name should not cause issues.

The cleanup is only done on manual triggered rescan and on startup (and there only if filescan_disable is not set to true in the conf-file). Maybe spotify changed the playlist-uri and a "normal" rescan would have been sufficient to resolve this?

snizzleorg commented 6 years ago

@ejurgensen thanks. It somehow showed up again after I hit update. So I guess it must be spotify to be blamed. As to why it showed up twice i suppose thats spotifys fault as well as I found a friends discovery weekly list in my spotify account. so something is fishy on their end...

snizzleorg commented 6 years ago

I'll close this issue as the rescan worked.