Added functionality for offline playing

This commit is contained in:
Kasper Rynning-Tønnesen
2017-01-25 13:57:24 +01:00
parent 275d1a95b2
commit 1305dd3072
13 changed files with 277 additions and 117 deletions

View File

@@ -10,7 +10,6 @@ var List = {
channel_function: function(msg)
{
switch(msg.type)
{
case "list":
@@ -391,12 +390,20 @@ var List = {
},
vote: function(id, vote){
socket.emit('vote', {channel: chan, id: id, type: vote, adminpass: adminpass});
if(!offline){
socket.emit('vote', {channel: chan, id: id, type: vote, adminpass: adminpass});
} else {
List.channel_function({type:"vote", value: id, time: (new Date()).getTime()})
}
return true;
},
skip: function(){
socket.emit('skip', {pass: adminpass, id:video_id, channel: chan.toLowerCase()});
if(!offline){
socket.emit('skip', {pass: adminpass, id:video_id, channel: chan.toLowerCase()});
} else {
Player.playNext();
}
return true;
},