diff --git a/plugin/API/API.php b/plugin/API/API.php index bb0fd1a6fd..ca6ed7092e 100644 --- a/plugin/API/API.php +++ b/plugin/API/API.php @@ -159,6 +159,9 @@ class API extends PluginAbstract { } $SubtitleSwitcher = YouPHPTubePlugin::loadPluginIfEnabled("SubtitleSwitcher"); foreach ($rows as $key=>$value) { + if(empty($value['filename'])){ + continue; + } $rows[$key]['images'] = Video::getImageFromFilename($value['filename']); $rows[$key]['videos'] = Video::getVideosPaths($value['filename'], true); if ($SubtitleSwitcher) {