feat: Add support for specifying cli spotify image size
All checks were successful
Build Docker / BuildImage (push) Successful in 1m9s
Check Code Quality / RuffCheck (push) Successful in 1m19s

This commit is contained in:
2026-03-18 23:08:13 +11:00
parent 1bc3d3e15d
commit 968d9587b6
3 changed files with 7 additions and 3 deletions

View File

@@ -48,8 +48,8 @@ def image_url_to_ascii(url, new_width=40):
# Since we are using '██' (double width), we effectively make each "cell" square.
# So we can just scale by aspect ratio directly without additional correction factor.
new_height = int(aspect_ratio * new_width)
if new_height > 60:
new_height = 60
if new_height > height:
new_height = height
new_width = int(new_height / aspect_ratio)
# Resize and ensure RGB mode