mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
fix
This commit is contained in:
@@ -125,7 +125,7 @@ function skip(){
|
||||
}
|
||||
|
||||
function importOldList(chan){
|
||||
playlist_url = "http://zoff.no/"+chan+"/php/change.php";
|
||||
playlist_url = "lists/"+chan+".json";
|
||||
|
||||
list = $.ajax({
|
||||
type: "GET",
|
||||
@@ -134,11 +134,18 @@ function importOldList(chan){
|
||||
}).responseText;
|
||||
list = $.parseJSON(list);
|
||||
var ids="";
|
||||
var num=0;
|
||||
$.each(list.songs, function(i,data)
|
||||
{
|
||||
ids+=data.id+",";
|
||||
if(i>48)return;
|
||||
if(num>45){
|
||||
addVideos(ids);
|
||||
ids="";
|
||||
num=0;
|
||||
}
|
||||
num++;
|
||||
});
|
||||
|
||||
addVideos(ids);
|
||||
document.getElementById("search").value = "";
|
||||
}
|
||||
|
||||
@@ -222,11 +222,12 @@ function submitAndClose(id,title,duration){
|
||||
}
|
||||
|
||||
function addVideos(ids){
|
||||
console.log(ids)
|
||||
var request_url="https://www.googleapis.com/youtube/v3/videos?part=contentDetails,snippet,id&key=***REMOVED***&id=";
|
||||
request_url += ids;
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
type: "POST",
|
||||
url: request_url,
|
||||
dataType:"jsonp",
|
||||
success: function(response){
|
||||
|
||||
Reference in New Issue
Block a user