Exemplo n.º 1
0
 def movie(self, imdb, title, year):
     try:
         url = self.__search(title, 'filme', year)
         if not url:
             title = cleantitle.local(title, imdb, 'de-DE')
             url = self.__search(title, 'filme', year)
         return url
     except:
         return
Exemplo n.º 2
0
 def tvshow(self, imdb, tvdb, tvshowtitle, year):
     try:
         url = self.__search(tvshowtitle)
         if not url:
             title = cleantitle.local(tvshowtitle, imdb, 'de-DE')
             url = self.__search(title)
         return url
     except:
         return
Exemplo n.º 3
0
 def movie(self, imdb, title, year):
     try:
         url = self.__search(self.search_link_mv, imdb, title)
         if not url:
             title = cleantitle.local(title, imdb, 'de-DE')
             url = self.__search(self.search_link_mv, imdb, title)
         return url
     except:
         return
Exemplo n.º 4
0
 def movie(self, imdb, title, year):
     try:
         url = self.__search(imdb, title, year)
         if not url:
             title = cleantitle.local(title, imdb, 'de-DE')
             url = self.__search(imdb, title, year)
         if url:
             return urllib.urlencode({'url': url})
     except:
         return
Exemplo n.º 5
0
    def tvshow(self, imdb, tvdb, tvshowtitle, year):
        try:
            t = cleantitle.get(tvshowtitle)
            j_c = self.__get_json("series")
            j = [i['id'] for i in j_c if t == cleantitle.get(i["series"])]
            if len(j) == 0:
                t = cleantitle.get(cleantitle.local(tvshowtitle, imdb,
                                                    'de-DE'))
                j = [i['id'] for i in j_c if t == cleantitle.get(i["series"])]

            return 'series/%s/' % j[0]
        except:
            return
Exemplo n.º 6
0
    def episode(self, url, imdb, tvdb, title, premiered, season, episode):
        try:
            if url == None:
                return

            data = urlparse.parse_qs(url)
            data = dict([(i, data[i][0]) if data[i] else (i, '')
                         for i in data])
            title = data['tvshowtitle'] if 'tvshowtitle' in data else data[
                'title']

            return self.__search(cleantitle.local(title, imdb, 'de-DE'), 'tv',
                                 data['year'], season, episode)
        except:
            return
Exemplo n.º 7
0
    def episode(self, url, imdb, tvdb, title, premiered, season, episode):
        try:
            if url == None:
                return

            data = urlparse.parse_qs(url)
            data = dict([(i, data[i][0]) if data[i] else (i, '')
                         for i in data])
            title = data['tvshowtitle']
            title += ' S%02dE%02d' % (int(season), int(episode))

            url = self.__search(title)
            if not url:
                title = cleantitle.local(title, imdb, 'de-DE')
                title += ' S%02dE%02d' % (int(season), int(episode))
                url = self.__search(title)
            return url
        except:
            return