From 16cd5f2e176a2ea551309e7daa0d455e0e876ae8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 9 Dec 2022 09:30:27 +0200 Subject: [PATCH] profile anthem - allow downloading age-restricted videos --- .gitignore | 1 + files/routes/settings.py | 1 + files/templates/settings/personal.html | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8c54368a9..41fe8a917 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .env +.cookies venv/ __pycache__/ .idea/ diff --git a/files/routes/settings.py b/files/routes/settings.py index 6753eb419..fd22453a3 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -801,6 +801,7 @@ def settings_song_change(v): os.remove(f"/songs/{v.song}.mp3") ydl_opts = { + 'cookiefile': '.cookies', 'outtmpl': '/songs/%(title)s.%(ext)s', 'format': 'bestaudio/best', 'postprocessors': [{ diff --git a/files/templates/settings/personal.html b/files/templates/settings/personal.html index 9aa713dfb..6ba99cf0c 100644 --- a/files/templates/settings/personal.html +++ b/files/templates/settings/personal.html @@ -212,7 +212,7 @@
- +

In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.