blastbeng / spotisub

Spotify to subsonic Playlist Generator and Importer
MIT License
105 stars 6 forks source link

Wrong number of tracks in spotify playlist #71

Closed Schroti closed 1 month ago

Schroti commented 1 month ago

Is there an existing issue for this?

Current Behaviour

Imported playlists have incorrect number of max. tracks, in the overview for example one of my playlists apparently has 79 tracks, when going into the playlist detail view it shows 44 items while the actual playlist on Spotify has 129 tracks (although some of them are not available anymore, i don't know how these are handled in spotisub, but it should still be >100 tracks).

This seems to be a consistent issue for all playlists created in 0.3.1, although of note is that some playlists have too few tracks and some have too many (so number of tracks in Spotisub is higher than the actual number of tracks in Spotify)

The number of tracks that were found/matched are correct, this is just about the playlist count in Spotify.

Spotisub Playlist: image

Detail View: image

Playlist on Spotify: image

Steps To Reproduce

No response

Expected behaviour

Number of tracks should be consistent for spotisub overview, playlist detail view and possibly even spotify playlist

Spotisub Version

Docker 0.3.1

Python Version

3.10.15

Example Code

No response

Relevant log output

No response

Code of Conduct

blastbeng commented 1 month ago

The total count is refered to how many tracks have been found inside the spotify playlist. But if the process doesn't end, the total number of tracks will be lower than the spotify playlist song count.

This can happend for two reasons: 1) Being rate limited by spotify apis 2) The process has been interrupted for some reason

Anyways there is a count mismatch from the detail view and the playlist view. This will be solved in 0.3.2.

Schroti commented 1 month ago

Okay thanks for the info and yes that could be a reasonable explanation for why Playlists in Spotisub have fewer tracks than original Spotify Playlist, will also check if i missed some error messages regarding this.

But it would not explain to me how this would lead to the Spotisub Playlist having more tracks than the original Spotify Playlist or am i missing something?

Edit: okay nevermind, it seems the cases were the count is higher is just for the playlist overview counts. In the detail view the playlist sizes seem to be up to around the same count as the actual playlist count

blastbeng commented 1 month ago

Okay thanks for the info and yes that could be a reasonable explanation for why Playlists in Spotisub have fewer tracks than original Spotify Playlist, will also check if i missed some error messages regarding this.

But it would not explain to me how this would lead to the Spotisub Playlist having more tracks than the original Spotify Playlist or am i missing something?

Edit: okay nevermind, it seems the cases were the count is higher is just for the playlist overview counts. In the detail view the playlist sizes seem to be up to around the same count as the actual playlist count

I am implementing a better import process, "lidarr style"

The next release of spotisub will have a mass import from spotify to spotisub as empty playlist and then every playlist will have a single job. This import job will trigger at a timer and also manually from the UI

image

This will help users to better sync and understand what spotisub is syncing from spotify. Also the counts are fixed in 0.3.2 dev branch but i suggest not to use this TAG as it is still full of issues I have to solve before releasing.

I think this will take few days.

Unfortunately I had to change the entire spotisub Db to make it "lidarr style" so in next release it will be wiped out again.

Schroti commented 1 month ago

Okay no worries, take the time you need for the next version! This looks and sounds very nice, will be waiting for the next version.

Also if you need any help in the form of testing things or contributing to anything, I'd be happy to help

blastbeng commented 1 month ago

resolved in v 0.3.3