mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Update
This commit is contained in:
parent
cbfa449a18
commit
be19994095
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue