From 1c487f92f97d43eb49c3ec6b02c049d286bb7669 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Tue, 10 Jun 2014 13:40:11 +0100 Subject: [PATCH 1/2] Port:Fix not setting status if show location is missing but sickbeard.ADD_SHOWS_WO_DIR is set --- sickbeard/tv.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 7024a5e4..364baf65 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -1641,8 +1641,8 @@ class TVEpisode(object): self.deleteEpisode() return False - # don't update show status if show dir is missing, unless missing show dirs are created during post-processing - if not ek.ek(os.path.isdir, self.show._location) and not sickbeard.CREATE_MISSING_SHOW_DIRS: + # don't update show status if show dir is missing, unless it's missing on purpose + if not ek.ek(os.path.isdir, self.show._location) and not sickbeard.CREATE_MISSING_SHOW_DIRS and not sickbeard.ADD_SHOWS_WO_DIR: logger.log( u"The show dir is missing, not bothering to change the episode statuses since it'd probably be invalid") return From bec213ee0514207f9c3126df01d09cb42954c355 Mon Sep 17 00:00:00 2001 From: JackDandy Date: Tue, 10 Jun 2014 13:47:57 +0100 Subject: [PATCH 2/2] Port:Change setting status to UNAIRED for future episodes (GC-2397). Only set status to UNAIRED if current status is SKIPPED, UNAIRED, UNKNOWN or WANTED, should prevent re-downloading of early releases that are already downloaded and deleted (status IGNORED) or archived. --- sickbeard/tv.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index 364baf65..80689ba6 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -1651,15 +1651,14 @@ class TVEpisode(object): logger.log(str(self.show.indexerid) + u": Setting status for " + str(season) + "x" + str( episode) + " based on status " + str(self.status) + " and existence of " + self.location, logger.DEBUG) + # if we don't have the file if not ek.ek(os.path.isfile, self.location): - # if we don't have the file - if self.airdate >= datetime.date.today() and self.status not in Quality.SNATCHED + Quality.SNATCHED_PROPER: - # and it hasn't aired yet set the status to UNAIRED - logger.log( - u"Episode airs in the future, changing status from " + str(self.status) + " to " + str(UNAIRED), - logger.DEBUG) + # if it hasn't aired yet set the status to UNAIRED + if self.airdate >= datetime.date.today() and self.status in [SKIPPED, UNAIRED, UNKNOWN, WANTED]: + logger.log(u"Episode airs in the future, marking it " + str(UNAIRED), logger.DEBUG) self.status = UNAIRED + # if there's no airdate then set it to skipped (and respect ignored) elif self.airdate == datetime.date.fromordinal(1): if self.status == IGNORED: @@ -1667,6 +1666,7 @@ class TVEpisode(object): else: logger.log(u"Episode has no air date, automatically marking it skipped", logger.DEBUG) self.status = SKIPPED + # if we don't have the file and the airdate is in the past else: if self.status == UNAIRED: