aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2020-05-20 14:47:12 +0300
committerRblSb <msrblsb@gmail.com>2020-05-20 14:47:12 +0300
commit97bad11001aeb299e0e8c339af77368e065d215d (patch)
treebf4996916d6099dd0443c3239f2b1c3d05a4ecd5 /build
parent5abb726dc80decc2e3a73164905f1b8cccf9c47d (diff)
Fix server video skip for guests
Diffstat (limited to 'build')
-rw-r--r--build/server.js27
1 files changed, 15 insertions, 12 deletions
diff --git a/build/server.js b/build/server.js
index bc54fbb..02b5503 100644
--- a/build/server.js
+++ b/build/server.js
@@ -3637,7 +3637,7 @@ server_Main.prototype = {
if(_gthis.videoList.length != currentLength) {
return;
}
- _gthis.onMessage(client,{ type : "SkipVideo", skipVideo : { url : _gthis.videoList[_gthis.itemPos].url}});
+ _gthis.skipVideo({ type : "SkipVideo", skipVideo : { url : _gthis.videoList[_gthis.itemPos].url}});
},1000);
return;
}
@@ -3859,17 +3859,7 @@ server_Main.prototype = {
if(!this.checkPermission(client,"removeVideo")) {
return;
}
- if(this.videoList.length == 0) {
- return;
- }
- if(this.videoList[this.itemPos].url != data.skipVideo.url) {
- return;
- }
- this.itemPos = VideoList.skipItem(this.videoList,this.itemPos);
- if(this.videoList.length > 0) {
- this.restartWaitTimer();
- }
- this.broadcast(data);
+ this.skipVideo(data);
break;
case "ToggleItemType":
VideoList.toggleItemType(this.videoList,data.toggleItemType.pos);
@@ -3928,6 +3918,19 @@ server_Main.prototype = {
client.ws.send(json,null);
}
}
+ ,skipVideo: function(data) {
+ if(this.videoList.length == 0) {
+ return;
+ }
+ if(this.videoList[this.itemPos].url != data.skipVideo.url) {
+ return;
+ }
+ this.itemPos = VideoList.skipItem(this.videoList,this.itemPos);
+ if(this.videoList.length > 0) {
+ this.restartWaitTimer();
+ }
+ this.broadcast(data);
+ }
,checkPermission: function(client,perm) {
var state = this.hasPermission(client,perm);
if(!state) {
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage