SQL-based paging everywhere, and various other changes
As disussed in this issue, here's the PR that implements SQL-based paging.
However it also includes pretty heavy rewrites of the response-construction logic (and thus, of all endpoints functions), along with other minor additions / changes.
Full list (I think?):
- Response construction is done via one unified dict-like structure and then converted into json or xml, which greatly simplifies adding new endpoints
- All queries that can be paginated are paginated via SQL queries
- Genres splitting when a song or album has a comma (or other delimiter)-separated list
- Made the cover art logic more robust and faster, also fallsback to sending a cover from coverarchive.org when none is found locally
- Added support for any
m3uformat including Beet'splaylistandsmartplaylistplugins' playlists (as well as Beetstream's ownplaylist_diroption of course) - Added support for native
ffmpegif the user donesn't have the python module installed - Added
getAlbumInfoandgetAlbumInfo2endpoints - Various naming and stylistic changes to avoid shadowing built-ins (like
id, etc) and for consistency
Tested with the following clients:
Gonna start implementing support for authentication in another branch and then will add the missing endpoints :)
Cheers!
Just realised the XML version is completely borked haha Please ignore the PR for now!
Oooookay I think we're good to go now - XML version seems to be fine in all the endpoints I could test (using Subtracks on Android).
I merged the dev branch into main so it also includes more stuff:
- Almost all the fields possible in a Child response
- Defining types to add things like play count, starred / liked, last played, to beet's database.
- Avoiding setting
lastModifiedto every time it's queried - hopefully speeding up some refreshes if nothing changed in the db - Various change of naming style
I realise this all became a lot of commits for yous to check though, sorry about that...