mirror of
https://github.com/Benexl/FastAnime.git
synced 2025-12-31 23:15:51 -08:00
feat: differentiate between studios and producers in media info and dynamic preview
This commit is contained in:
@@ -367,7 +367,10 @@ def main():
|
||||
end_date = format_date(media.get("endDate"))
|
||||
|
||||
studios_list = media.get("studios", {}).get("nodes", [])
|
||||
studios = ", ".join([s.get("name", "") for s in studios_list if s.get("name")]) or "Unknown"
|
||||
# Studios are those with isAnimationStudio=true
|
||||
studios = ", ".join([s.get("name", "") for s in studios_list if s.get("name") and s.get("isAnimationStudio")]) or "N/A"
|
||||
# Producers are those with isAnimationStudio=false
|
||||
producers = ", ".join([s.get("name", "") for s in studios_list if s.get("name") and not s.get("isAnimationStudio")]) or "N/A"
|
||||
|
||||
synonyms_list = media.get("synonyms", [])
|
||||
# Include romaji in synonyms if different from title
|
||||
@@ -460,6 +463,7 @@ def main():
|
||||
|
||||
rows = [
|
||||
("Studios", studios),
|
||||
("Producers", producers),
|
||||
]
|
||||
|
||||
print_rule(SEPARATOR_COLOR)
|
||||
|
||||
@@ -67,6 +67,7 @@ for key, value in rows:
|
||||
|
||||
rows = [
|
||||
("Studios", "{STUDIOS}"),
|
||||
("Producers", "{PRODUCERS}"),
|
||||
]
|
||||
|
||||
print_rule(SEPARATOR_COLOR)
|
||||
|
||||
@@ -189,7 +189,12 @@ class PreviewCacheWorker(ManagedBackgroundWorker):
|
||||
),
|
||||
"STUDIOS": formatter.shell_safe(
|
||||
formatter.format_list_with_commas(
|
||||
[t.name for t in media_item.studios if t.name]
|
||||
[t.name for t in media_item.studios if t.name and t.is_animation_studio]
|
||||
)
|
||||
),
|
||||
"PRODUCERS": formatter.shell_safe(
|
||||
formatter.format_list_with_commas(
|
||||
[t.name for t in media_item.studios if t.name and not t.is_animation_studio]
|
||||
)
|
||||
),
|
||||
"SYNONYMNS": formatter.shell_safe(
|
||||
|
||||
Reference in New Issue
Block a user