BimmerGestalt / AAIdrive

Implementations of some Android Auto features as unofficial IDrive apps
MIT License
541 stars 90 forks source link

Spotify Now Playing song selection offset #291

Closed sandrik93 closed 2 years ago

sandrik93 commented 3 years ago

I've noticed recently that whenever I try to play a song on Spotify by selecting it in "Now Playing" menu, it starts to play song that is 8 positions above in the playlist. This offset is constant no matter which song I select - 8 songs above. I've only seen this issue appear recently. Otherwise everything works great. Thank you again for such a great project! (for people who do not want to hop on Apple bandwagon)

hufman commented 3 years ago

Thank you for the report! Could you provide a few more details which might be helpful in reproducing the problem? What version of Spotify do you have? Does the problem happen on all playlists or any particular pattern? Liked Songs and Artist playlists are buggy, in that they'll always pick the first song, but not a specific offset like what you see.

sandrik93 commented 3 years ago

Spotify version is 8.6.28.700 and it shows me that this update happened on the 25th. However I've noticed the issue prior to that as well. I have not tried it in Liked songs. But I've noticed it in all playlists that I checked (all created by me). And it's the same whether I select the song going through the "Now Playing" on the screen or select the song with the steering wheel knob in the instrument cluster screen. Tried with both shuffle on and off. Same result.

LACNR commented 3 years ago

With "Now Playing" do you mean the menu in the AAiD app on your phone?

What happens when you select a song from the iDrive Menu using the iDrive Controller via the Spotify widget? And what if you select the Songs directly in Spotify via your phone.

Eventually search if there's an update for BMW on www.bmw.com/update

sandrik93 commented 3 years ago

With "Now Playing" I mean the options in the iDrive screen in Spotify widget - same place you have Browse, Shuffle, Repeat... If I select the song directly from the phone it plays the correct song

sandrik93 commented 3 years ago

I think I figured it out. It has to do with songs not available on spotify anymore. If there is 1 song not available it skips it and works fine but if there are 2 consecutive songs (and I have them as 'don't hide' in settings) it doesn't know how to skip so we get offset. 3 consecutive songs unavailable and below that I get 3 offset. If offset ends up on an unavailable song - spotify widget bugs out/stops as it tries to play the song that is not there.

hufman commented 3 years ago

Ah that makes sense. Thanks for helping debug the problem! It doesn't have an easy solution, I'm afraid :(

LACNR commented 3 years ago

I think one at the german BMW community forums mentioned this and came to the same conclusion, he had some unavailable song in a row and Spotify couldn't properly skip them.

Is there actually a limitation how many songs can be displayed in Playlists (Browse, Now Playing) via the Spotify widget. One of my biggest Playlist has over 450 tracks and in-car I can only scroll down to approx 300-350 songs? :)

sandrik93 commented 3 years ago

The best workaround I can think of is to space unavailable songs in the playlist so Spotify properly skips on i.e. not to have them bunch up - if anyone else has the issue :) With regards to playlist limitation - I don't think there is a limit because I am subscribed to the playlist with 1000 songs in it and I can see all of them

hufman commented 3 years ago

Hmmm that's a good idea! I'll have to figure out how to tell which songs from a playlist are unavailable, but doing such a calculation would be doable if that information is known.

donsaimon commented 2 years ago

I have the same issue. The offset in "now playing", list in my case, is +1 or +2, it depends from the day...

NavjotPanesar commented 2 years ago

I have the same issue too. I tried to select "show unavailable songs" in my spotify app to see if I could clear them out manually and fix the issue, but I couldn't find anything. I usually get an offset of +1 or +6 to +8 depending on how deep I am into my "Liked Songs" playlist.

If anyone has any tips to fix this on the spotify end of things that would be great. Otherwise I might try and start looking through the codebase and see if I can debug the issue myself. This app is amazing but this is the only thing that's really causing me issues day to day

NavjotPanesar commented 2 years ago

Update: It does appear to be caused by unplayable songs. I eventually got them to show in my PC client of spotify. Instead of removing those songs (which would solve the issue) I opened a PR that I tested and it seems to fix the problem: https://github.com/BimmerGestalt/AAIdrive/pull/579