Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
8b550277d9 | |||
95272d4df2 | |||
438271a3f2 | |||
8acb7032f8 |
5 changed files with 11 additions and 7 deletions
|
@ -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:
|
||||
|
|
|
@ -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>"
|
||||
|
|
|
@ -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', '{}'))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue