Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Song stops downloading out of the blue #23

Open
jackhope1169 opened this issue Jan 9, 2024 · 1 comment
Open

Song stops downloading out of the blue #23

jackhope1169 opened this issue Jan 9, 2024 · 1 comment

Comments

@jackhope1169
Copy link

the songs download up to around 20 to 30 songs then it stops both in the exe version and python, when closed and retried to download again, it skips the songs it already downloaded, then when it reaches a new song to download, it doesn't work again.

Based on the error logs, it seems the main issue is that some of the songs being processed do not have an "isrc" key in their "external_ids" dictionary.

Specifically, this line is causing errors:

Copy code

isrc_code = str(song["external_ids"]["isrc"].replace("-", ""))
When it tries to access song["external_ids"]["isrc"], it is raising a KeyError because some songs do not have an "isrc" entry.

Some solutions you could try:

Wrap that line in a try/except block to catch the KeyError and handle it gracefully:
Copy code

try:
isrc_code = str(song["external_ids"]["isrc"].replace("-", ""))
except KeyError:
# handle case where isrc is missing
isrc_code = None
Check if "isrc" is in external_ids before trying to access it:
Copy code

if "isrc" in song["external_ids"]:
isrc_code = str(song["external_ids"]["isrc"].replace("-", ""))
else:
# handle missing isrc
Pass over songs missing the isrc instead of erroring:
Copy code

if "isrc" not in song["external_ids"]:
continue # skip this song
The key thing is some songs don't have that metadata, so you need to handle that case to avoid errors.

Let me know if any part of the diagnosis or suggestions need more clarification!

@rickyrorton
Copy link
Collaborator

This project is deprecated kindly use other downloaders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants