mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Trying some more fixes for the unknown error for .id undefined
This commit is contained in:
@@ -57,17 +57,19 @@ var Crypt = {
|
||||
},
|
||||
|
||||
decrypt_pass: function(pass) {
|
||||
var key = btoa(socket.id) + btoa(socket.id);
|
||||
key = key.substring(0,32);
|
||||
key = btoa(key);
|
||||
var decrypted = CryptoJS.AES.decrypt(
|
||||
pass,key,
|
||||
{
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
}
|
||||
);
|
||||
return decrypted.toString(CryptoJS.enc.Utf8);
|
||||
if(socket) {
|
||||
var key = btoa(socket.id) + btoa(socket.id);
|
||||
key = key.substring(0,32);
|
||||
key = btoa(key);
|
||||
var decrypted = CryptoJS.AES.decrypt(
|
||||
pass,key,
|
||||
{
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.Pkcs7
|
||||
}
|
||||
);
|
||||
return decrypted.toString(CryptoJS.enc.Utf8);
|
||||
} return false;
|
||||
},
|
||||
|
||||
encrypt: function(json_formated, cookie) {
|
||||
|
||||
@@ -186,7 +186,7 @@ var Frontpage = {
|
||||
|
||||
add_backdrop: function(list, i) {
|
||||
if(i >= list.length || i >= 20) i = 0;
|
||||
|
||||
if(list[i] == undefined) return;
|
||||
var id = list[i].id;
|
||||
if(Frontpage.blob_list[i] !== undefined){
|
||||
//$(".room-namer").css("opacity", 0);
|
||||
|
||||
@@ -241,25 +241,26 @@ var List = {
|
||||
|
||||
check_error_videos: function(i) {
|
||||
//Helper.log("Empty-checker at " + i);
|
||||
$.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + full_playlist[i].id
|
||||
+ "&key=" + api_key + "&part=snippet",
|
||||
function (data, status, xhr) {
|
||||
//Helper.log("Empty-checker items " + data.items.length);
|
||||
if (data.items.length == 0) {
|
||||
Helper.log(["Emtpy-checker error at " + full_playlist[i].id + " " + full_playlist[i].title]);
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: full_playlist[i].id, title: full_playlist[i].title});
|
||||
}
|
||||
if(full_playlist.length > i + 1 && window.location.pathname != "/") {
|
||||
List.check_error_videos(i + 1);
|
||||
}
|
||||
|
||||
}).error(function (xhr, errorType, exception) {
|
||||
if(full_playlist.length == 0) return;
|
||||
$.getJSON('https://www.googleapis.com/youtube/v3/videos?id=' + full_playlist[i].id
|
||||
+ "&key=" + api_key + "&part=snippet",
|
||||
function (data, status, xhr) {
|
||||
//Helper.log("Empty-checker items " + data.items.length);
|
||||
if (data.items.length == 0) {
|
||||
Helper.log(["Emtpy-checker error at " + full_playlist[i].id + " " + full_playlist[i].title]);
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: full_playlist[i].id, title: full_playlist[i].title});
|
||||
if(full_playlist.length > i + 1 && window.location.pathname != "/") {
|
||||
List.check_error_videos(i + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
if(full_playlist.length > i + 1 && window.location.pathname != "/") {
|
||||
List.check_error_videos(i + 1);
|
||||
}
|
||||
|
||||
}).error(function (xhr, errorType, exception) {
|
||||
Helper.log(["Emtpy-checker error at " + full_playlist[i].id + " " + full_playlist[i].title]);
|
||||
socket.emit("error_video", {channel: chan.toLowerCase(), id: full_playlist[i].id, title: full_playlist[i].title});
|
||||
if(full_playlist.length > i + 1 && window.location.pathname != "/") {
|
||||
List.check_error_videos(i + 1);
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
dynamicContentPageJumpTo: function(page) {
|
||||
|
||||
Reference in New Issue
Block a user