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

[Enhancement]: Limit number of concurrent track downloads #1425

Open
wjbuys opened this issue Jan 2, 2025 · 1 comment
Open

[Enhancement]: Limit number of concurrent track downloads #1425

wjbuys opened this issue Jan 2, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@wjbuys
Copy link

wjbuys commented Jan 2, 2025

Describe the Feature/Enhancement

Configure a sane default limit for the maximum number of audio tracks that can be downloaded for local listening at the same time. Currently, it will try to simultaneously download all files.

Why would this be helpful?

From my testing, for similarly sized audiobooks that differ only in the number of audio tracks:

  • a book with < 10 tracks downloads in seconds
  • a book with > 100 tracks downloads in minutes

I suspect that trying to juggle 100s of open download connections is overwhelming the iOS download manager, or my audiobookshelf server, or both.

Future Implementation (Screenshot)

This would probably make sense as a setting under (hamburger menu) -> Settings (gear) -> Data Settings.

Audiobookshelf App Version

iOS App - 0.9.77

Current Implementation (Screenshot)

I'm looking at an audiobook downloading right now, and it has a high double digit number in the download progress indicator which is ticking down ever so slowly. Viewing download progress shows dozens of tracks partially downloaded, and none of them making much progress.

@wjbuys wjbuys added the enhancement New feature or request label Jan 2, 2025
@wjbuys
Copy link
Author

wjbuys commented Jan 3, 2025

Hm, actually, I think this might be a bug; looking at the code for the download scheduler, it looks like the intention was to limit to 5 concurrent downloads:

https://github.com/advplyr/audiobookshelf-app/blob/master/ios/App/App/plugins/AbsDownloader.swift#L22C15-L22C43

However, I think that we're running into the same issue as ReactiveX/RxSwift#2538 (i.e. the tasks being submitted to the queue are themselves async and complete immediately), but I might be misreading things here. Either way, this seems like a bug rather than an enhancement then.

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

No branches or pull requests

1 participant