@ -42,6 +42,7 @@ app.get('/videos', (req, res) => {
const list = [];
for (const dir of videoDirs) {
try {
if (!fs.existsSync(dir)) {
continue;
}
@ -56,6 +57,10 @@ app.get('/videos', (req, res) => {
list.push(file);
});
catch (error) {
console.error(error);
res.json(list);