def search_subtitles( file_original_path, title, tvshow, year, season, episode, set_temp, rar, language1, language2, language3, stack ): #standard input subtitles_list = [] msg = "" log(__name__, "Search GomTV with a file name, "+file_original_path) movieFullPath = xbmc.Player().getPlayingFile() video_hash = hashFileMD5( movieFullPath, buff_size=1024*1024 ) if video_hash is None: msg = _(755) return subtitles_list, "", msg #standard output webService = GomTvWebService() if len(tvshow) > 0: # TvShow OS_search_string = ("%s S%.2dE%.2d" % (tvshow, int(season), int(episode),) ).replace(" ","+") else: # Movie or not in Library if str(year) == "": # Not in Library title, year = xbmc.getCleanMovieTitle( title ) else: # Movie in Library year = year title = title OS_search_string = title.replace(" ","+") subtitles_list = webService.SearchSubtitlesFromTitle( OS_search_string ,video_hash) log(__name__, "Found %d subtitles in GomTV" %len(subtitles_list)) return subtitles_list, "", msg #standard output
def search_subtitles( file_original_path, title, tvshow, year, season, episode, set_temp, rar, language1, language2, language3, stack ): #standard input subtitles_list = [] msg = "" log(__name__, "Search GomTV with a file name, "+file_original_path) video_hash = hashFileMD5( file_original_path, buff_size=1024*1024 ) if video_hash is None: msg = _(755) return subtitles_list, "", msg #standard output webService = GomTvWebService() subtitles_list = webService.SearchSubtitles( video_hash ) log(__name__, "Found %d subtitles in GomTV" %len(subtitles_list)) return subtitles_list, "", msg #standard output