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