-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add Audiobookshelf audiobooks & podcast provider #1857
Add Audiobookshelf audiobooks & podcast provider #1857
Conversation
I don't know how to make all type hints.
as in jellyfin provider
@fmunkes can you provide some text for the docs? We have the following headings. You don’t need text for all of them. Please see the other providers for ideas of what to add. I could extract most of this from your opening post in the PR but I am conscious of the improvements you may have made since then. Just the text is fine I will do the actual PR for the docs as a number of things need to be done. FEATURES |
We're looking into this one, seems to be a bug. Expect to be solved soon.
No and that is by design. It will be called when playback completed (full item played or playback stopped) which is enough imo.
No and that is by design. Why would we want to report it regularly ?
None, which should be fixed. I will adjust it so it calls on_streamed with 0 seconds or something (I'll chew on it a bit)
This is still topic of discussion as there seem to be multiple different implementations in the wild but the most common one is a single file per audiobook or podcast-episode with optional chapters.
OK, that will have to be fixed before we can merge but just ask for help and we will help you |
Co-authored-by: OzGav <gavnosp@hotmail.com>
@OzGav documentation: FEATURES
CONFIGURATION
KNOWN ISSUES/ NOTESAudiobookshelf supports multiple files (e.g. one file per chapter) per Audiobook. Music Assistant however expects a single file. It is suggested to merge multiple files into a single file. You can do this in Audiobookshelf by selecting the Audiobook, click edit, then tools and finally "Open Manager". You will see the merge option there. Do not forget to take a backup of your initial files. NOT YET SUPPORTED
|
Thanks - I think my other "on_streamed remarks" become obsolete when this is resolved.
Thank you!
I think for the time being it is sufficient to just add a comment to the documentation (maybe also to the overall one of 'Audiobooks'?). In the case of Audiobookshelf, merging into one file can be achieved within the UI. |
There is a currently a single mypy error left. Everything else was resolved by switching to mashumaro as suggested. |
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.
RE your mypy error, that's a mypy quirk. Not sure whether its a limitation or a deliberate decision, but you can't use a variable twice for different types. Line 493 makes it think item
is a podcast. Then on line 496 item
is an audio book. I don't know if there is a better way, but if you had something link async from audiobook in ...
it will probably work.
as recommended by @OzGav, https://iconduck.com/icons/252885/audiobookshelf
otherwise the image overflows the whole "add music provider" selection dialog
RE: on_played
When I try to (un)mark a media item I'm faced with a RuntimeError: Am I missing something here? |
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Co-authored-by: Marcel van der Veldt <m.vanderveldt@outlook.com>
Comment on audiobooks split accross files: |
OK! Keep in mind that you can simply feed the HLS url as url in streamdetails and it will be automagically sorted. |
What player did you use to test it ? |
Ah, excellent, I just had a look at the StreamDetails class. I do have some more time on Saturday/ Sunday, so I could report back by the end of this week on this part. So we could also wait for this, and then continue from there. I guess, I'll return something like this then:
i.e. the path is an m3u8 playlist. |
I used a Chromecast, and tried just now via Airplay, same result. I can also try a player integrated via HomeAssistant, though that will be later today again. |
Exactly that should work out of the box! ffmpeg will then care care of stitching it together. |
Leave this with me, I will do some more testing and make the reporting more robust. |
Let's merge this one as-is now so people can start testing it in the beta cycle. |
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.
Excellent work @fmunkes !
Initial support for Audiobookshelf
This PR is an implementation of Audiobookshelf (abs) as music provider.
Features
Possible future improvements
Known issues:
Am I correct, that mass only supports single file based audiobooks? abs may list multiple
audio files per book, so if this is the case, that's something for the documentation. abs even
offers an ffmpeg concat via its interface. Code-wise currently only the first file of an audiobook
is respected.
Is currently disabled for this provider. Unfortunately I had troubles with some type hints, due to
a lack of knowledge on my side. Happy to figure them out.
Personal note: I used Python quite often during the years, however, I'm not a professional developer.
If you think the code is not worth pursuing, don't hesitate to let me know :). I still learned something.
Thanks for the amazing project!