mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
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.
This commit is contained in:
parent
1c487f92f9
commit
bec213ee05
1 changed files with 6 additions and 6 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue