def populateFromTvdb(self, tvdb_instance, force_name=None): """Queries the tvdb_api.Tvdb instance for episode name and corrected series name. If series cannot be found, it will warn the user. If the episode is not found, it will use the corrected show name and not set an episode name. If the site is unreachable, it will warn the user. If the user aborts it will catch tvdb_api's user abort error and raise tvnamer's """ try: show = tvdb_instance[force_name or self.seriesname] except tvdb_error, errormsg: raise DataRetrievalError("Error contacting www.thetvdb.com: %s" % errormsg)
def populateFromTvdb(self, tvdb_instance, force_name=None, series_id=None): """Queries the tvdb_api.Tvdb instance for episode name and corrected series name. If series cannot be found, it will warn the user. If the episode is not found, it will use the corrected show name and not set an episode name. If the site is unreachable, it will warn the user. If the user aborts it will catch tvdb_api's user abort error and raise tvnamer's """ try: if series_id is None: show = tvdb_instance[force_name or self.seriesname] else: series_id = int(series_id) tvdb_instance._getShowData(series_id, Config['language']) show = tvdb_instance[series_id] except tvdb_error, errormsg: raise DataRetrievalError("Error with www.thetvdb.com: %s" % errormsg)