Skip to content

Commit

Permalink
Feature: Add progress parameter to Scrobbler methods (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc authored Oct 30, 2022
2 parents 76760b5 + db50999 commit f27ea2f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions trakt/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,16 +459,22 @@ def __init__(self, media, progress, app_version, app_date):
if self.progress > 0:
self.start()

def start(self):
def start(self, progress=None):
"""Start scrobbling this :class:`Scrobbler`'s *media* object"""
if progress is not None:
self.progress = progress
return self._post('scrobble/start')

def pause(self):
def pause(self, progress=None):
"""Pause the scrobbling of this :class:`Scrobbler`'s *media* object"""
if progress is not None:
self.progress = progress
return self._post('scrobble/pause')

def stop(self):
def stop(self, progress=None):
"""Stop the scrobbling of this :class:`Scrobbler`'s *media* object"""
if progress is not None:
self.progress = progress
return self._post('scrobble/stop')

def finish(self):
Expand Down

0 comments on commit f27ea2f

Please sign in to comment.