Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/legacy_playlist_queue #227

Merged
merged 1 commit into from
May 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions ovos_plugin_manager/templates/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,10 @@ def add_list(self, tracks):
tracks = [tracks]
elif not isinstance(tracks, list):
raise ValueError
if tracks:
if tracks and not self._tracks:
self.load_track(tracks[0])
self._idx = 0
else:
LOG.error("called add_list without tracks!")
self._tracks = tracks
self._tracks += tracks

def next(self):
"""Skip to next track in playlist."""
Expand Down Expand Up @@ -340,7 +338,7 @@ def load_track(self, uri):
self._now_playing = uri
LOG.debug(f"queuing for {self.__class__.__name__} playback: {uri}")
self.bus.emit(Message("ovos.common_play.media.state",
{"state": MediaState.LOADED_MEDIA}))
{"state": MediaState.LOADING_MEDIA}))
self.bus.emit(Message("ovos.common_play.track.state", {
"state": TrackState.QUEUED_AUDIOSERVICE
}))
Expand Down
Loading