update play time in base backend seek command

This commit is contained in:
Johannes Knutsen 2010-08-14 01:45:05 +02:00
parent f312d79261
commit 2d13485a21
2 changed files with 4 additions and 2 deletions

View File

@ -373,7 +373,9 @@ class BasePlaybackController(object):
self._seek(time_position)
def _seek(self, time_position):
raise NotImplementedError
time_position_ms = int(time_position) * 1000
self._play_time_started = (self._current_wall_time - time_position_ms)
self._play_time_accumulated = time_position_ms
def stop(self):
"""Stop playing."""

View File

@ -126,7 +126,7 @@ class LibspotifyPlaybackController(BasePlaybackController):
seek_to_ms = int(time_position) * 1000
result = self.backend.spotify.session.seek(seek_to_ms)
self._set_output_state('PLAYING')
return True
super(LibspotifyPlaybackController, self)._seek(time_position)
def _stop(self):
result = self._set_output_state('READY')