Skip to content
Extraits de code Groupes Projets
Valider 79d9ca3b rédigé par Alexandre Morignot's avatar Alexandre Morignot
Parcourir les fichiers

!get does not get playlists (for now)

parent 2a09dc8e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -149,6 +149,7 @@ sub _prepare_request { ...@@ -149,6 +149,7 @@ sub _prepare_request {
$req = 'select p.id, p.sender, p.title, p.url, p.duration'; $req = 'select p.id, p.sender, p.title, p.url, p.duration';
$req .= ' from playbot p where '.$where; $req .= ' from playbot p where '.$where;
$req .= ' and '.$words_sql if ($words_sql); $req .= ' and '.$words_sql if ($words_sql);
$req .= ' and p.playlist is false';
$req .= ' group by p.id order by rand()'; $req .= ' group by p.id order by rand()';
@args = (@{$query->tags}, @words_param); @args = (@{$query->tags}, @words_param);
...@@ -158,6 +159,7 @@ sub _prepare_request { ...@@ -158,6 +159,7 @@ sub _prepare_request {
$req .= ' from playbot p join playbot_chan pc on p.id = pc.content'; $req .= ' from playbot p join playbot_chan pc on p.id = pc.content';
$req .= ' where '.$where; $req .= ' where '.$where;
$req .= ' and '.$words_sql if ($words_sql); $req .= ' and '.$words_sql if ($words_sql);
$req .= ' and p.playlist is false';
$req .= ' and pc.chan = ? group by p.id order by rand()'; $req .= ' and pc.chan = ? group by p.id order by rand()';
@args = (@{$query->tags}, @words_param, $query->chan); @args = (@{$query->tags}, @words_param, $query->chan);
...@@ -168,6 +170,7 @@ sub _prepare_request { ...@@ -168,6 +170,7 @@ sub _prepare_request {
$req = 'select p.id, p.sender, p.title, p.url, p.duration'; $req = 'select p.id, p.sender, p.title, p.url, p.duration';
$req .= ' from playbot p'; $req .= ' from playbot p';
$req .= ' where '.$words_sql if ($words_sql); $req .= ' where '.$words_sql if ($words_sql);
$req .= ' and p.playlist is false';
$req .= ' group by p.id order by rand()'; $req .= ' group by p.id order by rand()';
@args = (@words_param); @args = (@words_param);
...@@ -177,6 +180,7 @@ sub _prepare_request { ...@@ -177,6 +180,7 @@ sub _prepare_request {
$req .= ' from playbot p join playbot_chan pc on p.id = pc.content'; $req .= ' from playbot p join playbot_chan pc on p.id = pc.content';
$req .= ' where pc.chan = ?'; $req .= ' where pc.chan = ?';
$req .= ' and '.$words_sql if ($words_sql); $req .= ' and '.$words_sql if ($words_sql);
$req .= ' and p.playlist is false';
$req .= ' group by p.id order by rand()'; $req .= ' group by p.id order by rand()';
@args = ($query->chan, @words_param); @args = ($query->chan, @words_param);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter