simon-weber / Autoplaylists-for-Google-Music

Adds autoplaylists, aka iTunes "smart playlists", to Google Music.
https://autoplaylists.simon.codes
MIT License
94 stars 18 forks source link

Played Count condition not working #170

Closed njs-uhg closed 6 years ago

njs-uhg commented 7 years ago

Firstly, love your app. But ... I have a play list that depends on play count - I only want song that have not been played, so I added the condition play count < 1. When I test the list in the extension all the song report -1 for the play count. But in the Google desktop player and web player page some songs have started showing positive play counts. I beleive the play counts in the interface of the app/web player to be accurate as I have seen these songs played. I think this happens when I play the songs on my Android device. But even subsequent playing in the web/app increase the play count, but still appear as -1 in your extension. I'm wondering if the 'played count' is stored in several places and your app is no reading the correct one?

simon-weber commented 7 years ago

Ah, yeah, play count and last played are somewhat notorious. As far as I can tell, Google just doesn't always present accurate data through the apis I'm using (which are what the apps use rather than the website). https://github.com/simon-weber/Autoplaylists-for-Google-Music/issues/55 and https://github.com/simon-weber/Autoplaylists-for-Google-Music/issues/8 describe some of the history here.

With last played Google did eventually seem to notice a problem and add a new field with better data, so it's possible they've done something similar for play count as well. I'll take another look when I have a chance.

In the mean time, it's worth trying a condition like last played earlier than 1980. This is matching on "last played at time 0", which is represented as 1970 in the unix epoch representation.

njs-uhg commented 7 years ago

Sweet. Thanks for the (very quick) reply. I’ll give last played a go.

njs-uhg commented 7 years ago

Sadly, last played seems to be returning 01/01/1970, 10:00:00 for song I know have played … ☹

simon-weber commented 7 years ago

Hm. If that's not working there may be something else going on.

Can you try reloading and testing your autoplaylists again? There may have been a temporary issue syncing your library. Checking for errors in your logs is also worth a shot.

simon-weber commented 7 years ago

I double checked the fields now and don't see any new ones, unfortunately. Let me know how the other debugging goes.

njs-uhg commented 6 years ago

Thanks for the support. Seems to work it self out over time… like the data slowly regains integrity. Thanks.

njs-uhg commented 6 years ago

Thanks for the help. I’m happy to live with the temporary oddness.

simon-weber commented 6 years ago

Sounds good. I've seen Google's data lag behind a bit under high load, but it's usually not too bad. Let me know if it gets out of hand and I'll see if there's anything we can do on our end.