From ed8de59e91b5516b2ce85b2c016d0a090045ec90 Mon Sep 17 00:00:00 2001 From: echel0n Date: Tue, 13 May 2014 12:02:22 -0700 Subject: [PATCH] Fixed air-by-date issues with downloading a show that results in downloading the incorrect show afterwards. --- sickbeard/providers/generic.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sickbeard/providers/generic.py b/sickbeard/providers/generic.py index 7255f3a1..086c4a48 100644 --- a/sickbeard/providers/generic.py +++ b/sickbeard/providers/generic.py @@ -265,7 +265,6 @@ class GenericProvider: for ep_obj, items in searchItems.items(): for item in items: - (title, url) = self._get_title_and_url(item) quality = self.getQuality(item) @@ -301,6 +300,11 @@ class GenericProvider: logger.DEBUG) 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() sql_results = myDB.select("SELECT season, episode FROM tv_episodes WHERE showid = ? AND airdate = ?", [show.indexerid,