コード例 #1
0
def getSeasonIndicators(imdb, refresh=False):
	try:
		if traktIndicators:
			if not refresh: timeout = 720
			if trakt.getWatchedActivity() < trakt.timeoutsyncSeason(imdb=imdb): timeout = 720
			else: timeout = 0
			indicators = trakt.cachesyncSeason(imdb=imdb, timeout=timeout)
			return indicators
		else:
			from metahandler import metahandlers
			indicators = metahandlers.MetaData()
			return indicators
	except:
		log_utils.error()
コード例 #2
0
def getTVShowIndicators(refresh=False):
	try:
		if traktIndicators:
			if not refresh: timeout = 720
			elif trakt.getWatchedActivity() < trakt.timeoutsyncTVShows(): timeout = 720
			else: timeout = 0
			indicators = trakt.cachesyncTVShows(timeout=timeout)
			return indicators
		else:
			from metahandler import metahandlers
			indicators = metahandlers.MetaData()
			return indicators
	except:
		log_utils.error()
コード例 #3
0
def getMovieIndicators(refresh=False):
	try:
		if traktIndicators:
			if not refresh: timeout = 720
			elif trakt.getWatchedActivity() < trakt.timeoutsyncMovies(): timeout = 720
			else: timeout = 0
			indicators = trakt.cachesyncMovies(timeout=timeout)
			return indicators
		else:
			from metahandler import metahandlers
			# indicators = metahandlers.MetaData()
			indicators = metahandlers.MetaData(tmdb_api_key, omdb_api_key, tvdb_api_key)
			return indicators
	except:
		log_utils.error()
コード例 #4
0
def getSeasonIndicators(imdb, refresh=False):
	try:
		if traktIndicators:
			if not refresh: timeout = 720
			if trakt.getWatchedActivity() < trakt.timeoutsyncSeason(imdb=imdb): timeout = 720
			else: timeout = 0
			indicators = trakt.cachesyncSeason(imdb=imdb, timeout=timeout)
			return indicators
		else:
			check_metahandler()
			indicators = metahandlers.MetaData(tmdb_api_key, omdb_api_key, tvdb_api_key)
			return indicators
	except:
		from resources.lib.modules import log_utils
		log_utils.error()
コード例 #5
0
def getTVShowIndicators(refresh=False):
    try:
        if trakt.getTraktIndicatorsInfo() == True: raise Exception()
        from metahandler import metahandlers
        indicators = metahandlers.MetaData(preparezip=False)
        return indicators
    except:
        pass
    try:
        if trakt.getTraktIndicatorsInfo() == False: raise Exception()
        if refresh == False: timeout = 720
        elif trakt.getWatchedActivity() < trakt.timeoutsyncTVShows(): timeout = 720
        else: timeout = 0
        indicators = trakt.cachesyncTVShows(timeout=timeout)
        return indicators
    except:
        pass
コード例 #6
0
def getSeasonIndicators(imdb, refresh=False):
	try:
		if traktIndicators is True:
			if refresh is False:
				timeout = 720
			elif trakt.getWatchedActivity() < trakt.timeoutsyncSeason(imdb = imdb):
				timeout = 720
			else:
				timeout = 0
			indicators = trakt.cachesyncSeason(imdb = imdb, timeout = timeout)
			return indicators
		else:
			from metahandler import metahandlers
			indicators = metahandlers.MetaData()
			return indicators
	except:
		pass
コード例 #7
0
ファイル: playcount.py プロジェクト: varunrai/Masterani-Redux
def getMovieIndicators(refresh=False):
    try:
        if trakt.getTraktIndicatorsInfo() == True: raise Exception()
        from metahandler import metahandlers
        indicators = metahandlers.MetaData(preparezip=False, tmdb_api_key='f3248106719173ab34be38966164050d')
        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
コード例 #8
0
ファイル: playcount.py プロジェクト: TheProphet1/Prophet
def getMovieIndicators(refresh=False):
#    try:
#        if trakt.getTraktIndicatorsInfo() == True: raise Exception()
#        from metahandler import metahandlers
#        indicators = metahandlers.MetaData()
#        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
コード例 #9
0
def getMovieIndicators(refresh=False):
	try:
		if traktIndicators is True:
			if refresh is False:
				timeout = 720
			elif trakt.getWatchedActivity() < trakt.timeoutsyncMovies():
				timeout = 720
			else:
				timeout = 0
			indicators = trakt.cachesyncMovies(timeout = timeout)
			return indicators
		else:
			from metahandler import metahandlers
			indicators = metahandlers.MetaData()
			return indicators
	except:
		log_utils.error()
		pass
コード例 #10
0
def getTVShowIndicators(refresh=False):
    # try:
    # if trakt.getTraktIndicatorsInfo() == True: raise Exception()
    # indicators_ = bookmarks._indicators()
    # return indicators_
    # except:
    # pass
    try:
        if trakt.getTraktIndicatorsInfo() == False: raise Exception()
        if refresh == False: timeout = 720
        elif trakt.getWatchedActivity() < trakt.timeoutsyncTVShows():
            timeout = 720
        else:
            timeout = 0
        indicators_ = trakt.cachesyncTVShows(timeout=timeout)
        return indicators_
    except:
        pass
コード例 #11
0
def getSeasonIndicators(imdb, refresh=False):
    try:
        if trakt.getTraktIndicatorsInfo() is True: raise Exception()
        from metahandler import metahandlers
        indicators = metahandlers.MetaData(preparezip=False)
        return indicators
    except:
        pass
    try:
        if trakt.getTraktIndicatorsInfo() is False: raise Exception()
        if refresh is False:
            timeout = 720
        elif trakt.getWatchedActivity() < trakt.timeoutsyncSeason(imdb=imdb):
            timeout = 720
        else:
            timeout = 0
        indicators = trakt.cachesyncSeason(imdb=imdb, timeout=timeout)
        return indicators
    except:
        pass
コード例 #12
0
def getMovieIndicators(refresh=False):
    try:
        if trakt.getTraktIndicatorsInfo() == True: raise Exception()
        from metahandler import metahandlers
        indicators = metahandlers.MetaData(
            preparezip=False, tmdb_api_key='f3248106719173ab34be38966164050d')
        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