From eb338d208be0698de95c35f7d19fd95b9e91a9f7 Mon Sep 17 00:00:00 2001 From: gdtwst Date: Wed, 4 Oct 2017 16:35:22 +0700 Subject: [PATCH] Register song changes when switching from song to stream URL --- beetsplug/mpdstats.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/beetsplug/mpdstats.py b/beetsplug/mpdstats.py index bcc3da808..11fb44e4d 100644 --- a/beetsplug/mpdstats.py +++ b/beetsplug/mpdstats.py @@ -256,10 +256,6 @@ class MPDStats(object): if not path: return - if is_url(path): - self._log.info(u'playing stream {0}', displayable_path(path)) - return - played, duration = map(int, status['time'].split(':', 1)) remaining = duration - played @@ -276,6 +272,11 @@ class MPDStats(object): if diff <= self.time_threshold: return + if is_url(path): + self._log.info(u'playing stream {0}', displayable_path(path)) + self.now_playing = None + return + self._log.info(u'playing {0}', displayable_path(path)) self.now_playing = {