From 5f9a9b8b0ba50dcb5f47233df9e7123ed37501ad Mon Sep 17 00:00:00 2001 From: Conor Curran Date: Thu, 3 May 2012 15:05:51 -0700 Subject: be explicit in handling ardour --- src/music-player-bridge.vala | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/music-player-bridge.vala b/src/music-player-bridge.vala index bd69668..5b9afea 100644 --- a/src/music-player-bridge.vala +++ b/src/music-player-bridge.vala @@ -278,14 +278,20 @@ public class MusicPlayerBridge : GLib.Object */ private static string? determine_key(owned string desktop_or_interface) { + // handle the special case of amarok, (kde4-amarok desktop file name) + if (desktop_or_interface.contains("amarok")){ + return "amarok"; + } + var result = desktop_or_interface; + var tokens = desktop_or_interface.split( "." ); if (tokens != null && tokens.length > 1){ result = tokens[tokens.length - 1]; - } + } var temp = result.split("-"); if (temp != null && temp.length > 1){ - result = temp[1]; + result = temp[0]; } return result; } -- cgit v1.2.3