Conversation
| self.logger.error(without_series) | ||
| if without_series: | ||
| extra_query_parts = [ | ||
| "WHERE json_extract(audiobooks.metadata, '$.series') IS NULL " |
Contributor
There was a problem hiding this comment.
Let's be defensive here and already add ( and ) around the OR
| """ | ||
| # key is the series' title | ||
| series_dict: dict[str, list[Audiobook]] = {} | ||
| audiobooks_with_series = await self.get_library_items_by_query( |
Contributor
There was a problem hiding this comment.
I think limit and offset are now applied on AudioBooks here rather than on the series itself?
Contributor
Author
There was a problem hiding this comment.
Hmm, that's true. I removed it completely now, as I don't think that I can apply this offset by pure db methods? The default limit for items is 500, and having more than 500 series would be extraordinary I think. Not certain here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on
music-assistant/models#196
I'm testing with abs, but I can split that off from this PR once I'm out of drafting.
I added just a single api endpoint to get series. So the idea would be, that, if the users selects that, the api calls library_items and filters series out, and then calls series.