profile anthem - allow downloading age-restricted videos

pull/59/head
Aevann1 2022-12-09 09:30:27 +02:00
parent a01cde55ad
commit 16cd5f2e17
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
.env
.cookies
venv/
__pycache__/
.idea/

View File

@ -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': [{

View File

@ -212,7 +212,7 @@
<form action="/settings/song_change" method="post">
<input type="hidden" name="formkey" value="{{v|formkey}}">
<input class="form-control" style="display:inline;max-width:75%;font-size: min(3.5vw,16px)!important" autocomplete="off" type="text" name="song" class="form-control" value="{% if v.song and v.song|length not in (1,2,3,4,5,17) %}https://youtu.be/{{v.song}}{% endif %}" placeholder='Enter a YouTube video link here'>
<input class="btn btn-primary" style="font-size: min(3.5vw,16px)!important" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Submit">
<input class="btn btn-primary" style="margin-top:-6px;font-size: min(3.5vw,16px)!important" autocomplete="off" class="btn btn-primary ml-auto" type="submit" onclick="disable(this)" value="Submit">
</form>
<br><small>In some browsers, users have to click at least once anywhere in the profile page for the anthem to play.</small>
</div>