-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[JSON]Fix filtering in GetSongs and GetAlbums #14201
Conversation
xbmc/music/MusicDatabase.cpp
Outdated
// Count number of songs that satisfy selection criteria | ||
// (includes xsp limits from filter, but not sort limits) | ||
// Use songview as filter rules in where clause may use album and path JOIN fields | ||
total = (int)strtol(GetSingleValue("SELECT COUNT(1) FROM songview " + strSQLExtra, m_pDS).c_str(), NULL, 10); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Win10 test build available here @zag2me or @rmrector if you would care to test it |
Tested on windows and confirmed this fixes the SQL error I found while using the Artwork beef Add-on. Thanks! |
a63c24f
to
1cf8e78
Compare
@DaveTBlake there's an issue with the first GetAlbums query and MySQL (btw it should be
results in
and in kodi.log:
The query is:
and when running this query in MySQL Workbench, the error is:
Which is nasty. The following query works, but I'm not suggesting it's a good solution...
|
1cf8e78
to
c5cf694
Compare
Thanks for testing @MilhouseVH, darn substandard MySQL strikes again! |
I've tested the two queries in this PR again, and the MySQL issue is resolved. I've also repeated the testing from the previous PR, and those queries continue to return the expected results. Many thanks @DaveTBlake, this looks good to me. |
Fix path filtering in AudioLibrary::GetSongs and filtering by playcount, lastplayed or dateadded in AudioLibrary::GetAlbums after changes of #14160.
JSON API version bump patch as only internal processing change.
Can be tested with JSON commands: