diff --git a/src/router/html.ts b/src/router/html.ts index 552d06f..a1b3509 100644 --- a/src/router/html.ts +++ b/src/router/html.ts @@ -28,13 +28,15 @@ app.get('/save', async ({ query: { url }, set, headers, error }) => { if (healthStatus[process.env.METADATA!] != 'healthy') { websocket = process.env.ALTERNATIVE_WEBSOCKET! } + const ytPatched = (process.env.YT_PATCHED || '').toLowerCase() === 'true' || process.env.YT_PATCHED === '1' set.headers['Content-Type'] = 'text/html; charset=utf-8' return await m(eta.render('./save', { title: 'Save Video | PreserveTube', websocket, sitekey: process.env.SITEKEY, - url + url, + ytPatched })) }) @@ -94,4 +96,4 @@ app.get('/donate', async ({ set }) => { }) app.onError(error) -export default app; \ No newline at end of file +export default app; diff --git a/src/templates/save.eta b/src/templates/save.eta index 124f24e..5f1ec86 100644 --- a/src/templates/save.eta +++ b/src/templates/save.eta @@ -1,7 +1,9 @@ <% layout('./layout') %> -<% /*