Skip to content

armgit / my-yt

Public Imported from GitHub
0

A clean and minimal youtube frontend, without all the ads and whistles

JavaScript

include only mp4 when checking for downloaded video

Christian Fei952991425cb8
diff --git a/server.js b/server.js
index c54dee8..82842c0 100644
--- a/server.js
+++ b/server.js
@@ -63,6 +63,7 @@ async function main ({port = 3000} = {}) {
const repo = new Repository()
fs.readdirSync('./data/videos').forEach(file => {
+ if (!file.endsWith('.mp4')) return
const videoId = file.replace('.mp4', '')
repo.setVideoDownloaded(videoId)
})