fix: Enhance scan type determination in MediaInfoExtractor to include MBAFF support

This commit is contained in:
sha
2026-04-13 16:26:20 +03:00
parent 27fae023bf
commit dfe3f9fe11
4 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ powershell -c "irm https://astral.sh/uv/install.sh | iex"
uv tool install https://github.com/shadoll/moma/releases/latest/download/moma-latest.tar.gz
# Specific version
uv tool install https://github.com/shadoll/moma/releases/download/v0.9.7/moma-0.9.7-py3-none-any.whl
uv tool install https://github.com/shadoll/moma/releases/download/v0.9.8/moma-0.9.8-py3-none-any.whl
# From PyPI (when published)
uv tool install moma
@@ -40,7 +40,7 @@ uv tool install moma
uv tool install --force https://github.com/shadoll/moma/releases/latest/download/moma-latest.tar.gz
# Upgrade to a newer specific version
uv tool install --force https://github.com/shadoll/moma/releases/download/v0.9.7/moma-0.9.7-py3-none-any.whl
uv tool install --force https://github.com/shadoll/moma/releases/download/v0.9.8/moma-0.9.8-py3-none-any.whl
```
#### Usage
@@ -56,7 +56,7 @@ moma /path/to/directory # Scan specific directory
pip install https://github.com/shadoll/moma/releases/latest/download/moma-latest.tar.gz
# Specific version
pip install https://github.com/shadoll/moma/releases/download/v0.9.7/moma-0.9.7-py3-none-any.whl
pip install https://github.com/shadoll/moma/releases/download/v0.9.8/moma-0.9.8-py3-none-any.whl
```
### Method 3: Development Installation
+1 -1
View File
@@ -1,6 +1,6 @@
[project]
name = "moma"
version = "0.9.7"
version = "0.9.8"
description = "Terminal-based media file renamer and metadata viewer"
readme = "README.md"
requires-python = ">=3.12"
+2 -1
View File
@@ -213,7 +213,8 @@ class MediaInfoExtractor:
# Determine scan type from available attributes
# Check scan_type first (e.g., "Interlaced", "Progressive", "MBAFF")
if scan_type_attr and isinstance(scan_type_attr, str):
scan_type = "i" if "interlaced" in scan_type_attr.lower() else "p"
scan_lower = scan_type_attr.lower()
scan_type = "i" if ("interlaced" in scan_lower or "mbaff" in scan_lower) else "p"
logger.debug(
f"[{self.file_path.name}] Using scan_type: {scan_type_attr!r} -> scan_type={scan_type!r}"
)
Generated
+1 -1
View File
@@ -208,7 +208,7 @@ wheels = [
[[package]]
name = "moma"
version = "0.9.7"
version = "0.9.8"
source = { editable = "." }
dependencies = [
{ name = "langcodes" },