From e58436e85d2049d7157acfc963e3ea7427455059 Mon Sep 17 00:00:00 2001 From: Prinz23 Date: Mon, 8 Jan 2018 17:16:11 +0000 Subject: [PATCH] Fix "Upgrade once" for wanted qualities. Fix criteria selection for "Upgrade once" shows: manual searches and/or if episode is set to unwanted quality. Add unit test of wantedQualities to common_tests.py --- CHANGES.md | 7 +- sickbeard/common.py | 45 +- tests/common_tests.py | 1559 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 1588 insertions(+), 23 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 653bf606..438e16df 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,9 @@ -### 0.13.9 (2018-01-02 15:45:00 UTC) +### 0.13.10 (2018-01-08 17:20:00 UTC) + +* Fix "Upgrade once" for wanted qualities + + +### 0.13.9 (2018-01-02 15:45:00 UTC) * Fix marking episode as to upgrade diff --git a/sickbeard/common.py b/sickbeard/common.py index ea3bf97d..583c7d96 100644 --- a/sickbeard/common.py +++ b/sickbeard/common.py @@ -388,24 +388,24 @@ class wantedQualities(dict): def _generate_wantedlist(self, qualities): initial_qualities, upgrade_qualities = Quality.splitQuality(qualities) max_initial_quality = max(initial_qualities or [Quality.NONE]) + min_upgrade_quality = min(upgrade_qualities or [1 << 16]) self[qualities] = {0: {self.bothlists: False, self.wantedlist: initial_qualities, self.upgradelist: False}} 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: 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: wanted, self.upgradelist: True} - elif q in upgrade_qualities: - # quality is only in upgrade_qualities - self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, self.upgradelist: True} - else: - # quality is not in any selected quality for the show - self[qualities][q] = {self.bothlists: False, self.wantedlist: wanted, - self.upgradelist: (q >= max_initial_quality) and any(upgrade_qualities)} + if 0 < q: + self[qualities][q] = {self.wantedlist: [i for i in upgrade_qualities if q < i], self.upgradelist: False} + if q not in upgrade_qualities and q in initial_qualities: + # quality is only in initial_qualities + w = {self.bothlists: False} + elif q in upgrade_qualities and q in initial_qualities: + # quality is in initial_qualities and upgrade_qualities + w = {self.bothlists: True, self.upgradelist: True} + elif q in upgrade_qualities: + # quality is only in upgrade_qualities + w = {self.bothlists: False, self.upgradelist: True} + else: + # quality is not in any selected quality for the show (known as "unwanted") + w = {self.bothlists: max_initial_quality >= q >= min_upgrade_quality} + self[qualities][q].update(w) def __getitem__(self, k): if k not in self: @@ -418,13 +418,14 @@ class wantedQualities(dict): return super(wantedQualities, self).get(k, *args, **kwargs) def get_wantedlist(self, qualities, upgradeonce, quality, status, unaired=False, manual=False): - if not manual and status in [ARCHIVED, IGNORED, SKIPPED] + ([UNAIRED], [])[unaired]: - return [] - if upgradeonce: - if status == SNATCHED_BEST or \ - (not self[qualities][quality][self.bothlists] and self[qualities][quality][self.upgradelist] and - status in (DOWNLOADED, SNATCHED, SNATCHED_BEST, SNATCHED_PROPER)): + if not manual: + if status in [ARCHIVED, IGNORED, SKIPPED] + ([UNAIRED], [])[unaired]: return [] + if upgradeonce: + if status == SNATCHED_BEST or \ + (not self[qualities][quality][self.bothlists] and self[qualities][quality][self.upgradelist] and + status in (DOWNLOADED, SNATCHED, SNATCHED_BEST, SNATCHED_PROPER)): + return [] return self[qualities][quality][self.wantedlist] diff --git a/tests/common_tests.py b/tests/common_tests.py index 0fdd987d..7461f3ca 100644 --- a/tests/common_tests.py +++ b/tests/common_tests.py @@ -5,6 +5,7 @@ import os.path sys.path.insert(1, os.path.abspath('..')) from sickbeard import common +from sickbeard.common import Quality, wantedQualities from sickbeard.name_parser.parser import NameParser @@ -22,6 +23,26 @@ class QualityTests(unittest.TestCase): second = common.Quality.get_proper_level(p.extra_info_no_name(), p.version, is_anime) self.assertEqual(level, second, 'fail %s != %s for case: %s' % (level, second, case)) + def check_wantedquality_list(self, cases): + for show_quality, result in cases: + sq = common.Quality.combineQualities(*show_quality) + wd = common.wantedQualities() + res = wd.get_wantedlist(sq, False, common.Quality.NONE, common.UNAIRED, manual=True) + for w, v in wd.iteritems(): + if w == sq: + for u, o in sorted(v.iteritems()): + self.assertEqual(o, result.get(u)) + + def check_wantedquality_get_wantedlist(self, cases): + for show_quality, result in cases: + sq = common.Quality.combineQualities(*show_quality) + wd = common.wantedQualities() + for case, wlist in result: + ka = {'qualities': sq} + ka.update(case) + res = wd.get_wantedlist(**ka) + self.assertEqual(res, wlist) + # TODO: repack / proper ? air-by-date ? season rip? multi-ep? def test_SDTV(self): @@ -193,6 +214,1544 @@ class QualityTests(unittest.TestCase): ('Test.Show.S01E02.Some.episode.title.REAL.READ.NFO.DVDRip.XviD-GROUP', 1) ]) + def test_wantedQualities_List(self): + self.check_wantedquality_list([([(Quality.SDTV, Quality.HDTV), (Quality.HDWEBDL, Quality.FULLHDBLURAY)], + {Quality.NONE: {wantedQualities.wantedlist: [Quality.SDTV, Quality.HDTV], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.SDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.SDDVD: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.RAWHDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDWEBDL: {wantedQualities.wantedlist: [Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: True}, + Quality.FULLHDWEBDL: {wantedQualities.wantedlist: [Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDBLURAY: {wantedQualities.wantedlist: [Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDBLURAY: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: True}, + Quality.UHD4KWEB: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.UNKNOWN: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False} + }), + ([(Quality.SDTV, Quality.HDTV), ()], + {Quality.NONE: {wantedQualities.wantedlist: [Quality.SDTV, Quality.HDTV], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.SDTV: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.SDDVD: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDTV: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.RAWHDTV: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDTV: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDWEBDL: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDWEBDL: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDBLURAY: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDBLURAY: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.UHD4KWEB: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.UNKNOWN: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False} + }), + ([(Quality.SDTV, Quality.HDTV, Quality.HDWEBDL, Quality.HDBLURAY, Quality.FULLHDBLURAY), (Quality.HDWEBDL, Quality.FULLHDWEBDL, Quality.FULLHDBLURAY)], + {Quality.NONE: {wantedQualities.wantedlist: [Quality.SDTV, Quality.HDTV, Quality.HDWEBDL, Quality.HDBLURAY, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.SDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.SDDVD: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.RAWHDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDTV: {wantedQualities.wantedlist: [Quality.HDWEBDL, Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.HDWEBDL: {wantedQualities.wantedlist: [Quality.FULLHDWEBDL, Quality.FULLHDBLURAY], wantedQualities.bothlists: True, wantedQualities.upgradelist: True}, + Quality.FULLHDWEBDL: {wantedQualities.wantedlist: [Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: True}, + Quality.HDBLURAY: {wantedQualities.wantedlist: [Quality.FULLHDBLURAY], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.FULLHDBLURAY: {wantedQualities.wantedlist: [], wantedQualities.bothlists: True, wantedQualities.upgradelist: True}, + Quality.UHD4KWEB: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False}, + Quality.UNKNOWN: {wantedQualities.wantedlist: [], wantedQualities.bothlists: False, wantedQualities.upgradelist: False} + }) + ]) + + def test_wantedQualities_get_wantedlist(self): + self.check_wantedquality_get_wantedlist([([(Quality.SDDVD, Quality.RAWHDTV), (Quality.HDWEBDL, Quality.HDBLURAY)], + [({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDWEBDL (upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + + # unaired: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDWEBDL (upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + + # manual: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDWEBDL (upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + + # upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDWEBDL (upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + + # unaired, manual: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDWEBDL (upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + + # unaired, upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDWEBDL (upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + + # unaired, manual, upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDWEBDL (upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + + # upgrade once, manual: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # FULLHDTV (between init and upgrade qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDWEBDL, Quality.HDBLURAY]), + # HDWEBDL (upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + ]), + # init quality only show + ([(Quality.SDDVD, Quality.RAWHDTV), ()], + [({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + + # unaired: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + + # manual: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + + # upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + + # unaired, manual: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # HDTV (between init qualities) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + + # unaired, upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + + # unaired, manual, upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + + # upgrade once, manual: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # HDTV (between init qualities) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # RAWHDTV (max init quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDTV (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # HDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDWEBDL (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # HDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDBLURAY (above init quality + unwanted) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + ]), + # init, upgrade quality show (overlapping) + ([(Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL), (Quality.RAWHDTV, Quality.HDBLURAY)], + [({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDWEBDL (max init quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + + # unaired: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDWEBDL (max init quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + + # manual: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # HDWEBDL (upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + + # upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDWEBDL (max init quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': False}, []), + + # unaired, manual: + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': False, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # HDWEBDL (max init quality) + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': False, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': False, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + + # unaired, upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': False}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDWEBDL (max init quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': False}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': False}, []), + + # unaired, manual, upgrade once: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': True, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # HDWEBDL (max init quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': True, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': True, 'manual': True}, []), + + # upgrade once, manual: + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.UNAIRED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.SKIPPED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.IGNORED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.WANTED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + ({'upgradeonce': True, 'quality': Quality.NONE, 'status': common.FAILED, 'unaired': False, 'manual': True}, [Quality.SDDVD, Quality.RAWHDTV, Quality.HDWEBDL]), + # SDTV (below init quality) + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # SDDVD (init quality) + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.SDDVD, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # HDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.RAWHDTV, Quality.HDBLURAY]), + # RAWHDTV (init + upgrade quality) + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.RAWHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDTV (between init qualities + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDTV, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # HDWEBDL (max init quality) + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.HDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # FULLHDWEBDL (unwanted quality between upgrade qualities) + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + ({'upgradeonce': True, 'quality': Quality.FULLHDWEBDL, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, [Quality.HDBLURAY]), + # HDBLURAY (max upgrade quality) + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.HDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + # FULLHDBLURAY (higher then max upgrade quality + unwanted quality) + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_PROPER, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.SNATCHED_BEST, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.DOWNLOADED, 'unaired': False, 'manual': True}, []), + ({'upgradeonce': True, 'quality': Quality.FULLHDBLURAY, 'status': common.ARCHIVED, 'unaired': False, 'manual': True}, []), + ]), + ]) + # TODO: add anime test cases def test_get_proper_level_anime(self): # release_name, expected level