mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 23:47:41 +08:00
fix #4294
This commit is contained in:
@@ -595,7 +595,7 @@ class MetaVideo(MetaBase):
|
|||||||
if re_res.group(2):
|
if re_res.group(2):
|
||||||
self.video_encode = re_res.group(2).upper()
|
self.video_encode = re_res.group(2).upper()
|
||||||
elif re_res.group(3):
|
elif re_res.group(3):
|
||||||
self.video_encode = re_res.group(3).lower()
|
self.video_encode = re_res.group(3).upper()
|
||||||
else:
|
else:
|
||||||
self.video_encode = re_res.group(1).upper()
|
self.video_encode = re_res.group(1).upper()
|
||||||
self._last_token = self.video_encode
|
self._last_token = self.video_encode
|
||||||
|
|||||||
+3
-3
@@ -668,7 +668,7 @@ meta_cases = [{
|
|||||||
"restype": "UHD BluRay DoVi",
|
"restype": "UHD BluRay DoVi",
|
||||||
"pix": "1080p",
|
"pix": "1080p",
|
||||||
"video_codec": "X265",
|
"video_codec": "X265",
|
||||||
"audio_codec": "DD 7.1"
|
"audio_codec": "DD+ 7.1"
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"title": "Childhood.In.A.Capsule.S01E16.2022.1080p.KKTV.WEB-DL.X264.AAC-ADWeb.mkv",
|
"title": "Childhood.In.A.Capsule.S01E16.2022.1080p.KKTV.WEB-DL.X264.AAC-ADWeb.mkv",
|
||||||
@@ -968,7 +968,7 @@ meta_cases = [{
|
|||||||
"year": "2023",
|
"year": "2023",
|
||||||
"part": "",
|
"part": "",
|
||||||
"season": "S02",
|
"season": "S02",
|
||||||
"episode": "E01-E08",
|
"episode": "",
|
||||||
"restype": "WEB-DL",
|
"restype": "WEB-DL",
|
||||||
"pix": "2160p",
|
"pix": "2160p",
|
||||||
"video_codec": "H265",
|
"video_codec": "H265",
|
||||||
@@ -1016,7 +1016,7 @@ meta_cases = [{
|
|||||||
"year": "2019",
|
"year": "2019",
|
||||||
"part": "",
|
"part": "",
|
||||||
"season": "S01",
|
"season": "S01",
|
||||||
"episode": "E01-E36",
|
"episode": "",
|
||||||
"restype": "WEB-DL",
|
"restype": "WEB-DL",
|
||||||
"pix": "2160p",
|
"pix": "2160p",
|
||||||
"video_codec": "H265",
|
"video_codec": "H265",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
# 测试名称识别
|
# 测试名称识别
|
||||||
suite.addTest(MetaInfoTest('test_metainfo'))
|
suite.addTest(MetaInfoTest('test_metainfo'))
|
||||||
|
suite.addTest(MetaInfoTest('test_emby_format_ids'))
|
||||||
|
|
||||||
# 运行测试
|
# 运行测试
|
||||||
runner = unittest.TextTestRunner()
|
runner = unittest.TextTestRunner()
|
||||||
|
|||||||
@@ -60,4 +60,4 @@ class MetaInfoTest(TestCase):
|
|||||||
for path_str, expected_tmdbid in test_paths:
|
for path_str, expected_tmdbid in test_paths:
|
||||||
meta = MetaInfoPath(Path(path_str))
|
meta = MetaInfoPath(Path(path_str))
|
||||||
self.assertEqual(meta.tmdbid, expected_tmdbid,
|
self.assertEqual(meta.tmdbid, expected_tmdbid,
|
||||||
f"路径 {path_str} 期望的tmdbid为 {expected_tmdbid},实际识别为 {meta.tmdbid}")
|
f"路径 {path_str} 期望的tmdbid为 {expected_tmdbid},实际识别为 {meta.tmdbid}")
|
||||||
|
|||||||
Reference in New Issue
Block a user