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["youtube"] = "https://www.youtube.com/watch?v="
|
||||||
providers["twitch"] = "https://twitch.tv"
|
providers["twitch"] = "https://twitch.tv"
|
||||||
providers["twitter"] = "https://twitter.com"
|
providers["twitter"] = "https://twitter.com"
|
||||||
|
providers["pornhub"] = "https://www.pornhub.com/view_video.php?viewkey="
|
||||||
|
|
||||||
nextcloud_server = os.environ.get("NEXTCLOUD_SERVER")
|
nextcloud_server = os.environ.get("NEXTCLOUD_SERVER")
|
||||||
if nextcloud_server is not None:
|
if nextcloud_server is not None:
|
||||||
|
@ -67,7 +67,9 @@ class UpstreamHandler:
|
|||||||
path = handler.request.path
|
path = handler.request.path
|
||||||
if self.provider.startswith("nextcloud"):
|
if self.provider.startswith("nextcloud"):
|
||||||
path = path.removesuffix("/").removesuffix("download").removesuffix("/")
|
path = path.removesuffix("/").removesuffix("download").removesuffix("/")
|
||||||
elif self.provider.startswith("youtube"):
|
elif self.provider.startswith("youtube") or self.provider.startswith(
|
||||||
|
"pornhub"
|
||||||
|
):
|
||||||
path = path.removeprefix("/")
|
path = path.removeprefix("/")
|
||||||
self.upstream = config.providers[self.provider] + path
|
self.upstream = config.providers[self.provider] + path
|
||||||
if not self.direct:
|
if not self.direct:
|
||||||
|
Loading…
Reference in New Issue
Block a user