Fix media skip OSD metadata
This commit is contained in:
1 parent
b043a9f90e
commit
91ee7f20fc
3 files changed
+68
-1
No files matched your search
@@ -93,6 +93,20 @@ function playerKey(player) {
|
||||
return String(player.dbusName || player.desktopEntry || player.identity || "")
|
||||
}
|
||||
|
||||
function trackSignature(player) {
|
||||
if (!player) return ""
|
||||
return [
|
||||
player.trackTitle || "",
|
||||
player.trackArtist || "",
|
||||
player.trackAlbum || "",
|
||||
player.trackArtUrl || ""
|
||||
].join("\u001f")
|
||||
}
|
||||
|
||||
function trackChanged(previousSignature, player) {
|
||||
return trackSignature(player) !== String(previousSignature || "")
|
||||
}
|
||||
|
||||
function labelFor(player) {
|
||||
if (!player) return ""
|
||||
return player.trackTitle || player.identity || player.desktopEntry || ""
|
||||
@@ -120,6 +134,8 @@ if (typeof module !== "undefined") {
|
||||
playerAppLabel: playerAppLabel,
|
||||
playerHasPlaybackStream: playerHasPlaybackStream,
|
||||
playerKey: playerKey,
|
||||
trackSignature: trackSignature,
|
||||
trackChanged: trackChanged,
|
||||
labelFor: labelFor,
|
||||
osdMessage: osdMessage
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user