• Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    SQL failure on my smart playlists

    Scheduled Pinned Locked Moved
    Technical Help
    2
    6
    415
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      rajm
      last edited by

      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.

      jonasJ 1 Reply Last reply Reply Quote 0
      • jonasJ
        jonas @rajm
        last edited by

        @rajm

        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 SerializedSmartPlaylists section from strawberry.conf, you can send it to me in private message.

        R 1 Reply Last reply Reply Quote 0
        • R
          rajm @jonas
          last edited by

          @jonas Reply sent my message - thanks!

          R 1 Reply Last reply Reply Quote 0
          • R
            rajm @rajm
            last edited by

            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.

            jonasJ 1 Reply Last reply Reply Quote 0
            • jonasJ
              jonas @rajm
              last edited by

              @rajm
              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.

              R 1 Reply Last reply Reply Quote 0
              • R
                rajm @jonas
                last edited by

                @jonas Downloaded that build and on running LGTM - thanks!

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB | Contributors