From 27617ef0a3187dc47669a889eea20f9396c7f3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 19 Apr 2023 12:54:17 +0200 Subject: [PATCH] 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: --- js/ui/mpris.js | 3 +++ 1 file changed, 3 insertions(+) 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');