This commit is contained in:
parent
e62327c64f
commit
65cec66bfe
@ -27,6 +27,7 @@ providers["svt"] = "https://svtplay.se"
|
||||
providers["youtube"] = "https://www.youtube.com/watch?v="
|
||||
providers["twitch"] = "https://twitch.tv"
|
||||
providers["twitter"] = "https://twitter.com"
|
||||
providers["pornhub"] = "https://www.pornhub.com/view_video.php?viewkey="
|
||||
|
||||
nextcloud_server = os.environ.get("NEXTCLOUD_SERVER")
|
||||
if nextcloud_server is not None:
|
||||
|
@ -67,7 +67,9 @@ class UpstreamHandler:
|
||||
path = handler.request.path
|
||||
if self.provider.startswith("nextcloud"):
|
||||
path = path.removesuffix("/").removesuffix("download").removesuffix("/")
|
||||
elif self.provider.startswith("youtube"):
|
||||
elif self.provider.startswith("youtube") or self.provider.startswith(
|
||||
"pornhub"
|
||||
):
|
||||
path = path.removeprefix("/")
|
||||
self.upstream = config.providers[self.provider] + path
|
||||
if not self.direct:
|
||||
|
Loading…
Reference in New Issue
Block a user