Skip to content

fix(downloader): Implement retry logic for download failures with fal… #3480

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

User-425
Copy link

@User-425 User-425 commented Jun 12, 2025

This pull request introduces a retry mechanism in the downloadSongUnsafe function to handle download failures more robustly. It includes retry logic with exponential backoff and a fallback to direct URL downloading if all retries fail.

Enhancements to download handling:

  • src/plugins/downloader/main/index.ts: Added a retry mechanism with a maximum of 3 attempts for downloading, including a delay between retries and a refresh of the session cookie. If all retries fail, the code attempts to download using the direct URL as a fallback. This ensures more reliable handling of intermittent failures during the download process.

@User-425
Copy link
Author

User-425 commented Jun 12, 2025

I tried to implement a retry mechanism, it works. To fix download error #3328. Although I fix this using the V.3.9.0. Because I can't figure it out how to open menu in the master. Although in my case, in long run (using auto downloader). Some song still got error, but this PR drastically reduce the chance.

@ArjixWasTaken

This comment was marked as resolved.

@ArjixWasTaken

This comment was marked as off-topic.

Copy link
Contributor

@ArjixWasTaken ArjixWasTaken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I'd nag you about the code quality, but I won't do that since the downloader plugin needs major refactoring to be up to my standards.

So LGTM!

@halleck1
Copy link

Hi, just a quick question - I was trying to build this branch locally and got the code to build successfully. However, when installing the local build (or running it from portable version) I cannot toggle the application menu (neither Alt is working nor backtick) and the plugins do not seem to be loaded. I've checked the config.json and hideMenu is false as well.

Are there any additional steps that need to be done on local builds to have this working and plugins loaded? I've followed the builds steps from readme.md (basically pnpm dist)

image

image

image

@ArjixWasTaken

This comment was marked as off-topic.

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

Successfully merging this pull request may close these issues.

3 participants