feat: Add genre extraction to media properties and icons to tree

This commit is contained in:
sHa
2026-01-03 15:34:27 +00:00
parent ef1e1e06ca
commit 0ec1fbe4db
7 changed files with 70 additions and 8 deletions

View File

@@ -122,6 +122,15 @@ class MediaPanelProperties:
def tmdb_year(self) -> str:
"""Get TMDB year formatted with label."""
return self._extractor.get("year", "TMDB")
@property
@text_decorators.blue()
@conditional_decorators.wrap("Genres: ")
@text_decorators.yellow()
@conditional_decorators.default("<None>")
def tmdb_genres(self) -> str:
"""Get TMDB genres formatted with label."""
return self._extractor.get("genres", "TMDB")
@property
@text_decorators.blue()
@@ -328,7 +337,7 @@ class MediaPanelProperties:
return self._extractor.get("movie_db", "Filename")
# ============================================================
# Joined Data Properties
# Media Data Properties
# ============================================================
@property
@@ -367,6 +376,15 @@ class MediaPanelProperties:
"""Get selected year formatted with label."""
return self._extractor.get("year")
@property
@text_decorators.blue()
@conditional_decorators.wrap("Genres: ")
@text_decorators.cyan()
@conditional_decorators.default("<None>")
def media_genres(self) -> str:
"""Get TMDB genres formatted with label."""
return self._extractor.get("genres")
@property
@text_decorators.blue()
@conditional_decorators.wrap("File size: ")