music-assistant / hass-music-assistant

Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players.
Apache License 2.0
1.3k stars 47 forks source link

Scrubbing in Apple Music does not move songs position and sends to start of song #2670

Open DJAMIRSAM opened 1 month ago

DJAMIRSAM commented 1 month ago

What version of Music Assistant has the issue?

2.1.0

What version of the Home Assistant Integration have you got installed?

2024.6.2

Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

The problem

When I scrub in a song (ex go from 1 minute in the song to 2 minutes) the song restarts from the start but MA shows the song as playing from where I left it,

How to reproduce

Change current position song is playing at

Music Providers

Apple Music, only provider tried

Player Providers

Sonos, Snap Cast

Full log output

music-assistant.txt

Additional information

No response

What version of Home Assistant Core are your running

2024.7.3

What type of installation are you running?

Home Assistant OS

On what type of hardware are you running?

Generic x86-64 (e.g. Intel NUC)

OzGav commented 1 month ago

How are you trying to seek? I just tried via the MA UI and it worked fine

DJAMIRSAM commented 1 month ago
Screenshot 2024-07-23 at 9 59 17 PM

Using this bar, I just drag it to where I want, I have also tried clicking on where I want, I also tried doing it through HA, same thing just goes to the start of the song

EDIT: I just tested and even just pausing the song send the music to the start, even tho MA shows it at the previous timestamp

OzGav commented 1 month ago

Is this a snapcast provider? If so pause doesn't work. What happens with Sonos?

DJAMIRSAM commented 1 month ago

Is this a snapcast provider? If so pause doesn't work. What happens with Sonos?

I am using the snap cast provider but I am pausing in the MA UI, I that also a problem zone? I cannot test Sonos right now but I believe it was the same there. I will test Sonos In the morning so I don't wake my family up 😆

OzGav commented 1 month ago

Yes pause is not currently supported https://music-assistant.io/player-support/snapcast/

DJAMIRSAM commented 1 month ago

Yes pause is not currently supported https://music-assistant.io/player-support/snapcast/

Ok so I just tested and pausing is not an issue on Sonos, but the scrubbing still restarts the song

OzGav commented 1 month ago

@SantiagoSotoC

DJAMIRSAM commented 1 month ago

Tested and this problem also persists when using home assistant media players

SantiagoSotoC commented 1 month ago

That is handled by the playback queue with the flow mode, I can't fix it from the provider, that's probably why the pause doesn't work, but it's something in the core

DJAMIRSAM commented 1 month ago

That is handled by the playback queue with the flow mode, I can't fix it from the provider, that's probably why the pause doesn't work, but it's something in the core

The issue still persists on all other providers, Sonos, HA media players, Snapcast. I tested with and without flow mode on HA

SantiagoSotoC commented 1 month ago

In some providers the flow mode is internal, it is not shown to the user. I can speak for snapcast, I know little about how the core works and even less about other providers. In snapcast it is expected that you are a few seconds out of sync because of the buffer, but minutes is a lot.

I don't know which ones use the flow mode, but this could be the reason why the pause doesn't work in snapcast, maybe the problem is more than the flow mode then

OzGav commented 1 month ago

It is unusual as no one else is currently reporting this problem. This will get looked at more in due course.

SantiagoSotoC commented 1 month ago

@marcelveldt this may be what we talked about the other day with the problems in the queue ?

marcelveldt commented 1 month ago

What music provider is this?

OzGav commented 1 month ago

@marcelveldt Apple Music i believe

DJAMIRSAM commented 1 month ago

@marcelveldt Apple Music i believe

The provider is Apple Music, I have no other option to test with

DJAMIRSAM commented 1 month ago

Hey just wondering if there are any updates on this or more information you need from me?

marcelveldt commented 2 weeks ago

I get a feeling that seeking is not supported by the apple music provider, hence it explains why nobody else is reporting this. Maybe test if seeking works with a local file for example.

MarvinSchenkel commented 2 weeks ago

Yep that's it, I can reproduce it here for Apple Music. Silly I never noticed this before. I am afraid the solution is gonna be a bit harder, but will see if I can come up with a solution here.