-
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
Chore: Audiobookshelf - adapt schema to reflect the naming scheme used in the API docs #1898
Chore: Audiobookshelf - adapt schema to reflect the naming scheme used in the API docs #1898
Conversation
that was bad luck - abs got updated to 2.18.0, and they changed some structure apparently. audiobooks appear to befine, podcasts not. I'm looking into this right now |
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.
LGTM
Ah saw this too late - lets hold off merging then. Please mark as ready when its ready again |
Found it. Sorry about that. Just updated the abs container, and then noticed the issue. It appears to be fine again, was just a minor issue. |
Doesn't block this but would be good to add some tests for the schemas and the parse* functions in the provider - you can see how we do that in here: #1859. We are doing snapshot testing, and take a directory of sample JSON data from the target service and verify it against a snapshot of our music_assistant_models like Track, Album, etc. (If you had those tests know, then you'd be able to refactor the schemas and know that you hadn't broken the Music Assistant models that are created in your parse* functions). I can help with that, but I don't have any sample data on my end. |
That indeed sounds like a very good idea, thanks for offering your help! |
That sounds great! |
trying to make it more consistent with api docs. still wip
The naming of the classes is now the same as in the Audiobookshelf API doc.
26bd964
to
8cc6f16
Compare
This PR adapts classes defined in
abs_schema.py
to use the same names (+ prefix ABS) as in the API doc of Audiobookshelf. Many items have multiple variants, e.g. a Book exists in a minified, expanded and normal version. Now, classes are named accordingly:I've been rather loose in the initial version, however, I believe this makes future maintenance and possible enhancements much easier. There is no logical code change in this PR.