1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-11-17 23:05:11 -05:00

Fixed air-by-date issues with downloading a show that results in downloading the incorrect show afterwards.

This commit is contained in:
echel0n 2014-05-13 12:02:22 -07:00
parent fab8329e23
commit ed8de59e91

View File

@ -265,7 +265,6 @@ class GenericProvider:
for ep_obj, items in searchItems.items(): for ep_obj, items in searchItems.items():
for item in items: for item in items:
(title, url) = self._get_title_and_url(item) (title, url) = self._get_title_and_url(item)
quality = self.getQuality(item) quality = self.getQuality(item)
@ -301,6 +300,11 @@ class GenericProvider:
logger.DEBUG) logger.DEBUG)
continue continue
if parse_result.air_date != ep_obj.airdate:
logger.log("Episode " + title + " didn't air on " + str(ep_obj.airdate) + ", skipping it",
logger.DEBUG)
continue
myDB = db.DBConnection() myDB = db.DBConnection()
sql_results = myDB.select("SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?", sql_results = myDB.select("SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?",
[show.indexerid, [show.indexerid,