mirror of
https://github.com/shadoll/moma.git
synced 2026-08-28 11:33:25 +00:00
feat: Bump version to 0.2.5, enhance logging, normalize Cyrillic characters, and improve database info formatting
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from rich.markup import escape
|
||||
from .text_formatter import TextFormatter
|
||||
from .date_formatter import DateFormatter
|
||||
from .special_info_formatter import SpecialInfoFormatter
|
||||
@@ -16,7 +17,7 @@ class ProposedNameFormatter:
|
||||
self.__frame_class = extractor.get("frame_class") or None
|
||||
self.__hdr = f",{extractor.get('hdr')}" if extractor.get("hdr") else ""
|
||||
self.__audio_langs = extractor.get("audio_langs") or None
|
||||
self.__special_info = f" \[{SpecialInfoFormatter.format_special_info(extractor.get('special_info'))}]" if extractor.get("special_info") else ""
|
||||
self.__special_info = f" [{SpecialInfoFormatter.format_special_info(extractor.get('special_info'))}]" if extractor.get("special_info") else ""
|
||||
self.__extension = extractor.get("extension") or "ext"
|
||||
|
||||
def __str__(self) -> str:
|
||||
@@ -28,6 +29,7 @@ class ProposedNameFormatter:
|
||||
|
||||
def rename_line_formatted(self, file_path) -> str:
|
||||
"""Format the proposed name for display with color"""
|
||||
proposed = escape(str(self))
|
||||
if file_path.name == str(self):
|
||||
return f">> {TextFormatter.green(str(self))} <<"
|
||||
return f">> {TextFormatter.bold_yellow(str(self))} <<"
|
||||
return f">> {TextFormatter.green(proposed)} <<"
|
||||
return f">> {TextFormatter.bold_yellow(proposed)} <<"
|
||||
|
||||
Reference in New Issue
Block a user