mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 22:06:34 +00:00
Fix when showing covers for media player card
This commit is contained in:
parent
e2a03cb6fd
commit
968deae5b2
@ -324,14 +324,10 @@ Polymer({
|
||||
var cls = 'banner';
|
||||
|
||||
if (playerObj.isOff || playerObj.isIdle) {
|
||||
cls += ' is-off';
|
||||
}
|
||||
|
||||
if (!playerObj.stateObj.attributes.entity_picture) {
|
||||
cls += ' is-off no-cover';
|
||||
} else if (!playerObj.stateObj.attributes.entity_picture) {
|
||||
cls += ' no-cover';
|
||||
}
|
||||
|
||||
if (playerObj.stateObj.attributes.media_content_type === 'music') {
|
||||
} else if (playerObj.stateObj.attributes.media_content_type === 'music') {
|
||||
cls += ' content-type-music';
|
||||
}
|
||||
|
||||
@ -349,16 +345,12 @@ Polymer({
|
||||
computePlaybackControlIcon: function (playerObj) {
|
||||
if (playerObj.isPlaying) {
|
||||
return playerObj.supportsPause ? 'mdi:pause' : 'mdi:stop';
|
||||
} else if (playerObj.isPaused || playerObj.isOff) {
|
||||
} else if (playerObj.isPaused || playerObj.isOff || playerObj.isIdle) {
|
||||
return 'mdi:play';
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
||||
computeShowControls: function (playerObj) {
|
||||
return !playerObj.isOff;
|
||||
},
|
||||
|
||||
handleNext: function (ev) {
|
||||
ev.stopPropagation();
|
||||
this.playerObj.nextTrack();
|
||||
|
Loading…
x
Reference in New Issue
Block a user