def processFile(tvdb_instance, episode): """Gets episode name, prompts user for input """ print "#" * 20 print "# Processing file: %s" % episode.fullfilename print "# Detected series: %s (season: %s, episode: %s)" % ( episode.seriesname, episode.seasonnumber, episode.episodenumber) try: correctedSeriesName, epName = getEpisodeName(tvdb_instance, episode) except (DataRetrievalError, ShowNotFound), errormsg: warn(errormsg)
def processFile(tvdb_instance, episode): """Gets episode name, prompts user for input """ print "#" * 20 print "# Processing file: %s" % episode.fullfilename print "# Detected series: %s (season: %s, episode: %s)" % ( episode.seriesname, episode.seasonnumber, ", ".join([str(x) for x in episode.episodenumbers])) try: correctedSeriesName, epName = getEpisodeName(tvdb_instance, episode) except (DataRetrievalError, ShowNotFound), errormsg: if Config['giveup_on_error']: warn("Skipping %s because: %s"%(episode.fullfilename,errormsg)) return else: warn(errormsg)
def processFile(tvdb_instance, episode): """Gets episode name, prompts user for input """ p("#" * 20) p("# Processing file: %s" % episode.fullfilename) if len(Config['input_filename_replacements']) > 0: replaced = applyCustomInputReplacements(episode.fullfilename) p("# With custom replacements: %s" % (replaced)) p("# Detected series: %s (%s)" % (episode.seriesname, episode.number_string())) try: correctedSeriesName, epName = getEpisodeName(tvdb_instance, episode) except (DataRetrievalError, ShowNotFound), errormsg: if Config['always_rename'] and Config['skip_file_on_error'] is True: warn("Skipping file due to error: %s" % errormsg) return else: warn(errormsg)