mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Not including suggested songs in fetching of playlist
This commit is contained in:
@@ -846,7 +846,11 @@ router.route('/api/list/:channel_name').get(function(req, res) {
|
|||||||
var channel_name = cleanChannelName(req.params.channel_name);
|
var channel_name = cleanChannelName(req.params.channel_name);
|
||||||
db.collection(channel_name).aggregate([
|
db.collection(channel_name).aggregate([
|
||||||
{
|
{
|
||||||
"$match": { }
|
"$match": {
|
||||||
|
"type": {
|
||||||
|
"$ne": "suggested"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"$project": projects.project_object
|
"$project": projects.project_object
|
||||||
@@ -1162,7 +1166,11 @@ router.route('/api/list/:channel_name').post(function(req, res) {
|
|||||||
} else {
|
} else {
|
||||||
db.collection(channel_name).aggregate([
|
db.collection(channel_name).aggregate([
|
||||||
{
|
{
|
||||||
"$match": { }
|
"$match": {
|
||||||
|
"type": {
|
||||||
|
"$ne": "suggested"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ "$project": projects.project_object },
|
{ "$project": projects.project_object },
|
||||||
{ "$sort" : { "now_playing" : -1, "votes": -1, "added": 1, "title": 1 } }
|
{ "$sort" : { "now_playing" : -1, "votes": -1, "added": 1, "title": 1 } }
|
||||||
|
|||||||
Reference in New Issue
Block a user