mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Bulk embed youtube videos
This commit is contained in:
parent
2f03468bfa
commit
0113773c12
1 changed files with 30 additions and 32 deletions
|
@ -153,15 +153,14 @@ $obj = YouPHPTubePlugin::getObjectData("BulkEmbed");
|
|||
|
||||
function saveIt(videoLink) {
|
||||
modal.showPleaseWait();
|
||||
|
||||
setTimeout(function () {
|
||||
var itemsToSave = [];
|
||||
for (x in videoLink) {
|
||||
if (typeof videoLink[x] == 'function') {
|
||||
if (typeof videoLink[x] === 'function') {
|
||||
continue;
|
||||
}
|
||||
$.ajax({
|
||||
url: "https://www.googleapis.com/youtube/v3/videos?id="+videoLink[x]+"&part=id,snippet,contentDetails&key="+gapikey,
|
||||
|
||||
url: "https://www.googleapis.com/youtube/v3/videos?id=" + videoLink[x] + "&part=id,snippet,contentDetails&key=" + gapikey,
|
||||
async: false,
|
||||
success: function (data) {
|
||||
var item = {};
|
||||
|
@ -174,7 +173,6 @@ $obj = YouPHPTubePlugin::getObjectData("BulkEmbed");
|
|||
}
|
||||
});
|
||||
}
|
||||
console.log(itemsToSave);
|
||||
$.ajax({
|
||||
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BulkEmbed/save.json.php',
|
||||
data: {"itemsToSave": itemsToSave},
|
||||
|
@ -188,7 +186,7 @@ $obj = YouPHPTubePlugin::getObjectData("BulkEmbed");
|
|||
modal.hidePleaseWait();
|
||||
}
|
||||
});
|
||||
|
||||
}, 500);
|
||||
}
|
||||
|
||||
function search() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue