audiobookshelf: Implement more efficient multi-file seeking (#2342)
authorNikos Tsipinakis <nikos@tsipinakis.com>
Sun, 7 Sep 2025 11:18:31 +0000 (13:18 +0200)
committerGitHub <noreply@github.com>
Sun, 7 Sep 2025 11:18:31 +0000 (13:18 +0200)
commit397099bed80d65be377cf8fc7ad21b662db43ca2
treec4b172bf0aa4c0a6ce460ab0ff101c6db315d23a
parentfaae0e0d05208fcc02514c0d508149911c40d0cc
audiobookshelf: Implement more efficient multi-file seeking (#2342)

The previous seeking implementation relied on downloading all audiobook
files and concatenating them together (and then doing it again every
time the user seeked). With a large book, this very quickly became slow
and a resource hog.

A more efficient way is to use the audio track duration information to
determine which track to start the playback at.
music_assistant/helpers/audio.py
music_assistant/providers/audiobookshelf/__init__.py