mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Merge pull request #220 from zoff-music/feature/song2
Setting a timed run of the song-testing
This commit is contained in:
@@ -288,6 +288,27 @@ var List = {
|
||||
$("#settings").css("visibility", "visible");
|
||||
$("#settings").css("opacity", "1");
|
||||
$("#wrapper").css("opacity", "1");
|
||||
|
||||
clearTimeout(timed_remove_check);
|
||||
timed_remove_check = setTimeout(function() {
|
||||
$.each(full_playlist, function(j, _current_song) {
|
||||
$.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + _current_song.id
|
||||
+ "&key=" + api_key + "&part=snippet",
|
||||
function (data, status, xhr) {
|
||||
if (data.items.length == 0) {
|
||||
setTimeout(function() {
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: _current_song.id, title: _current_song.title});
|
||||
}, 500);
|
||||
}
|
||||
|
||||
}).error(function (xhr, errorType, exception) {
|
||||
//var errorMessage = exception || xhr.statusText || xhr.responseText;
|
||||
setTimeout(function() {
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: _current_song.id, title: _current_song.title});
|
||||
}, 500);
|
||||
});
|
||||
});
|
||||
}, 1500);
|
||||
},
|
||||
|
||||
dynamicContentPageJumpTo: function(page) {
|
||||
@@ -972,22 +993,6 @@ var List = {
|
||||
attr = ".vote-container";
|
||||
del_attr = "delete_button";
|
||||
|
||||
$.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + video_id
|
||||
+ "&key=" + api_key + "&part=snippet",
|
||||
function (data, status, xhr) {
|
||||
if (data.items.length == 0) {
|
||||
setTimeout(function() {
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: video_id, title: video_title});
|
||||
}, 500);
|
||||
}
|
||||
|
||||
}).error(function (xhr, errorType, exception) {
|
||||
//var errorMessage = exception || xhr.statusText || xhr.responseText;
|
||||
setTimeout(function() {
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: video_id, title: video_title});
|
||||
}, 500);
|
||||
});
|
||||
|
||||
var _temp_duration = Helper.secondsToOther(_song_info.duration);
|
||||
song.find(".card-duration").text(Helper.pad(_temp_duration[0]) + ":" + Helper.pad(_temp_duration[1]));
|
||||
}else if(!list){
|
||||
|
||||
@@ -11,6 +11,7 @@ var time_regex = /P((([0-9]*\.?[0-9]*)Y)?(([0-9]*\.?[0-9]*)M)?(([0-9]*
|
||||
var conf = [];
|
||||
var private_channel = false;
|
||||
var music = 0;
|
||||
var timed_remove_check;
|
||||
var slider_type = "horizontal";
|
||||
var gotten_np = false;
|
||||
var frontpage = 1;
|
||||
@@ -1978,6 +1979,7 @@ function onepage_load(){
|
||||
if(private_channel) add = Crypt.getCookie("_uI") + "_";
|
||||
socket.emit("list", {version: parseInt(localStorage.getItem("VERSION")), channel: add + chan.toLowerCase(), pass: embed ? '' : Crypt.crypt_pass(Crypt.get_userpass(chan.toLowerCase()))});
|
||||
} else if(url_split[3] === "") {
|
||||
clearTimeout(timed_remove_check);
|
||||
changing_to_frontpage = true;
|
||||
$.contextMenu( 'destroy', ".playlist-element" );
|
||||
user_change_password = false;
|
||||
|
||||
Reference in New Issue
Block a user