add check if spotify is ready to avoid warning in logs
This commit is contained in:
parent
e6b0bda07f
commit
9c39259de4
@ -16,7 +16,6 @@ Rectangle {
|
||||
|
||||
function getSpotify() {
|
||||
for (var i = 0; i < Mpris.players.values.length; i++) {
|
||||
console.log(Mpris.players.values[i].identity);
|
||||
if (Mpris.players.values[i].identity == "spotify" || "Spotify") {
|
||||
return Mpris.players.values[i];
|
||||
}
|
||||
@ -26,6 +25,6 @@ Rectangle {
|
||||
CText {
|
||||
id: playingSong
|
||||
anchors.centerIn: parent
|
||||
text: root.spotify.trackTitle + " - " + root.spotify.trackArtist
|
||||
text: root.spotify == null ? "" : root.spotify.trackTitle + " - " + root.spotify.trackArtist
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user