fix: Add 3D layout extraction from filename and update proposed filename generation

This commit is contained in:
sha
2026-04-13 18:15:37 +03:00
parent dfe3f9fe11
commit 274ce4d451
4 changed files with 40 additions and 1 deletions
+7 -1
View File
@@ -48,6 +48,12 @@ class ProposedFilenameView:
"""Get the frame class"""
return self._extractor.get("frame_class") or ""
@property
@conditional_decorators.wrap(",")
def _3d_layout(self) -> str:
"""Get the 3D layout formatted with a leading comma if present"""
return self._extractor.get("3d_layout")
@property
@conditional_decorators.wrap(",")
def _hdr(self) -> str:
@@ -81,7 +87,7 @@ class ProposedFilenameView:
@property
def rename_line(self) -> str:
"""Generate the proposed filename."""
result = f"{self._order}{self._title}{self._year}{self._special_info}{self._source} [{self._frame_class}{self._hdr},{self._audio_langs}]{self._db_info}.{self._extension}"
result = f"{self._order}{self._title}{self._year}{self._special_info}{self._source} [{self._frame_class}{self._3d_layout}{self._hdr},{self._audio_langs}]{self._db_info}.{self._extension}"
return result.replace("/", "-").replace("\\", "-")
def rename_line_formatted(self, file_path) -> str: