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]
|
||||
name = "renamer"
|
||||
version = "0.5.4"
|
||||
version = "0.5.5"
|
||||
description = "Terminal-based media file renamer and metadata viewer"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
|
||||
@@ -193,7 +193,7 @@ SPECIAL_EDITIONS = {
|
||||
"Workprint": ["Workprint"],
|
||||
"Rough Cut": ["Rough Cut"],
|
||||
"Special Assembly Cut": ["Special Assembly Cut"],
|
||||
"Amazon Edition": ["Amazon Edition", "Amazon"],
|
||||
"Amazon Edition": ["Amazon Edition", "Amazon", "AMZN"],
|
||||
"Netflix Edition": ["Netflix Edition"],
|
||||
"HBO Edition": ["HBO Edition"],
|
||||
}
|
||||
|
||||
@@ -88,9 +88,10 @@ class MediaInfoExtractor:
|
||||
# First, try to match width to typical widths
|
||||
width_matches = []
|
||||
for frame_class, info in FRAME_CLASSES.items():
|
||||
if width in info['typical_widths'] and frame_class.endswith(scan_type):
|
||||
diff = abs(height - info['nominal_height'])
|
||||
width_matches.append((frame_class, diff))
|
||||
for tw in info['typical_widths']:
|
||||
if abs(width - tw) <= 5 and frame_class.endswith(scan_type):
|
||||
diff = abs(height - info['nominal_height'])
|
||||
width_matches.append((frame_class, diff))
|
||||
|
||||
if width_matches:
|
||||
# Choose the frame class with the smallest height difference
|
||||
|
||||
@@ -142,5 +142,11 @@
|
||||
"resolution": [512, 288],
|
||||
"interlaced": false,
|
||||
"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