aboutsummaryrefslogtreecommitdiffstats
path: root/server.py
diff options
context:
space:
mode:
authorJames Taylor <user234683@users.noreply.github.com>2020-10-22 14:30:33 -0700
committerJames Taylor <user234683@users.noreply.github.com>2020-10-22 14:30:33 -0700
commit5f4884dce8e3eb3215ee8b97469a741310669083 (patch)
tree68b9406805ae2ea6e5e2e58480ba31823a6bbd0f /server.py
parentf8b6db14800806c132c6ec5c587832c0200ada6e (diff)
downloadyt-local-5f4884dce8e3eb3215ee8b97469a741310669083.tar.lz
yt-local-5f4884dce8e3eb3215ee8b97469a741310669083.tar.xz
yt-local-5f4884dce8e3eb3215ee8b97469a741310669083.zip
Put vid title at end of download urls so downloads w/ that filename
Diffstat (limited to 'server.py')
-rw-r--r--server.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/server.py b/server.py
index a7a3fc8..e456e3c 100644
--- a/server.py
+++ b/server.py
@@ -41,6 +41,9 @@ def proxy_site(env, start_response, video=False):
headers['Range'] = env['HTTP_RANGE']
url = "https://" + env['SERVER_NAME'] + env['PATH_INFO']
+ # remove /name portion
+ if video and '/videoplayback/name/' in url:
+ url = url[0:url.rfind('/name/')]
if env['QUERY_STRING']:
url += '?' + env['QUERY_STRING']