After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 729102 - Notification doesn't show up when media art doesn't exist
Notification doesn't show up when media art doesn't exist
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.13.x
Other Linux
: Normal normal
: 3.14
Assigned To: Arnel Borja
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2014-04-28 11:53 UTC by Arnel Borja
Modified: 2014-04-28 13:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
albumArtCache: Don't return path if doesn't exists (1.99 KB, patch)
2014-04-28 13:14 UTC, Arnel Borja
none Details | Review
albumArtCache: Fix full retrieve of song items (3.86 KB, patch)
2014-04-28 13:15 UTC, Arnel Borja
none Details | Review
notification: Don't lookup thumbnail (3.38 KB, patch)
2014-04-28 13:17 UTC, Arnel Borja
none Details | Review

Description Arnel Borja 2014-04-28 11:53:19 UTC
The notification is updated but not shown when media art doesn't exists. This is because lookup in albumArtCache assumes that the item is an album, and retrieving it with full options fails.

Also, the path is being passed on to the callback even if it doesn't exist. Before, a None value will be returned for the path if it is not found.

Anyway, showing up the media art on the notification after lookup of the media art is a bad idea since this might take some seconds, causing a delay. Better to set this to a symbolic icon while looking up, ala Albums view.
Comment 1 Arnel Borja 2014-04-28 13:14:06 UTC
Created attachment 275345 [details] [review]
albumArtCache: Don't return path if doesn't exists

Since an invalid path is used by notification to know if the media art
is found, return None if it doesn't exists.
Comment 2 Arnel Borja 2014-04-28 13:15:12 UTC
Created attachment 275347 [details] [review]
albumArtCache: Fix full retrieve of song items

Check first if the item is a song before retrieving the item's thumbnail
with full options. The old code always assumes that the item is an
album. Then use a different query to retrieve the album if it is a song.
Comment 3 Arnel Borja 2014-04-28 13:17:06 UTC
Created attachment 275348 [details] [review]
notification: Don't lookup thumbnail

We could just use the thumbnail found by the player by connecting to
thumbnail-updated instead of looking it up again.

Also, serialize the default thumbnail on init which takes some seconds
to finish.

This removes the delay on the update of the notification when the media
art is not found.
Comment 4 Vadim Rutkovsky 2014-04-28 13:30:32 UTC
Pushed as https://git.gnome.org/browse/gnome-music/commit/?id=6001239