Hi @rasmuslos ,
I've been using ShelfPlayer regularly and hit the rough edges of the dual playback path (progressive stream vs. locally downloaded file, two code paths, plus the guard that stops a download while the same item is playing). The obvious collapse is AVAssetDownloadURLSession - it streams HLS and writes a persistent .movpkg in one pipeline, so "downloaded" becomes a flag on the asset task rather than a separate subsystem. Scrub buffering becomes AVFoundation's problem, not the app's.
The server-side gap is that AudioBookshelf's HLS output today is session-scoped: manifest URLs die when the playback session closes or idles out (36 h). That's fine for browser playback, but breaks AVAssetDownloadURLSession the moment a download spans more than one session, which it always will.
I built and tested a reference implementation that closes that gap with an opt-in flag. It's a ~40-line change on top of v2.33.2, default off:
I've verified that manifest URLs on the fork survive session close, orphan sweeps, and container restarts - required for multi-day downloads/listening sessions.
Only the server side is in scope for what I've built. The iOS integration (AVAssetDownloadURLSession wiring in ShelfPlayer) is yours to take (hopefully) or leave. I dont have the chops to do the macOS development and can't test any AI code for it.
Ask: does this direction look viable enough that you'd consider prototyping ShelfPlayer against it? I can host a fork instance you point at, or you can run the public image yourself. I'm also drafting an upstream proposal for advplyr/audiobookshelf but would rather have your read first - the feature is motivated by ShelfPlayer's use case and the proposal will land better co-signed (or with your "this would be useful" in a comment).
Design is flexible - happy to change the opt-in shape, switch to per-user HMAC URLs, add per-library config, swap mpegts for fmp4, whatever you actually need. Just looking for direction right now, no code commitment from you.
— Michael / walkermc20
Hi @rasmuslos ,
I've been using ShelfPlayer regularly and hit the rough edges of the dual playback path (progressive stream vs. locally downloaded file, two code paths, plus the guard that stops a download while the same item is playing). The obvious collapse is
AVAssetDownloadURLSession- it streams HLS and writes a persistent.movpkgin one pipeline, so "downloaded" becomes a flag on the asset task rather than a separate subsystem. Scrub buffering becomes AVFoundation's problem, not the app's.The server-side gap is that AudioBookshelf's HLS output today is session-scoped: manifest URLs die when the playback session closes or idles out (36 h). That's fine for browser playback, but breaks
AVAssetDownloadURLSessionthe moment a download spans more than one session, which it always will.I built and tested a reference implementation that closes that gap with an opt-in flag. It's a ~40-line change on top of v2.33.2, default off:
ENABLE_IOS_HLS_PERSIST=1on the server + requestmediaPlayer: "ios-hls"from the client. If either is absent, behaviour is byte-identical to upstream ABS.ghcr.io/walkermc20/audiobookshelf:ios-hls-persistentI've verified that manifest URLs on the fork survive session close, orphan sweeps, and container restarts - required for multi-day downloads/listening sessions.
Only the server side is in scope for what I've built. The iOS integration (AVAssetDownloadURLSession wiring in ShelfPlayer) is yours to take (hopefully) or leave. I dont have the chops to do the macOS development and can't test any AI code for it.
Ask: does this direction look viable enough that you'd consider prototyping ShelfPlayer against it? I can host a fork instance you point at, or you can run the public image yourself. I'm also drafting an upstream proposal for advplyr/audiobookshelf but would rather have your read first - the feature is motivated by ShelfPlayer's use case and the proposal will land better co-signed (or with your "this would be useful" in a comment).
Design is flexible - happy to change the opt-in shape, switch to per-user HMAC URLs, add per-library config, swap mpegts for fmp4, whatever you actually need. Just looking for direction right now, no code commitment from you.
— Michael / walkermc20