Skip to content

Commit a24cc57

Browse files
committed
Merge branch 'scrobble-response'
Merged moogar0880/PyTrakt#196
2 parents edb257e + 350a530 commit a24cc57

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

trakt/sync.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,15 +459,15 @@ def __init__(self, media, progress, app_version, app_date):
459459

460460
def start(self):
461461
"""Start scrobbling this :class:`Scrobbler`'s *media* object"""
462-
self._post('scrobble/start')
462+
return self._post('scrobble/start')
463463

464464
def pause(self):
465465
"""Pause the scrobbling of this :class:`Scrobbler`'s *media* object"""
466-
self._post('scrobble/pause')
466+
return self._post('scrobble/pause')
467467

468468
def stop(self):
469469
"""Stop the scrobbling of this :class:`Scrobbler`'s *media* object"""
470-
self._post('scrobble/stop')
470+
return self._post('scrobble/stop')
471471

472472
def finish(self):
473473
"""Complete the scrobbling this :class:`Scrobbler`'s *media* object"""
@@ -480,7 +480,7 @@ def update(self, progress):
480480
object
481481
"""
482482
self.progress = progress
483-
self.start()
483+
return self.start()
484484

485485
@post
486486
def _post(self, uri):
@@ -491,7 +491,8 @@ def _post(self, uri):
491491
payload = dict(progress=self.progress, app_version=self.version,
492492
date=self.date)
493493
payload.update(self.media.to_json_singular())
494-
yield uri, payload
494+
response = yield uri, payload
495+
yield response
495496

496497
def __enter__(self):
497498
"""Context manager support for `with Scrobbler` syntax. Begins

0 commit comments

Comments
 (0)