1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00

Fix errors

This commit is contained in:
DanieL 2022-12-16 09:37:44 -03:00
parent 94eac4e554
commit 3bbe911b98
2 changed files with 2 additions and 2 deletions

View file

@ -14,7 +14,7 @@ foreach ($videos as $value) {
$newTotal = VideoStatistic::getSecondsWatchedFromVideos_id($value['id']); $newTotal = VideoStatistic::getSecondsWatchedFromVideos_id($value['id']);
if($newTotal>$value['total_seconds_watching']){ if($newTotal>$value['total_seconds_watching']){
$sql = "UPDATE videos SET total_seconds_watching = ?, modified = now() WHERE id = ?"; $sql = "UPDATE videos SET total_seconds_watching = ?, modified = now() WHERE id = ?";
sqlDAL::writeSql($sql, "ii", [$newTotal, $value['id']]); sqlDAL::writeSql($sql, "ii", [intval($newTotal), intval($value['id'])]);
echo "{$count}/{$total} SUCCESS $newTotal>{$value['total_seconds_watching']}".PHP_EOL; echo "{$count}/{$total} SUCCESS $newTotal>{$value['total_seconds_watching']}".PHP_EOL;
}else{ }else{
echo "{$count}/{$total} SKIPP $newTotal>{$value['total_seconds_watching']}".PHP_EOL; echo "{$count}/{$total} SKIPP $newTotal>{$value['total_seconds_watching']}".PHP_EOL;

View file

@ -209,7 +209,7 @@ if (!class_exists('Video')) {
$sql = "UPDATE videos SET total_seconds_watching = ?, modified = now() WHERE id = ?"; $sql = "UPDATE videos SET total_seconds_watching = ?, modified = now() WHERE id = ?";
//_error_log("addSecondsWatching: " . $sql . "={$this->id}"); //_error_log("addSecondsWatching: " . $sql . "={$this->id}");
return sqlDAL::writeSql($sql, "ii", [$newTotal, $this->id]); return sqlDAL::writeSql($sql, "ii", [intval($newTotal), intval($this->id)]);
} }
public function updateViewsCount($total) { public function updateViewsCount($total) {