Skip to content

armgit / my-yt

Public Imported from GitHub
0

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

JavaScript

fix: exclude format when consolidating videos

Christian Feic107b988b9a3
diff --git a/lib/repository.js b/lib/repository.js
index 1df640f..e80cb91 100644
--- a/lib/repository.js
+++ b/lib/repository.js
@@ -32,9 +32,8 @@ export default class Repository {
fs.readdirSync(`${this.basePath}/videos`).forEach(file => {
const format = file.substring(file.lastIndexOf('.') + 1)
if (!['mp4', 'webm'].includes(format)) return
- if (file.includes('.uncut.')) return
+ if (file.includes('.uncut.') || file.includes('.f')) return // skip .uncut. and formats
const videoId = file.replace('.mp4', '').replace('.webm', '')
- if (videoId.includes('.')) return // skip formats
const location = `${this.basePath}/videos/${file}`
this.updateVideo(videoId, {downloaded: true, location, format})
})