feat: Bump version to 0.5.5 and update frame class detection logic
This commit is contained in:
BIN
dist/renamer-0.5.5-py3-none-any.whl
vendored
Normal file
BIN
dist/renamer-0.5.5-py3-none-any.whl
vendored
Normal file
Binary file not shown.
@@ -1,6 +1,6 @@
|
|||||||
[project]
|
[project]
|
||||||
name = "renamer"
|
name = "renamer"
|
||||||
version = "0.5.4"
|
version = "0.5.5"
|
||||||
description = "Terminal-based media file renamer and metadata viewer"
|
description = "Terminal-based media file renamer and metadata viewer"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.11"
|
requires-python = ">=3.11"
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ SPECIAL_EDITIONS = {
|
|||||||
"Workprint": ["Workprint"],
|
"Workprint": ["Workprint"],
|
||||||
"Rough Cut": ["Rough Cut"],
|
"Rough Cut": ["Rough Cut"],
|
||||||
"Special Assembly Cut": ["Special Assembly Cut"],
|
"Special Assembly Cut": ["Special Assembly Cut"],
|
||||||
"Amazon Edition": ["Amazon Edition", "Amazon"],
|
"Amazon Edition": ["Amazon Edition", "Amazon", "AMZN"],
|
||||||
"Netflix Edition": ["Netflix Edition"],
|
"Netflix Edition": ["Netflix Edition"],
|
||||||
"HBO Edition": ["HBO Edition"],
|
"HBO Edition": ["HBO Edition"],
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ class MediaInfoExtractor:
|
|||||||
# First, try to match width to typical widths
|
# First, try to match width to typical widths
|
||||||
width_matches = []
|
width_matches = []
|
||||||
for frame_class, info in FRAME_CLASSES.items():
|
for frame_class, info in FRAME_CLASSES.items():
|
||||||
if width in info['typical_widths'] and frame_class.endswith(scan_type):
|
for tw in info['typical_widths']:
|
||||||
|
if abs(width - tw) <= 5 and frame_class.endswith(scan_type):
|
||||||
diff = abs(height - info['nominal_height'])
|
diff = abs(height - info['nominal_height'])
|
||||||
width_matches.append((frame_class, diff))
|
width_matches.append((frame_class, diff))
|
||||||
|
|
||||||
|
|||||||
@@ -142,5 +142,11 @@
|
|||||||
"resolution": [512, 288],
|
"resolution": [512, 288],
|
||||||
"interlaced": false,
|
"interlaced": false,
|
||||||
"expected_frame_class": "288p"
|
"expected_frame_class": "288p"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"resolution": [1918, 812],
|
||||||
|
"interlaced": false,
|
||||||
|
"expected_frame_class": "1080p",
|
||||||
|
"testname": "test-mistakenly-high-height"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
Reference in New Issue
Block a user