summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2023-04-19 12:54:17 +0200
committerMarge Bot <marge-bot@gnome.org>2023-05-15 16:05:31 +0000
commit27617ef0a3187dc47669a889eea20f9396c7f3c5 (patch)
tree1f698da2402eae202801d06797429a90b1e6e964
parent35315a605b33f7e2d69350b3fa2235518c63f580 (diff)
downloadgnome-shell-27617ef0a3187dc47669a889eea20f9396c7f3c5.tar.gz
mpris: Fall back to app icon first
When no cover art is available, the app icon at least allows distinguishing between different players, so try falling back to that before using the generic icon name. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2755>
-rw-r--r--js/ui/mpris.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/ui/mpris.js b/js/ui/mpris.js
index 93d1ec68b..2ccd0c44b 100644
--- a/js/ui/mpris.js
+++ b/js/ui/mpris.js
@@ -70,6 +70,9 @@ class MediaMessage extends MessageList.Message {
let file = Gio.File.new_for_uri(this._player.trackCoverUrl);
this._icon.gicon = new Gio.FileIcon({ file });
this._icon.remove_style_class_name('fallback');
+ } else if (this._player.app) {
+ this._icon.gicon = this._player.app.icon;
+ this._icon.add_style_class_name('fallback');
} else {
this._icon.icon_name = 'audio-x-generic-symbolic';
this._icon.add_style_class_name('fallback');