This commit is contained in:
edideaur 2026-04-05 01:20:21 +00:00 committed by GitHub
parent 31744df94a
commit a812198a07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -20,4 +20,5 @@ album:423471869
album:250986538
album:509761344
album:15621057
album:103897783
album:103897783
album:151728406

View file

@ -107,7 +107,7 @@ def uuid_to_path_segments(uuid):
def download_and_process_cover(cover_uuid):
url = f"https://resources.tidal.com/images/{uuid_to_path_segments(cover_uuid)}/640x640.jpg"
url = f"https://resources.tidal.com/images/{uuid_to_path_segments(cover_uuid)}/320x320.jpg"
with tempfile.NamedTemporaryFile(suffix='.jpg', delete=False) as tmp:
tmp_path = tmp.name
@ -121,7 +121,7 @@ def download_and_process_cover(cover_uuid):
output_path = os.path.join(IMAGES_DIR, f"{cover_uuid}.webp")
subprocess.run(
['cwebp', '-q', '50', '-resize', '500', '500', tmp_path, '-o', output_path],
['cwebp', '-q', '50', tmp_path, '-o', output_path],
check=True,
capture_output=True
)