diff --git a/plasmoid/package/contents/ui/main.qml b/plasmoid/package/contents/ui/main.qml index 22e5f1e05..3615df45f 100644 --- a/plasmoid/package/contents/ui/main.qml +++ b/plasmoid/package/contents/ui/main.qml @@ -873,7 +873,7 @@ Item { engine: "mpris2" connectedSources: sources function sourceNameForLauncherUrl(launcherUrl, pid) { - if (!launcherUrl || launcherUrl == "") { + if (!launcherUrl || launcherUrl === "") { return ""; } @@ -892,11 +892,11 @@ Item { } var sourceData = data[source]; - if (!sourceData || sourceData.DesktopEntry !== desktopFileName) { + if (!sourceData) { continue; } - if (pid === undefined || sourceData.InstancePid === pid) { + if (sourceData.DesktopEntry === desktopFileName || (pid && sourceData.InstancePid === pid)) { return source; }