2019-06-15, 15:16
My album scraper has updated the releasedate and year fields for my albums. Now when I view my music by year the album shows up but its songs do not.
It appears that Kodi is issuing a query on songs based on the year as well (which seems odd). I can see this in my log:
SELECT songview.*, songartistview.*
FROM songview JOIN songartistview ON songartistview.idsong = songview.idsong
WHERE (songview.iYear = 1959) AND (songview.idAlbum = 852) ORDER BY songartistview.idsong, songartistview.idRole, songartistview.iOrder
This doesn't seem right to me, it is filtering for songs on both the album id and the song date. Once the scrapers have been run there is no guarantee that the song dates will match the album ones.
The query seems to be coming from: xbmc\music\MusicDatabase.cpp
option = options.find("year");
if (option != options.end())
filter.AppendWhere(PrepareSQL("songview.iYear = %i", static_cast<int>(option->second.asInteger())));
It appears that Kodi is issuing a query on songs based on the year as well (which seems odd). I can see this in my log:
SELECT songview.*, songartistview.*
FROM songview JOIN songartistview ON songartistview.idsong = songview.idsong
WHERE (songview.iYear = 1959) AND (songview.idAlbum = 852) ORDER BY songartistview.idsong, songartistview.idRole, songartistview.iOrder
This doesn't seem right to me, it is filtering for songs on both the album id and the song date. Once the scrapers have been run there is no guarantee that the song dates will match the album ones.
The query seems to be coming from: xbmc\music\MusicDatabase.cpp
option = options.find("year");
if (option != options.end())
filter.AppendWhere(PrepareSQL("songview.iYear = %i", static_cast<int>(option->second.asInteger())));