Not including suggested songs in fetching of playlist

This commit is contained in:
Kasper Rynning-Tønnesen
2018-11-05 14:50:06 +01:00
parent 22ee6b6fcf
commit 2003383967

View File

@@ -846,7 +846,11 @@ router.route('/api/list/:channel_name').get(function(req, res) {
var channel_name = cleanChannelName(req.params.channel_name);
db.collection(channel_name).aggregate([
{
"$match": { }
"$match": {
"type": {
"$ne": "suggested"
}
}
},
{
"$project": projects.project_object
@@ -1162,7 +1166,11 @@ router.route('/api/list/:channel_name').post(function(req, res) {
} else {
db.collection(channel_name).aggregate([
{
"$match": { }
"$match": {
"type": {
"$ne": "suggested"
}
}
},
{ "$project": projects.project_object },
{ "$sort" : { "now_playing" : -1, "votes": -1, "added": 1, "title": 1 } }