diff --git a/PlayBot/utils/db/get.pm b/PlayBot/utils/db/get.pm index 57af3bdeacaf781aa5c925c8780935539d089e52..e73c2547fce641f84c83111d342ed96bbed03f53 100644 --- a/PlayBot/utils/db/get.pm +++ b/PlayBot/utils/db/get.pm @@ -149,6 +149,7 @@ sub _prepare_request { $req = 'select p.id, p.sender, p.title, p.url, p.duration'; $req .= ' from playbot p where '.$where; $req .= ' and '.$words_sql if ($words_sql); + $req .= ' and p.playlist is false'; $req .= ' group by p.id order by rand()'; @args = (@{$query->tags}, @words_param); @@ -158,6 +159,7 @@ sub _prepare_request { $req .= ' from playbot p join playbot_chan pc on p.id = pc.content'; $req .= ' where '.$where; $req .= ' and '.$words_sql if ($words_sql); + $req .= ' and p.playlist is false'; $req .= ' and pc.chan = ? group by p.id order by rand()'; @args = (@{$query->tags}, @words_param, $query->chan); @@ -168,6 +170,7 @@ sub _prepare_request { $req = 'select p.id, p.sender, p.title, p.url, p.duration'; $req .= ' from playbot p'; $req .= ' where '.$words_sql if ($words_sql); + $req .= ' and p.playlist is false'; $req .= ' group by p.id order by rand()'; @args = (@words_param); @@ -177,6 +180,7 @@ sub _prepare_request { $req .= ' from playbot p join playbot_chan pc on p.id = pc.content'; $req .= ' where pc.chan = ?'; $req .= ' and '.$words_sql if ($words_sql); + $req .= ' and p.playlist is false'; $req .= ' group by p.id order by rand()'; @args = ($query->chan, @words_param);