mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Fix video seconds count
This commit is contained in:
parent
e4eebfb104
commit
62fc92096f
5 changed files with 90 additions and 22 deletions
|
@ -531,10 +531,15 @@ function _addViewAsync() {
|
|||
});
|
||||
}
|
||||
|
||||
var _addViewFromCookie_addingtime = false;
|
||||
function addViewFromCookie() {
|
||||
if (typeof webSiteRootURL == 'undefined') {
|
||||
return false;
|
||||
}
|
||||
if(_addViewFromCookie_addingtime){
|
||||
return false;
|
||||
}
|
||||
_addViewFromCookie_addingtime = true;
|
||||
var addView_PHPSESSID = Cookies.get('addView_PHPSESSID');
|
||||
var addView_videos_id = Cookies.get('addView_videos_id');
|
||||
var addView_playerCurrentTime = Cookies.get('addView_playerCurrentTime');
|
||||
|
@ -566,13 +571,14 @@ function addViewFromCookie() {
|
|||
},
|
||||
async: false,
|
||||
success: function (response) {
|
||||
_addViewFromCookie_addingtime = false;
|
||||
console.log('addViewFromCookie', response);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function addViewSetCookie(PHPSESSID, videos_id, playerCurrentTime, seconds_watching_video) {
|
||||
//console.log('addViewSetCookie', videos_id, playerCurrentTime, seconds_watching_video);
|
||||
//console.log('addViewSetCookie', videos_id, playerCurrentTime, seconds_watching_video, new Error().stack);
|
||||
Cookies.set('addView_PHPSESSID', PHPSESSID, {
|
||||
path: '/',
|
||||
expires: 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue