mirror of
https://github.com/Benexl/FastAnime.git
synced 2026-04-28 11:53:08 -07:00
feat: update score formatting in format_score_stars function to match media_info.py style
This commit is contained in:
@@ -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):
|
||||||
|
|||||||
Reference in New Issue
Block a user