Esempio n. 1
0
 def testTVShowDetection(self):
     tv_shows = ["True.Detective.S01.E01", "True Detective S01E01"]
     expected_output = [("True Detective", '1', '1'),
                        ("True Detective", '1', '1')]
     for i, tv_show in enumerate(tv_shows):
         ret = utilities.detectSearchParams(tv_show)
         self.assertTrue((ret[2], ret[3], ret[4]) == expected_output[i],
                         str((ret[2], ret[3], ret[4])) + " != " +
                         str(expected_output[i]))
Esempio n. 2
0
 def getSubtitlesSimple(self,
                        updateCB=None,
                        title=None,
                        filepath=None,
                        langs=None):
     title, year, tvshow, season, episode = detectSearchParams(title
                                                               or filepath)
     seekers = self.getProviders(langs)
     return self.getSubtitles(seekers, updateCB, title, filepath, langs,
                              year, tvshow, season, episode)
Esempio n. 3
0
 def  testTVShowDetection(self):
     tv_shows = ["True.Detective.S01.E01","True Detective S01E01"]
     expected_output=[("True Detective", '1', '1'),("True Detective",'1','1')]
     for i, tv_show in enumerate(tv_shows):
         ret = utilities.detectSearchParams(tv_show)
         self.assertTrue((ret[2],ret[3],ret[4]) == expected_output[i], str((ret[2],ret[3],ret[4])) +" != "+str(expected_output[i]))
Esempio n. 4
0
 def getSubtitlesSimple(self, updateCB=None, title=None, filepath=None, langs=None):
     title, year, tvshow, season, episode = detectSearchParams(title or filepath)
     seekers = self.getProviders(langs)
     return self.getSubtitles(seekers, updateCB, title, filepath, langs, year, tvshow, season, episode)