Beispiel #1
0
def markMovieDuringPlayback(watched , imdb=None, tmdb=None,  refresh=False):
    try:
        if not control.setting('trakt.scrobbleMovies') == 'true': raise Exception() 
        if trakt.getTraktIndicatorsInfo() == False: raise Exception()
        
        if int(watched) == 7: 
            # AVOID DUPLICATE WATCHING
            indicators = getMovieIndicators(refresh=True)
            overlay = int(getMovieOverlay(indicators, imdb=imdb, tmdb=tmdb, traktOnly=True))
            if overlay == 7: raise Exception()
            
            trakt.markMovieAsWatched(imdb=imdb, tmdb=tmdb)
        else: 

            trakt.markMovieAsNotWatched(imdb=imdb, tmdb=tmdb)
        trakt.cachesyncMovies()
    except:
        pass
    try:
        type = 'movie'
        action = str(watched)
        meta = {'imdb': imdb, 'tmdb': tmdb} 
        playcountMeta(type, meta, action)
    except:
        pass
    if refresh== True: control.refresh()
Beispiel #2
0
def movies(imdb, watched):
    # control.busy()
    try:
        if not control.setting('trakt.scrobbleMovies') == 'true': raise Exception()	
        if trakt.getTraktIndicatorsInfo() == False: raise Exception()
        if int(watched) == 7: trakt.markMovieAsWatched(imdb)
        else: trakt.markMovieAsNotWatched(imdb)
        trakt.cachesyncMovies()
    except:
        pass

    try:
        type = 'movie'
        action = str(watched)
        meta = {'imdb': imdb, 'tmdb':imdb} 
        playcountMeta(type, meta, action)
    except:
        pass
Beispiel #3
0
def getMovieIndicators(refresh=False):
    try:
        if trakt.getTraktIndicatorsInfo() == True: raise Exception()
        indicators = playcountMeta
        return indicators
    except:
        pass
    try:
        if trakt.getTraktIndicatorsInfo() == False: raise Exception()
        if refresh == False: timeout = 720
        elif trakt.getWatchedActivity() < trakt.timeoutsyncMovies(): timeout = 720
        else: timeout = 0
        indicators = trakt.cachesyncMovies(timeout=timeout)
        return indicators
    except:
        pass
Beispiel #4
0
def getMovieIndicators(refresh=False):
    try:
        if trakt.getTraktIndicatorsInfo() == True: raise Exception()
        indicators = playcountMeta
        return indicators
    except:
        pass
    try:
        if trakt.getTraktIndicatorsInfo() == False: raise Exception()
        print ("TRAKT MOVIES")
        if refresh == False: timeout = 720
        elif int(trakt.getWatchedActivity()) < int(trakt.timeoutsyncMovies()): timeout = 720
        else: timeout = 0
        print ("TRAKT TIMEOUT", timeout)
        indicators = trakt.cachesyncMovies(timeout=timeout)
        return indicators
    except:
        pass