A clean and minimal youtube frontend, without all the ads and whistles
JavaScript
chore: cleanup
Christian Feifa747ad8ff1a
diff --git a/lib/server.js b/lib/server.jsindex f541aab..180950e 100644--- a/lib/server.js+++ b/lib/server.js@@ -171,7 +171,6 @@ export function createServer ({repo, connections = []}) {res.end('Download started')}-async function ignoreVideoHandler(req, res, repo, connections = []) {const body = await getBody(req)let { id } = JSON.parse(body)@@ -278,6 +277,7 @@ export function createServer ({repo, connections = []}) {res.writeHead(200, { 'Content-Type': 'application/json' })res.end(JSON.stringify(videoQuality))}+async function setVideoQualityHandler(req, res) {const body = await getBody(req)const videoQuality = JSON.parse(body)@@ -304,6 +304,7 @@ export function createServer ({repo, connections = []}) {res.writeHead(200, { 'Content-Type': 'text/plain' })res.end(diskSpaceUsed.toFixed(3) + 'GB')}+function reclaimDiskSpaceHandler(req, res) {const videos = repo.getVideos()const ignoredVideos = videos.filter(video => video.downloaded)