Exemple #1
0
    def scrobble(self, progress, app_version, app_date):
        """Scrobble this :class:`TVEpisode` via the TraktTV Api

        :param progress: % progress, integer 0-100. It is recommended to call
            the watching API every 15 minutes, then call the scrobble API near
            the end of the movie to lock it in.
        :param app_version: Version number of the media center, be as specific
            as you can including nightly build number, etc. Used to help debug
            your plugin.
        :param app_date: Build date of the media center. Used to help debug
            your plugin.
        """
        return Scrobbler(self, progress, app_version, app_date)
Exemple #2
0
    def scrobble(self, progress, app_version, app_date):
        """Notify trakt that the current user has finished watching a movie.
        This commits this :class:`Movie` to the current users profile. You
        should use movie/watching prior to calling this method.

        :param progress: % progress, integer 0-100. It is recommended to call
            the watching API every 15 minutes, then call the scrobble API near
            the end of the movie to lock it in.
        :param app_version: Version number of the media center, be as specific
            as you can including nightly build number, etc. Used to help debug
            your plugin.
        :param app_date: Build date of the media center. Used to help debug
            your plugin.
        """
        return Scrobbler(self, progress, app_version, app_date)
Exemple #3
0
def test_scrobble():
    """test the Scrobbler class's workflow"""
    guardians = Movie('Guardians of the Galaxy', year=2014)
    scrobbler = Scrobbler(guardians, 1.0, '1.0.0', '2015-02-01')
    scrobbler.start()
    scrobbler.update(50.0)
    scrobbler.pause()
    scrobbler.start()
    scrobbler.stop()
    scrobbler.start()
    scrobbler.finish()
Exemple #4
0
def test_scrobbler_context_manager():
    """test the Scrobbler when used as a context manager"""
    guardians = Movie('Guardians of the Galaxy', year=2014)
    with Scrobbler(guardians, 0.0, '1.0.0', '2015-02-01') as scrob:
        for i in range(10):
            scrob.update(i * 10)
Exemple #5
0
def test_scrobble():
    """test the Scrobbler class's workflow"""
    guardians = Movie('Guardians of the Galaxy', year=2014, foo='bar')
    scrobbler = Scrobbler(guardians, 1.0, '1.0.0', '2015-02-01')
    scrobbler.start()
    scrobbler.update(50.0)
    scrobbler.pause()
    scrobbler.start()
    scrobbler.stop()
    scrobbler.start()
    scrobbler.finish()
Exemple #6
0
def test_scrobble():
    """test the Scrobbler class's workflow"""
    guardians = Movie("Guardians of the Galaxy", year=2014)
    scrobbler = Scrobbler(guardians, 1.0, "1.0.0", "2015-02-01")
    scrobbler.start()
    scrobbler.update(50.0)
    scrobbler.pause()
    scrobbler.start()
    scrobbler.stop()
    scrobbler.start()
    scrobbler.finish()