diff options
Diffstat (limited to 'src/media-player-list.vala')
-rw-r--r-- | src/media-player-list.vala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/media-player-list.vala b/src/media-player-list.vala index 203c69e..6d37b4d 100644 --- a/src/media-player-list.vala +++ b/src/media-player-list.vala @@ -57,12 +57,13 @@ public class MediaPlayerList { * Adds the player associated with @desktop_id. Does nothing if such a player already exists. */ public MediaPlayer? insert (string desktop_id) { - MediaPlayer? player = this._players.lookup (desktop_id); + var id = desktop_id.has_suffix (".desktop") ? desktop_id : desktop_id + ".desktop"; + MediaPlayer? player = this._players.lookup (id); if (player == null) { - var appinfo = new DesktopAppInfo (desktop_id.has_suffix (".desktop") ? desktop_id : desktop_id + ".desktop"); + var appinfo = new DesktopAppInfo (id); if (appinfo == null) { - warning ("unable to find application '%s'", desktop_id); + warning ("unable to find application '%s'", id); return null; } |