implemeented file format convertion

This commit is contained in:
Xoconoch
2025-06-03 22:37:45 -06:00
parent 41461aef3f
commit c2e526be60
9 changed files with 194 additions and 20 deletions

View File

@@ -19,7 +19,9 @@ def download_album(
initial_retry_delay=5,
retry_delay_increase=5,
max_retries=3,
progress_callback=None
progress_callback=None,
convert_to=None,
bitrate=None
):
try:
# Detect URL source (Spotify or Deezer) from URL
@@ -118,7 +120,9 @@ def download_album(
save_cover=save_cover,
initial_retry_delay=initial_retry_delay,
retry_delay_increase=retry_delay_increase,
max_retries=max_retries
max_retries=max_retries,
convert_to=convert_to,
bitrate=bitrate
)
print(f"DEBUG: Album download completed successfully using Deezer credentials")
except Exception as e:
@@ -160,7 +164,9 @@ def download_album(
save_cover=save_cover,
initial_retry_delay=initial_retry_delay,
retry_delay_increase=retry_delay_increase,
max_retries=max_retries
max_retries=max_retries,
convert_to=convert_to,
bitrate=bitrate
)
print(f"DEBUG: Album download completed successfully using Spotify fallback")
except Exception as e2:
@@ -201,7 +207,9 @@ def download_album(
save_cover=save_cover,
initial_retry_delay=initial_retry_delay,
retry_delay_increase=retry_delay_increase,
max_retries=max_retries
max_retries=max_retries,
convert_to=convert_to,
bitrate=bitrate
)
print(f"DEBUG: Album download completed successfully using Spotify main")
# For Deezer URLs: download directly from Deezer
@@ -236,7 +244,9 @@ def download_album(
save_cover=save_cover,
initial_retry_delay=initial_retry_delay,
retry_delay_increase=retry_delay_increase,
max_retries=max_retries
max_retries=max_retries,
convert_to=convert_to,
bitrate=bitrate
)
print(f"DEBUG: Album download completed successfully using Deezer direct")
else: