Updates for better handling of deleting list and inserting full playlist

This commit is contained in:
Kasper Rynning-Tønnesen
2018-04-05 13:52:05 +02:00
parent 72f204825e
commit 7fde03e88e
2 changed files with 12 additions and 10 deletions

View File

@@ -301,17 +301,15 @@ module.exports = function() {
});
socket.on('delete_all', function(msg) {
if(coll !== undefined) {
try {
coll = msg.channel.toLowerCase().replace(/ /g,'');
if(coll.length == 0) return;
coll = emojiStrip(coll).toLowerCase();
coll = coll.replace(/_/g, "");
try {
coll = msg.channel.toLowerCase().replace(/ /g,'');
if(coll.length == 0) return;
coll = emojiStrip(coll).toLowerCase();
coll = coll.replace(/_/g, "");
coll = filter.clean(coll);
} catch(e) {
return;
}
coll = filter.clean(coll);
} catch(e) {
return;
}
ListChange.delete_all(msg, coll, guid, offline, socket);