From 79d9ca3bbbca357e0a34b484c57750577a8a1317 Mon Sep 17 00:00:00 2001
From: Alexandre Morignot <erdnaxeli@cervoi.se>
Date: Tue, 29 Mar 2016 21:38:37 +0200
Subject: [PATCH] !get does not get playlists (for now)

---
 PlayBot/utils/db/get.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/PlayBot/utils/db/get.pm b/PlayBot/utils/db/get.pm
index 57af3bd..e73c254 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);
-- 
GitLab