Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
j
8b550277d9 update yt-dlp 2025-03-19 14:03:19 +01:00
j
95272d4df2 always use yt-dlp wrapper 2025-03-19 13:55:54 +01:00
j
438271a3f2 unset user is session is used by logged out user 2025-03-12 18:21:23 +01:00
j
8acb7032f8 use " all the way 2025-03-11 00:33:43 +01:00
5 changed files with 11 additions and 7 deletions

View file

@ -143,8 +143,8 @@ def download(item_id, url, referer=None):
has_audio = bool([fmt for fmt in formats['formats'] if fmt['resolution'] == 'audio only'])
has_video = bool([fmt for fmt in formats['formats'] if 'x' in fmt['resolution']])
cmd = [
'yt-dlp', '-q', url,
cmd = YT_DLP + [
'-q', url,
'-o', '%(title)80s.%(ext)s'
]
if referer:
@ -167,8 +167,8 @@ def download(item_id, url, referer=None):
stderr=subprocess.PIPE, close_fds=True)
stdout, stderr = p.communicate()
if stderr and b'Requested format is not available.' in stderr:
cmd = [
'yt-dlp', '-q', url,
cmd = YT_DLP + [
'-q', url,
'-o', '%(title)80s.%(ext)s'
]
if referer:

View file

@ -173,8 +173,8 @@ OIDC_USERNAME_ALGO = "app.oidc.generate_username"
OIDC_RP_CLIENT_ID = None
# define those in local_settings to enable OCID based login
#OIDC_RP_CLIENT_ID = '<client id>'
#OIDC_RP_CLIENT_SECRET = '<client secret>'
#OIDC_RP_CLIENT_ID = "<client id>"
#OIDC_RP_CLIENT_SECRET = "<client secret>"
#OIDC_RP_SIGN_ALGO = "RS256"
#OIDC_OP_JWKS_ENDPOINT = "<jwks endpoint>"
#OIDC_OP_AUTHORIZATION_ENDPOINT = "<authorization endpoint>"

View file

@ -102,6 +102,8 @@ class SessionData(models.Model):
data, created = cls.objects.get_or_create(session_key=session_key)
if request.user.is_authenticated:
data.user = request.user
else:
data.user = None
data.ip = get_ip(request)
data.useragent = request.META.get('HTTP_USER_AGENT', '')[:4096]
info = json.loads(request.POST.get('data', '{}'))

View file

@ -13,7 +13,7 @@ requests<3.0.0,>=2.24.0
urllib3<2.0.0,>=1.25.2
tornado==6.3.3
geoip2==4.7.0
yt-dlp>=2023.11.16
yt-dlp>=2024.10.22
python-memcached
elasticsearch<8
future

View file

@ -306,6 +306,8 @@ if __name__ == "__main__":
run('./bin/pip', 'install', '-r', 'requirements.txt')
if old <= 6688:
run('./bin/pip', 'install', '-r', 'requirements.txt')
if old <= 6704:
run('./bin/pip', 'install', 'yt-dlp>=2024.10.22')
else:
if len(sys.argv) == 1:
branch = get_branch()