mpris: Use player Identity if the player app isn't known

For players that don't match to an app, we can still do better than
the generic fallback if the client provides a valid `Identity` value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3103>
This commit is contained in:
Julian Sparber 2024-01-26 16:44:29 +01:00 committed by Marge Bot
parent 8fdea10e33
commit c5cd195506
2 changed files with 2 additions and 1 deletions

View File

@ -3,5 +3,6 @@
<method name="Raise"/> <method name="Raise"/>
<property name="CanRaise" type="b" access="read"/> <property name="CanRaise" type="b" access="read"/>
<property name="DesktopEntry" type="s" access="read"/> <property name="DesktopEntry" type="s" access="read"/>
<property name="Identity" type="s" access="read"/>
</interface> </interface>
</node> </node>

View File

@ -227,7 +227,7 @@ export class MprisPlayer extends Signals.EventEmitter {
} }
this.source.set({ this.source.set({
title: this._app?.get_name() ?? null, title: this._app?.get_name() ?? this._mprisProxy.Identity,
icon: this._app?.get_icon() ?? null, icon: this._app?.get_icon() ?? null,
}); });