Beispiel #1
0
 def tvshow(self, imdb, tvdb, tvshowtitle, localtvshowtitle, aliases, year):
     url = self.__search([localtvshowtitle] +
                         source_utils.aliases_to_array(aliases), year)
     if not url and localtvshowtitle != tvshowtitle:
         url = self.__search([tvshowtitle] +
                             source_utils.aliases_to_array(aliases), year)
     return url
Beispiel #2
0
    def movie(self, imdb, title, localtitle, aliases, year):

        try:
            url = self.__search([localtitle] + source_utils.aliases_to_array(aliases), year)
            if not url and title != localtitle: url = self.__search([title] + source_utils.aliases_to_array(aliases), year)
            return url
        except:
            return
Beispiel #3
0
    def episode(self, url, imdb, tvdb, title, premiered, season, episode):
        try:
            if not url:
                return

            data = urlparse.parse_qs(url)
            data = dict([(i, data[i][0]) if data[i] else (i, '')
                         for i in data])
            tvshowtitle = data['tvshowtitle']
            aliases = source_utils.aliases_to_array(eval(data['aliases']))
            aliases.append(data['localtvshowtitle'])
            url = self.__search([tvshowtitle] + aliases, data['year'], season,
                                episode)
            if not url: return
            return url
        except:
            return