Add autoplay for next book in series after queue ends #4698
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief summary
This PR adds automatic playing a series if the queue ends. It intentionally does NOT add all the items to the queue, a. to save bandwith and b. to give users the possibility to add items to the queue.
Which issue is fixed?
Fixes #4007
In-depth Description
This adds a new route to get the next book in a series. This could be done in the frontend, but I decided not to because a series can have hundreds of books and fetching the full series at once would not be good. This endpoint can also be used by other apps to display the following books and is a small addition. I hope this makes sense.
The next book in a series only plays if the queue is empty and there is a next book available. If auto play in the queue is disabled, it will not play. I am not sure if that is the best way (since people might want to use the queue and not automatically listen to series books, but I think adding a new control just for this is unnecessary).
How have you tested this?
Own server
Screenshots
None