This commit is contained in:
1 parent
58a2dedc03
commit
4dd7e298a5
5 files changed
+103
-6
No files matched your search
+7
-1
@@ -453,7 +453,13 @@ class Controller:
|
||||
# Kept while paused, so the card does not jump about
|
||||
# under the thumb that just pressed pause.
|
||||
if room["play_state"] != "stop":
|
||||
room["now_playing"] = self._track(media)
|
||||
track = self._track(media)
|
||||
if track is not None:
|
||||
progress = self.heos.progress_for(self.playback_pid(key))
|
||||
if progress and progress["duration"]:
|
||||
track["position_ms"] = progress["cur_pos"]
|
||||
track["duration_ms"] = progress["duration"]
|
||||
room["now_playing"] = track
|
||||
except (TargetError, HeosError, KeyError) as exc:
|
||||
room["available"] = False
|
||||
room["error"] = str(exc)
|
||||
|
||||
Reference in new issue
Block a user