-
-
Notifications
You must be signed in to change notification settings - Fork 198
Add WebDAV provider #2484
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
base: dev
Are you sure you want to change the base?
Add WebDAV provider #2484
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- multi part streaming has changed in core
- 80% of the code is redundant with filesystem provider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I cant accept this PR like this. 90% of the code is just a copy from the filesystem provider. If its written a bit smarter, then you can simply reuse most of the base implementation.
Because streaming and tags reading need access to the file anyways, I would suggest returning the (athenticated) webdav URL in the "resolve" function.
|
Currently refactoring. Problems appear to be arising due to the base class using os.scandir |
Well, if needed we can make some changes to the filesystem provider to make it more flexible ? |
|
BTW: It already looks loads better now! Only thing maybe is that also the sync and browse methods can be deleted and just use the base implementation, unless I'm missing something |
|
edit: OK I have a possible way ahead. I will look at submitting a completely revised PR in the next few days. Thanks as usual for your patience and pointers as I learn! |
|
Please have a look at the direction I am going. However, I may have hit a wall with podcasts and audiobooks but I havent had time to fully look at it. I would appreciate your thoughts on Claude's assessment =========================================== You're right - it's an infinite loop. Look at the pattern: Scans "Moby Dick" folder → finds 45 MP3 files The problem: The parent's _get_chapters_for_audiobook is designed for LOCAL filesystems where it can quickly re-scan a folder. For WebDAV, every scan is a network call, and it's processing ALL 45 files every time, each triggering another scan. |
WebDAV Provider Capabilities and Limitations
This provider extends Local File System Provider to support music libraries hosted on WebDAV servers. It supports tracks, albums, artists, single-file and multi-file audiobooks, and podcasts with full metadata parsing via ffprobe. Authentication is handled via Basic Auth with proper URL encoding of credentials containing special characters. The provider efficiently handles concurrent scanning with configurable semaphores and includes image discovery from folder structures.
Multi-file audiobooks use a custom streaming implementation (StreamType.CUSTOM) that calculates which chapter file to stream based on position without requiring ffmpeg to probe all chapter files over HTTP. This provides instant chapter switching and near-instant playback startup compared to StreamType.MULTI_FILE which can take minutes to probe 40+ HTTP-hosted files. Chapter metadata is cached during sync for fast lookup during playback.
The primary limitation is that seeking within individual audiobook chapters is not supported - users can only jump between chapters, not scrub within them. This tradeoff was intentional to avoid the HTTP probing delay. Single-file audiobooks and all other media types support full seeking via standard HTTP streaming. The provider matches the Internet Archive provider's approach for multi-file audiobooks, accepting the same seeking limitation for the same performance benefits.