mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 11:33:25 +00:00
fix: Add 3D layout extraction from filename and update proposed filename generation
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user