diff --git a/CHANGES.md b/CHANGES.md index 9969004a..873aace7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,11 @@ [develop changelog] +### 0.13.9 (2018-01-02 15:45:00 UTC) + +* Fix marking episode as to upgrade + + ### 0.13.8 (2017-12-27 15:45:00 UTC) * Fix HD4Free provider diff --git a/sickbeard/common.py b/sickbeard/common.py index d4806c0b..ea3bf97d 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -392,25 +392,20 @@ class wantedQualities(dict): for q in Quality.qualityStrings: if 0 >= q: continue + wanted = [i for i in upgrade_qualities if q < i] if q not in upgrade_qualities and q in initial_qualities: # quality is only in initial_qualities - self[qualities][q] = {self.bothlists: False, - self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: False} + self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, self.upgradelist: False} elif q in upgrade_qualities and q in initial_qualities: # quality is in initial_qualities and upgrade_qualities - self[qualities][q] = {self.bothlists: True, - self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: True} + self[qualities][q] = {self.bothlists: True, self.wantedlist: wanted, self.upgradelist: True} elif q in upgrade_qualities: # quality is only in upgrade_qualities - self[qualities][q] = {self.bothlists: False, - self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: True} + self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, self.upgradelist: True} else: # quality is not in any selected quality for the show - only_upgrade = q >= max_initial_quality - self[qualities][q] = {self.bothlists: False, - self.wantedlist: - [i for i in (initial_qualities, upgrade_qualities)[only_upgrade] if q < i], - self.upgradelist: only_upgrade} + self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, + self.upgradelist: (q >= max_initial_quality) and any(upgrade_qualities)} def __getitem__(self, k): if k not in self: