1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-06 03:50:04 +02:00

Libs updates and new version with option to pin videos on channel

This commit is contained in:
Daniel Neto 2024-08-05 11:37:04 -03:00
parent e1f2188de0
commit 1beab3b1c0
8565 changed files with 149805 additions and 165674 deletions

View file

@ -3620,6 +3620,26 @@ async function setVideoSuggested(videos_id, isSuggested) {
})
}
async function setVideoChannelSuggested(videos_id, isSuggested) {
modal.showPleaseWait();
return new Promise((resolve, reject) => {
$.ajax({
url: webSiteRootURL + 'objects/videoPinOnChannel.php',
data: { "id": videos_id, "isSuggested": isSuggested },
type: 'post',
success: function (data) {
modal.hidePleaseWait();
avideoResponse(data);
resolve(data)
},
error: function (error) {
modal.hidePleaseWait();
reject(error)
},
})
})
}
function toogleVideoSuggested(btn) {
var videos_id = $(btn).attr('videos_id');
var isSuggested = $(btn).hasClass('isSuggested');