1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
This commit is contained in:
Daniel Neto 2023-09-29 17:12:18 -03:00
parent cbfa449a18
commit be19994095
2 changed files with 5 additions and 5 deletions

View file

@ -675,17 +675,15 @@ class PlayList extends ObjectYPT {
}
public static function getVideosIdFromPlaylist($playlists_id) {
global $getVideosIdFromPlaylist;
$cacheName = "getVideosFromPlaylist{$playlists_id}" . DIRECTORY_SEPARATOR . "getVideosIdFromPlaylist";
$videosId = self::getCacheGlobal($cacheName, 0);
$cacheHandler = new PlayListCacheHandler($playlists_id);
$videosId = $cacheHandler->getCache('getVideosFromPlaylist', 0);
if (empty($videosId)) {
$videosId = [];
$rows = static::getVideosIDFromPlaylistLight($playlists_id);
foreach ($rows as $value) {
$videosId[] = $value['videos_id'];
}
$cache = self::setCacheGlobal($cacheName, $videosId);
$cacheHandler->setCache($videosId);
}
return $videosId;
}

View file

@ -1879,6 +1879,8 @@ if (!class_exists('Video')) {
$row = self::getInfo($row, $getStatistcs);
if($getStatistcs){
$row = self::getInfoPersonal($row);
}else{
$row['progress'] = ['percent' => 0, 'lastVideoTime' => 0, 'duration' => $row['duration_in_seconds']];
}
TimeLogEnd($tlogName, __LINE__, $tolerance / 2);