diff --git a/app/music.py b/app/music.py index e580315..f7402e2 100644 --- a/app/music.py +++ b/app/music.py @@ -86,12 +86,18 @@ class Music: self.player.play() def playing(self): - "Return True if currently playing a track, else False" + """ + Return True if currently playing a track, else False + + vlc.is_playing() returns True if track was faded out. + get_position seems more reliable. + """ if self.player: - return self.player.is_playing() - else: - return False + if self.player.get_position() > 0 and self.player.is_playing(): + return True + + return False def set_position(self, ms): "Set current play time in milliseconds from start"