mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +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) {
|
function saveIt(videoLink) {
|
||||||
modal.showPleaseWait();
|
modal.showPleaseWait();
|
||||||
|
setTimeout(function () {
|
||||||
var itemsToSave = [];
|
var itemsToSave = [];
|
||||||
for (x in videoLink) {
|
for (x in videoLink) {
|
||||||
if (typeof videoLink[x] == 'function') {
|
if (typeof videoLink[x] === 'function') {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.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,
|
async: false,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
var item = {};
|
var item = {};
|
||||||
|
@ -174,7 +173,6 @@ $obj = YouPHPTubePlugin::getObjectData("BulkEmbed");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(itemsToSave);
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BulkEmbed/save.json.php',
|
url: '<?php echo $global['webSiteRootURL']; ?>plugin/BulkEmbed/save.json.php',
|
||||||
data: {"itemsToSave": itemsToSave},
|
data: {"itemsToSave": itemsToSave},
|
||||||
|
@ -188,7 +186,7 @@ $obj = YouPHPTubePlugin::getObjectData("BulkEmbed");
|
||||||
modal.hidePleaseWait();
|
modal.hidePleaseWait();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
function search() {
|
function search() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue