koolskateguy89/gnome-shell-extension-spotify-controller

Icons showing even when spotify is closed

Closed this issue · 5 comments

Was working fine 2-3 weeks before. But now icons are there. It is turned off in settings.

  • What GNOME version are you on?
  • What version of the extension are you on?
  • What do you mean by now icons are there?

I have the same issue,
I'm on Gnome version 42
and the newest version of the extension that is on extensions.gnome.org (I think it is 11)
As you start the laptop the control buttons are showing up (spotify is not starting automatically).
As soon as you start spotify and then close it again it disappears and works correctly.

Gnome Shell 42.4 - X11 - Extension v11

I can confirm this behavior persists on latest shell and extension (buttons show up even when Spotify is closed):
image
They do go away once you open and close spotify, but I've noticed they tend to come back whenever I use any other media player.

I've also noticed the "play" button changes to the "pause" button when something (not spotify) is playing. But if you try and click on it, it does nothing. This is expected as I guess its function should be limited to spotify.
In this example I was playing a podcast from my phone through bluetooth (not on the spotify app either btw):Captura desde 2022-08-15 15-53-18

I've finally been able to reproduce this and know why this is happening:

  • spotify.PlaybackStatus is not null when the PlaybackStatus of another media player (e.g. vlc.PlaybackStatus changes, even though there is no process taking ownership of the Spotify's well-known name (i.e. Spotify isn't open)
  • because the extension checks if Spotify is open by checking spotify.PlaybackStatus is not null, it thinks Spotify is open

I think I've fixed this by instead listening for when Spotify's name appears/disappears (i.e. when Spotify opens/closes), I'll push soon

Thank you @sergiotca for such a detailed comment, really helped me understand what was wrong

Fixed version has been uploaded on EGO (v13)