1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

Version 6.3 add support for video history

This commit is contained in:
daniel 2018-11-28 14:15:01 -03:00
parent 32177e8caa
commit fe3c80ccab
19 changed files with 410 additions and 176 deletions

View file

@ -341,12 +341,20 @@ function copyToClipboard(text) {
$temp.remove();
}
function addView(videos_id) {
var last_videos_id = 0;
var last_currentTime = -1;
function addView(videos_id,currentTime) {
if(last_videos_id == videos_id && last_currentTime == currentTime){
return false;
}
last_videos_id = videos_id;
last_currentTime = currentTime;
$.ajax({
url: webSiteRootURL + 'objects/videoAddViewCount.json.php',
method: 'POST',
data: {
'id': videos_id
'id': videos_id,
'currentTime': currentTime
},
success: function (response) {
$('.view-count' + videos_id).text(response.count);