1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
This commit is contained in:
Daniel Neto 2023-07-24 15:11:09 -03:00
parent 6efe70ded5
commit 03be29baf5

View file

@ -967,11 +967,14 @@ class API extends PluginAbstract
} }
if ($SubtitleSwitcher) { if ($SubtitleSwitcher) {
$rows[$key]['subtitles'] = getVTTTracks($value['filename'], true); $sub = getVTTTracks($value['filename'], true);
if(!empty($sub)){
$rows[$key]['subtitles'] = $sub;
foreach ($rows[$key]['subtitles'] as $key2 => $value) { foreach ($rows[$key]['subtitles'] as $key2 => $value) {
$rows[$key]['subtitlesSRT'][] = convertSRTTrack($value); $rows[$key]['subtitlesSRT'][] = convertSRTTrack($value);
} }
} }
}
require_once $global['systemRootPath'] . 'objects/comment.php'; require_once $global['systemRootPath'] . 'objects/comment.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php'; require_once $global['systemRootPath'] . 'objects/subscribe.php';
unset($_POST['sort']); unset($_POST['sort']);