diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index d3e3aa95..fcaff6e9 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -176,7 +176,7 @@ class KATProvider(generic.TorrentProvider): ep_string = show_name + ' Season ' + str(ep_obj.airdate).split('-')[0] search_string['Season'].append(ep_string) elif ep_obj.show.anime: - ep_string = show_name + ' ' + "%d" % ep_obj.scene_absolute_number + ep_string = show_name + ' ' + "%02d" % ep_obj.scene_absolute_number search_string['Season'].append(ep_string) else: ep_string = show_name + ' S%02d' % int(ep_obj.scene_season) + ' -S%02d' % int( @@ -205,7 +205,7 @@ class KATProvider(generic.TorrentProvider): elif self.show.anime: for show_name in set(allPossibleShowNames(self.show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ - "%i" % int(ep_obj.scene_absolute_number) + "%02i" % int(ep_obj.scene_absolute_number) search_string['Episode'].append(ep_string) else: for show_name in set(allPossibleShowNames(self.show)): diff --git a/sickbeard/providers/thepiratebay.py b/sickbeard/providers/thepiratebay.py index eaf970f7..62c2966a 100644 --- a/sickbeard/providers/thepiratebay.py +++ b/sickbeard/providers/thepiratebay.py @@ -177,7 +177,7 @@ class ThePirateBayProvider(generic.TorrentProvider): ep_string = show_name + ' Season ' + str(ep_obj.airdate).split('-')[0] search_string['Season'].append(ep_string) elif ep_obj.show.anime: - ep_string = show_name + ' ' + "%d" % ep_obj.scene_absolute_number + ep_string = show_name + ' ' + "%02d" % ep_obj.scene_absolute_number search_string['Season'].append(ep_string) else: ep_string = show_name + ' S%02d' % int(ep_obj.scene_season) @@ -207,7 +207,7 @@ class ThePirateBayProvider(generic.TorrentProvider): elif self.show.anime: for show_name in set(allPossibleShowNames(self.show)): ep_string = sanitizeSceneName(show_name) + ' ' + \ - "%i" % int(ep_obj.scene_absolute_number) + "%02i" % int(ep_obj.scene_absolute_number) search_string['Episode'].append(ep_string) else: for show_name in set(allPossibleShowNames(self.show)): diff --git a/sickbeard/show_name_helpers.py b/sickbeard/show_name_helpers.py index 765890f6..f5df5d65 100644 --- a/sickbeard/show_name_helpers.py +++ b/sickbeard/show_name_helpers.py @@ -143,7 +143,7 @@ def makeSceneSeasonSearchString(show, ep_obj, extraSearchType=None): common.SNATCHED) and curQuality < highestBestQuality) or curStatus == common.WANTED: ab_number = episode.scene_absolute_number if ab_number > 0: - seasonStrings.append("%d" % ab_number) + seasonStrings.append("%02d" % ab_number) else: myDB = db.DBConnection() @@ -190,7 +190,7 @@ def makeSceneSearchString(show, ep_obj): if (show.air_by_date or show.sports) and ep_obj.airdate != datetime.date.fromordinal(1): epStrings = [str(ep_obj.airdate)] elif show.is_anime: - epStrings = ["%i" % int(ep_obj.scene_absolute_number)] + epStrings = ["%02i" % int(ep_obj.scene_absolute_number)] else: epStrings = ["S%02iE%02i" % (int(ep_obj.scene_season), int(ep_obj.scene_episode)), "%ix%02i" % (int(ep_obj.scene_season), int(ep_obj.scene_episode))]