def get_torrent_search_strings(self, season, episode): """ returns several different season/episode/series patterns to search for """ search_strings = [] if episode == -1: search_expressions = ["season %s", "series %s"] for expression in search_expressions: search_strings.append(expression % (season)) else: search_expressions = ["s%se%s"] for expression in search_expressions: search_strings.append(expression % (formatting.format_number(season), formatting.format_number(episode))) return search_strings
def get_save_path(self, show, season, episode): return self.config.save_dir + show.replace(" ", "_") + "_s" + formatting.format_number(season) + "e" + formatting.format_number(episode)
def test_can_format_number_as_string(self): single = formatting.format_number(2) self.assertEqual("02", single)