Beispiel #1
0
    def getInfo(self, identifier=None):

        if self.isInfoDisabled():
            return {}

        if not identifier:
            return {}

        cache_key = 'tmdb.cache.%s' % identifier
        result = self.getCache(cache_key)

        if not result:
            result = {}
            movie = None

            try:
                log.debug('Getting info: %s', cache_key)
                movie = tmdb.imdbLookup(id=identifier)
            except:
                pass

            if movie:
                result = self.parseMovie(movie[0])
                self.setCache(cache_key, result)

        return result
Beispiel #2
0
    def getInfo(self, identifier = None):
        result = {}

        movie = tmdb.imdbLookup(id = identifier)[0]

        if movie:
            result = self.parseMovie(movie)

        return result
Beispiel #3
0
    def getInfo(self, identifier=None):
        result = {}

        movie = tmdb.imdbLookup(id=identifier)[0]

        if movie:
            result = self.parseMovie(movie)

        return result
Beispiel #4
0
    def getInfo(self, identifier=None):

        cache_key = "tmdb.cache.%s" % identifier
        result = self.getCache(cache_key)

        if not result:
            result = {}
            movie = None

            try:
                log.debug("Getting info: %s" % cache_key)
                movie = tmdb.imdbLookup(id=identifier)
            except:
                pass

            if movie:
                result = self.parseMovie(movie[0])
                self.setCache(cache_key, result)

        return result