mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-02 17:33:37 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
1b186c2c38
5 changed files with 13 additions and 7 deletions
|
@ -16,6 +16,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 0.16.12 (2018-05-25 00:40:00 UTC)
|
||||||
|
|
||||||
|
* Fix anime parser and anime PROPER level
|
||||||
|
|
||||||
|
|
||||||
### 0.16.11 (2018-05-22 00:00:00 UTC)
|
### 0.16.11 (2018-05-22 00:00:00 UTC)
|
||||||
|
|
||||||
* Fix SickGear-NG.py post processing script
|
* Fix SickGear-NG.py post processing script
|
||||||
|
|
|
@ -120,9 +120,7 @@ class Quality:
|
||||||
is_repack = False
|
is_repack = False
|
||||||
if is_anime:
|
if is_anime:
|
||||||
if isinstance(version, (int, long)):
|
if isinstance(version, (int, long)):
|
||||||
level = version
|
level = (0, version - 1)[1 < version]
|
||||||
else:
|
|
||||||
level = 1
|
|
||||||
elif isinstance(extra_no_name, basestring):
|
elif isinstance(extra_no_name, basestring):
|
||||||
for p, r_check in Quality.proper_levels:
|
for p, r_check in Quality.proper_levels:
|
||||||
a = len(p.findall(extra_no_name))
|
a = len(p.findall(extra_no_name))
|
||||||
|
|
|
@ -242,7 +242,7 @@ class NameParser(object):
|
||||||
# assigns version to anime file if detected using anime regex. Non-anime regex receives -1
|
# assigns version to anime file if detected using anime regex. Non-anime regex receives -1
|
||||||
version = match.group('version')
|
version = match.group('version')
|
||||||
if version:
|
if version:
|
||||||
result.version = version
|
result.version = helpers.tryInt(version)
|
||||||
else:
|
else:
|
||||||
result.version = 1
|
result.version = 1
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -263,7 +263,7 @@ class RecentSearchQueueItem(generic_queue.QueueItem):
|
||||||
propers = {}
|
propers = {}
|
||||||
my_db = db.DBConnection('cache.db')
|
my_db = db.DBConnection('cache.db')
|
||||||
sql_results = my_db.select('SELECT * FROM provider_cache')
|
sql_results = my_db.select('SELECT * FROM provider_cache')
|
||||||
re_p = (r'\brepack|proper|real\b', r'\brepack|proper|real|v[1-5]\b')[needed.need_anime]
|
re_p = r'\brepack|proper|real%s\b' % ('', '|v[2-9]')[needed.need_anime]
|
||||||
|
|
||||||
proper_regex = re.compile(re_p, flags=re.I)
|
proper_regex = re.compile(re_p, flags=re.I)
|
||||||
|
|
||||||
|
|
|
@ -3058,11 +3058,14 @@ class QualityTests(unittest.TestCase):
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
|
|
||||||
# TODO: add anime test cases
|
|
||||||
def test_get_proper_level_anime(self):
|
def test_get_proper_level_anime(self):
|
||||||
# release_name, expected level
|
# release_name, expected level
|
||||||
self.check_proper_level([
|
self.check_proper_level([
|
||||||
|
('Boruto - Naruto Next Generations - 59 [480p]', 0),
|
||||||
|
('[SGKK] Bleach - 312v2 (1280x720 h264 AAC) [F501C9BE]', 1),
|
||||||
|
('[SGKK] Bleach 312v1 [720p/MKV]', 0),
|
||||||
|
('[Cthuko] Shirobako - 05v2 [720p H264 AAC][80C9B09B]', 1),
|
||||||
|
('Naruto Shippuden - 314v3', 2)
|
||||||
], is_anime=True)
|
], is_anime=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue