diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index dbade510..635f83eb 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -264,10 +264,10 @@ class GenericProvider: logger.log(u'Searching "%s" for "%s" as "%s"' % (self.name, ep_obj.prettyName(), ep_obj.scene_prettyName())) if seasonSearch: - for curString in self._get_season_search_strings(ep_obj.scene_season, ep_obj.scene_episode): + for curString in self._get_season_search_strings(ep_obj.scene_season, ep_obj.airdate if show.air_by_date or show.sports else ep_obj.scene_episode): itemList += self._doSearch(curString, show=show) else: - for curString in self._get_episode_search_strings(ep_obj.scene_season, ep_obj.scene_episode): + for curString in self._get_episode_search_strings(ep_obj.scene_season, ep_obj.airdate if show.air_by_date or show.sports else ep_obj.scene_episode): itemList += self._doSearch(curString, show=show) for item in itemList: diff --git a/sickbeard/providers/hdtorrents.py b/sickbeard/providers/hdtorrents.py index 827d474c..496f5f49 100644 --- a/sickbeard/providers/hdtorrents.py +++ b/sickbeard/providers/hdtorrents.py @@ -306,10 +306,10 @@ class HDTorrentsProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/iptorrents.py b/sickbeard/providers/iptorrents.py index 20836bb7..28e85692 100644 --- a/sickbeard/providers/iptorrents.py +++ b/sickbeard/providers/iptorrents.py @@ -255,7 +255,7 @@ class IPTorrentsProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, curshow.air_by_date or curshow.sports, add_string='PROPER|REPACK') diff --git a/sickbeard/providers/kat.py b/sickbeard/providers/kat.py index 73a53220..64720ca1 100644 --- a/sickbeard/providers/kat.py +++ b/sickbeard/providers/kat.py @@ -380,10 +380,10 @@ class KATProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/nextgen.py b/sickbeard/providers/nextgen.py index 956eedcd..cdad7d6d 100644 --- a/sickbeard/providers/nextgen.py +++ b/sickbeard/providers/nextgen.py @@ -303,9 +303,9 @@ class NextGenProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/publichd.py b/sickbeard/providers/publichd.py index 66a30d0a..beca9f1f 100644 --- a/sickbeard/providers/publichd.py +++ b/sickbeard/providers/publichd.py @@ -275,7 +275,7 @@ class PublicHDProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) season = curEp.scene_season @@ -283,7 +283,7 @@ class PublicHDProvider(generic.TorrentProvider): if curshow.air_by_date or curshow.sports: episode = curEp.airdate - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/scc.py b/sickbeard/providers/scc.py index 04c7421f..1706b166 100644 --- a/sickbeard/providers/scc.py +++ b/sickbeard/providers/scc.py @@ -277,7 +277,7 @@ class SCCProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) season = curEp.scene_season @@ -285,7 +285,7 @@ class SCCProvider(generic.TorrentProvider): if curshow.air_by_date or curshow.sports: episode = curEp.airdate - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/speedcd.py b/sickbeard/providers/speedcd.py index e941f51a..d6d45044 100644 --- a/sickbeard/providers/speedcd.py +++ b/sickbeard/providers/speedcd.py @@ -233,7 +233,7 @@ class SpeedCDProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) season = curEp.scene_season diff --git a/sickbeard/providers/thepiratebay.py b/sickbeard/providers/thepiratebay.py index 351a3cad..94782bf8 100644 --- a/sickbeard/providers/thepiratebay.py +++ b/sickbeard/providers/thepiratebay.py @@ -373,10 +373,10 @@ class ThePirateBayProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/torrentday.py b/sickbeard/providers/torrentday.py index f07f59b2..88067de5 100644 --- a/sickbeard/providers/torrentday.py +++ b/sickbeard/providers/torrentday.py @@ -252,7 +252,7 @@ class TorrentDayProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) season = curEp.scene_season @@ -260,7 +260,7 @@ class TorrentDayProvider(generic.TorrentProvider): if curshow.air_by_date or curshow.sports: episode = curEp.airdate - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item) diff --git a/sickbeard/providers/torrentleech.py b/sickbeard/providers/torrentleech.py index 6ad957de..44dc8e8e 100644 --- a/sickbeard/providers/torrentleech.py +++ b/sickbeard/providers/torrentleech.py @@ -253,10 +253,10 @@ class TorrentLeechProvider(generic.TorrentProvider): return [] for sqlshow in sqlResults: - curshow = helpers.findCertainshow(sickbeard.showList, int(sqlshow["showid"])) + self.show = curshow = helpers.findCertainShow(sickbeard.showList, int(sqlshow["showid"])) curEp = curshow.getEpisode(int(sqlshow["season"]), int(sqlshow["episode"])) - searchString = self._get_episode_search_strings(curshow, curEp.scene_season, curEp.scene_episode, add_string='PROPER|REPACK') + searchString = self._get_episode_search_strings(curEp.scene_season, curEp.airdate if curshow.air_by_date or curshow.sports else curEp.scene_episode, add_string='PROPER|REPACK') for item in self._doSearch(searchString[0], show=curshow): title, url = self._get_title_and_url(item)