Skip to content

Commit

Permalink
Re-add fixes from beetbox#2707
Browse files Browse the repository at this point in the history
  • Loading branch information
gdtwst committed Apr 7, 2019
1 parent ebed21f commit c41197c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions beetsplug/mpdstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ def on_play(self, status):
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

Expand All @@ -276,6 +272,14 @@ def on_play(self, status):
if diff <= self.time_threshold:
return

if self.now_playing['path'] == path and played == 0:
self.handle_song_change(self.now_playing)

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 = {
Expand Down

0 comments on commit c41197c

Please sign in to comment.