SQL failure on my smart playlists
With 1.0.15 (thanks for the 'show in collection' group fix here ) if I edit one of my smart playlists I'm getting the following SQL error:
Unable to execute SQL query: No query Unable to fetch row<br />Failed query: SELECT ROWID,title, album, artist, albumartist, track, disc, year, originalyear, genre, compilation, composer, performer, grouping, comment, lyrics, artist_id, album_id, song_id, beginning, length, bitrate, samplerate, bitdepth, source, directory_id, url, filetype, filesize, mtime, ctime, unavailable, fingerprint, playcount, skipcount, lastplayed, lastseen, compilation_detected, compilation_on, compilation_off, compilation_effective, art_automatic, art_manual, effective_albumartist, effective_originalyear, cue_path, rating FROM songs WHERE (DATE(ctime, 'unixepoch', 'localtime') LIKE '%DATE(1, 'unixepoch', 'localtime')%' AND playcount LIKE '%0%') AND unavailable = 0 ORDER BY albumartist DESC
'No query'? And, inevitably no tracks are shown. Existing playlists built on those still appear to populate in dynamic mode.
jonas last edited by
Th error message isn't very good, but at least it's showing the failed query, so if we manually run that in sqlite we get the following:
Parse error: near "unixepoch": syntax error (ctime, 'unixepoch', 'localtime') LIKE '%DATE(1, 'unixepoch', 'localtime')%' A error here ---^
The obvious problem here is that Strawberry is adding single quotes around DATE ,like
'DATE()', this is what's done when the query is text.
It should have been
DATE(1, 'unixepoch', 'localtime')
But another question is, why the date is "1". So obiously something isn't loaded correctly from the configuration file.
I looked at the source code, but I can't find anything obiously wrong.
If possible, could you send me the
SerializedSmartPlaylistssection from strawberry.conf, you can send it to me in private message.
@jonas Reply sent my message - thanks!
And I can easily replicate this - from within the same session - by creating a smart playlist - with a search term of 'not in the last 3 years', show only the first 20 songs, sort by album, save it. And then edit that new playlist.
jonas last edited by
This should be fixed now (https://github.com/strawberrymusicplayer/strawberry/issues/1172).
Nice if someone could test the latest from https://builds.strawberrymusicplayer.org/ and report back if there are still any issues.
@jonas Downloaded that build and on running LGTM - thanks!