Repository: igorcmoura/anitopy (language: python)

Issue:
[BUG] Cannot parse title of 4k resource, miss video_resolution property
```
>>> anitopy.parse('[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][1080p]')
{'file_name': '[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][1080p]', 'video_resolution': '1080p', 'video_term': 'HEVC', 'anime_year': '2022', 'episode_number': '11', 'anime_title': 'Jade Dynasty', 'release_group': 'GM-Team'}
>>> anitopy.parse('[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]')
{'file_name': '[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]', 'video_term': 'HEVC', 'anime_year': '2022', 'episode_number': '11', 'anime_title': 'Jade Dynasty', 'release_group': 'GM-Team'}
```
Missing video_resolution property


Discussion / hints:

Fix patch:
diff --git a/anitopy/parser_helper.py b/anitopy/parser_helper.py
index 0c8570f..d3f857b 100644
--- a/anitopy/parser_helper.py
+++ b/anitopy/parser_helper.py
@@ -67,7 +67,7 @@ def is_mostly_latin_string(string):
 
 
 def is_resolution(string):
-    pattern = '\\d{3,4}([pP]|([xX\u00D7]\\d{3,4}))$'
+    pattern = '\\d{3,4}([pP]|([xX\u00D7]\\d{3,4}))$|^[248]K$'
     return bool(re.match(pattern, string))
 
 


Test patch:
diff --git a/tests/fixtures/table.py b/tests/fixtures/table.py
index e7d7423..980bac0 100644
--- a/tests/fixtures/table.py
+++ b/tests/fixtures/table.py
@@ -1998,6 +1998,18 @@
             'release_group': 'HorribleSubs',
             'video_resolution': '720p'
         }
+    ], [
+        '[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]',
+        None,
+        {
+            'anime_title': 'Jade Dynasty',
+            'anime_year': '2022',
+            'episode_number': '11',
+            'file_name': '[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]',
+            'release_group': 'GM-Team',
+            'video_resolution': '4K',
+            'video_term': 'HEVC'
+        }
     ],
 
     ###########################################################################