Skip to content

Commit

Permalink
fix like button in MPRIS
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jan 27, 2024
1 parent 9dcf83f commit 0b872f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ovos_media/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ def update_seekbar_capabilities(self):
self["canPause"] = self.player.state == PlayerState.PLAYING
self["canPrev"] = self.player.can_prev
self["canNext"] = self.player.can_next
self["isLike"] = self.player.now_playing.original_uri in self.player.media.liked_songs
self["isLike"] = self.player.now_playing.original_uri in self.player.media.liked_songs and\
self.player.now_playing.playback != PlaybackType.MPRIS

if self.player.loop_state == LoopState.NONE:
self["loopStatus"] = "None"
Expand Down
1 change: 1 addition & 0 deletions ovos_media/player.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ def handle_MPRIS_takeover(self):
self.video_service.stop()
self.web_service.stop()
self.stop_skill()
self.now_playing.original_uri = ""

def stop_skill(self):
"""
Expand Down
4 changes: 4 additions & 0 deletions ovos_media/qt5/OVOSSyncPlayer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ Mycroft.Delegate {
property bool horizontalMode: sessionData.horizontal


onTitleChanged: {
likeIcon.visible = sessionData.isLike
}

onFocusChanged: {
if (focus) {
playButton.forceActiveFocus()
Expand Down

0 comments on commit 0b872f9

Please sign in to comment.