Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

notifications problems #4

Open
c-steindl opened this issue Aug 30, 2016 · 8 comments
Open

notifications problems #4

c-steindl opened this issue Aug 30, 2016 · 8 comments
Labels

Comments

@c-steindl
Copy link

In many cases the gnome-notification pops up multiple times for a single song -> see screenshot
screenshot_spotiweb

@tomasmcm
Copy link
Owner

@Steindi01 Can you give me more details about your system so that I can try to replicate the issue on my side?

@tomasmcm tomasmcm added the bug label Aug 30, 2016
@c-steindl
Copy link
Author

I'm using Fedora 22 with Gnome Version 3.16.2. Further the cover from the album-art does sometimes not match the actual song in the gnome notification and falls behind one step. In other words: if I start song A and go to the next one (song B), than the notification shows the title of song B with the cover of song A.

@c-steindl c-steindl changed the title multiple gnome-notifications gnome-notifications problems Sep 1, 2016
@alagos
Copy link

alagos commented Sep 6, 2016

Same store here with Xubuntu 16.04
captura de pantalla_2016-09-05_23-23-31
Not sure what's the pattern, sometimes displays two notifications or just one. On this occasion has displayed three and the art of the first corresponds to the previous played song.
And I'm not sure about is a gnome-notifications problem, AFAIK Xubuntu uses xfce4-notifyd to display notifications.

@c-steindl c-steindl changed the title gnome-notifications problems notifications problems Sep 6, 2016
@alagos
Copy link

alagos commented Sep 6, 2016

The problem seems to be on the title event handler. Doing this:

  mainWindow.on('page-title-updated', function(e,t){
    console.log('title:', t);

I realised the title changes three times on the spotify site, but just sometimes (no idea why). For example this was the title of a played song:

title: ▶ Left Behind - Slipknot - Spotify

then when starts to play the next song, it changes to:

title: Left Behind - Slipknot - Spotify

then again to this:

title: ▶ Left Behind - Slipknot - Spotify

and finally the corresponding title of the new song:

title: ▶ Wake Up - Remastered - Rage Against The Machine - Spotify

So up this moment has been invoked setTimeout three times to notify the new song in the next 2 seconds, which it will be Wake Up - Remastered - Rage Against The Machine - Spotify. Maybe saving the last title and comparing it with the new one would fix this? Or maybe electron has a better way to handle this? (Never heard about electron up now, so I'm clueless)

@tomasmcm
Copy link
Owner

tomasmcm commented Sep 6, 2016

I know... This is a very hacky way to do it, but it was the only one I could find.
The only problem with your suggestion is the use case where the user pauses a song and then starts playback again, the song title would be the same...
I've been searching about this and notifications on Linux appear to be a bit buggy, I think I've found a solution, it'll be on the next release soon.
Basically, I'm creating new notifications for every page title change, my solution is to reuse the notification by closing it first, changing the attributes and then showing it again.

@tomasmcm
Copy link
Owner

@Steindi01 @alagos Hi there, can you check if this problem persists in SpotiWeb v0.5?

@c-steindl
Copy link
Author

The new version gets rid of the duplicates, but in many cases there is no album cover displayed.
screen
This only happens if I choose a particular song. When a new song begins from the queue, then the notification works fine.

@Trost123
Copy link

Windows 7, happens when I play\pause with media keys. Pausing with mouse doesn't produce this bug.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants