feat: update score formatting in format_score_stars function to match media_info.py style

This commit is contained in:
benexl
2025-12-31 18:25:05 +03:00
parent e49baed46f
commit efed80f4dc

View File

@@ -46,12 +46,12 @@ def format_number(num):
def format_score_stars(score): def format_score_stars(score):
"""Format score as stars (matching media_info.py style).""" """Format score as stars out of 6."""
if score is None: if score is None:
return "N/A" return "N/A"
# Convert 0-100 score to 0-5 stars # Convert 0-100 score to 0-6 stars
stars = round(score / 20) stars = round(score / 100 * 6)
return "" * stars + "" * (5 - stars) + f" ({score}/100)" return "" * stars + f" ({score}/100)"
def format_date(date_obj): def format_date(date_obj):