Closed TaurusI76 closed 8 months ago
Thanks for letting me know. I don't have genres with single quotes so it never came up. Should be fixed in 4.3.6.
Thanks! I thought it's probably easier for you to fix it than for me to dig through the code & contribute. Thank you for fixing it!
On Thu, Feb 29, 2024 at 1:03 PM AF-1 @.***> wrote:
Thanks for letting me know. I don't have genres with single quotes so it never came up. Should be fixed in 4.3.6.
— Reply to this email directly, view it on GitHub https://github.com/AF-1/lms-dynamicplaylists/issues/14#issuecomment-1970993853, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVSMRFAZQZKIJY3ZZJGV2DYV4MKRAVCNFSM6AAAAABD7OTR5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZQHE4TGOBVGM . You are receiving this because you authored the thread.Message ID: @.***>
Checklist
❗️ Please take a quick look at [this checklist](https://github.com/AF-1/sobras/wiki/Checklist-to-eliminate-common-causes-of-LMS-(plugin)-problems) to eliminate common causes of LMS (plugin) problems. Thank you.
DESCRIBE THE BUG
If you add a genre containing a single quote (e.g. Children's) to the list of genres to exclude (Excluded genres) in the DynamicPlaylist plugin's settings, the dynamic playlist fails to play due to a non-escaped single quote in the playlist's SQL statement.
TO REPRODUCE
Steps to reproduce the behavior:
EXPECTED BEHAVIOR
The dynamic playlist will be added to the playlist and will play.
LOG EXCERPT
2024/02/29 08:53:57,stdout,"[24-02-29 08:53:57.6244] Slim::Schema::Storage::throw_exception (121) Error: DBI Exception: DBD::SQLite::db prepare failed: near \"s\": syntax error [for Statement \"select tracks.id, tracks.primary_artist from tracks left join library_track on library_track.track = tracks.id join alternativeplaycount on alternativeplaycount.urlmd5 = tracks.urlmd5 and ifnull(alternativeplaycount.playCount, 0) = 0 left join dynamicplaylist_history on dynamicplaylist_history.id = tracks.id and dynamicplaylist_history.client = '10:7b:44:93:2e:02' where tracks.audio = 1 and dynamicplaylist_history.id is null and tracks.secs >= 90 and not exists (select * from tracks t2,genre_track,genres where t2.id = tracks.id and tracks.id = genre_track.track and genre_track.genre = genres.id and genres.name in ('Non-Music','Children's','Comedy','Books & Spoken','Audiobook','Hörspiel')) and case when ('' != '' and '' is not null) then library_track.library = '' else 1 end group by tracks.id\"] "
NAME/CODE OF DYNAMIC PLAYLIST
Songs - never played (APC)
VERSION INFO