From 5e8682cc51d751bef70c7e7a795f91ac9be9ed24 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sun, 7 Aug 2016 09:24:45 +0200 Subject: [PATCH] audio: Address my own comments on PR#1538 --- docs/changelog.rst | 3 ++- mopidy/audio/actor.py | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index a13baa3d..84bac249 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -36,7 +36,8 @@ Bug fix release. - Audio: Ensure audio tags are never ``None``. (Fixes: :issue:`1449`) - Audio: Update :meth:`mopidy.audio.Audio.set_metadata` to postpone sending - tags if there is a pending track change. (Fixes: :issue:`1357`) + tags if there is a pending track change. (Fixes: :issue:`1357`, PR: + :issue:`1538`) - Core: Avoid endless loop if all tracks in the tracklist are unplayable and consume mode is off. (Fixes: :issue:`1221`, :issue:`1454`, PR: :issue:`1455`) diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index f96834e7..6020bc1b 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -805,11 +805,14 @@ class Audio(pykka.ThreadingActor): if track.album and track.album.name: set_value(Gst.TAG_ALBUM, track.album.name) + gst_logger.debug( + 'Sending TAG event for track %r: %r', + track.uri, taglist.to_string()) event = Gst.Event.new_tag(taglist) - if not self._pending_uri: - self._playbin.send_event(event) - else: + if self._pending_uri: self._pending_metadata = event + else: + self._playbin.send_event(event) def get_current_tags(self): """