nothing beats a direct link
parent
6fbf5a1b6b
commit
4260831289
|
@ -1123,7 +1123,7 @@ engine = create_engine(environ.get("DATABASE_URL").strip(), connect_args={"optio
|
|||
db_session = scoped_session(sessionmaker(bind=engine, autoflush=False))
|
||||
|
||||
approved_embed_hosts_for_csp = ' '.join(set(x.split('/')[0] for x in approved_embed_hosts))
|
||||
csp = f"default-src 'none'; frame-ancestors 'none'; form-action 'self'; manifest-src 'self'; worker-src 'self'; base-uri 'self'; font-src 'self'; style-src-elem 'self' rdrama.net watchpeopledie.tv; style-src-attr 'unsafe-inline'; style-src 'self' 'unsafe-inline'; script-src-elem 'self' challenges.cloudflare.com static.cloudflareinsights.com; script-src-attr 'none'; script-src 'self' challenges.cloudflare.com static.cloudflareinsights.com; frame-src challenges.cloudflare.com cdpn.io vid.puffyan.us platform.twitter.com rumble.com player.twitch.tv; connect-src 'self' submit.watchpeopledie.tv; img-src {approved_embed_hosts_for_csp} data:; media-src {approved_embed_hosts_for_csp};"
|
||||
csp = f"default-src 'none'; frame-ancestors 'none'; form-action 'self'; manifest-src 'self'; worker-src 'self'; base-uri 'self'; font-src 'self'; style-src-elem 'self' rdrama.net watchpeopledie.tv; style-src-attr 'unsafe-inline'; style-src 'self' 'unsafe-inline'; script-src-elem 'self' challenges.cloudflare.com static.cloudflareinsights.com; script-src-attr 'none'; script-src 'self' challenges.cloudflare.com static.cloudflareinsights.com; frame-src challenges.cloudflare.com cdpn.io platform.twitter.com rumble.com player.twitch.tv; connect-src 'self' submit.watchpeopledie.tv; img-src {approved_embed_hosts_for_csp} data:; media-src *.googlevideo.com {approved_embed_hosts_for_csp};"
|
||||
if not IS_LOCALHOST:
|
||||
csp += ' upgrade-insecure-requests;'
|
||||
|
||||
|
|
|
@ -1953,6 +1953,10 @@ def schedule_orgy(v):
|
|||
if duration != 'P0D':
|
||||
duration = isodate.parse_duration(duration).total_seconds()
|
||||
end_utc = int(start_utc + duration)
|
||||
orgy_type = 'file'
|
||||
params = ["yt-dlp", "--get-url", f"https://www.youtube.com/watch?v={data}", "-f", "b", "--proxy", PROXY_URL]
|
||||
data = subprocess.check_output(params, timeout=30)
|
||||
data = data.decode("utf-8")
|
||||
elif rumble_regex.match(normalized_link):
|
||||
orgy_type = 'rumble'
|
||||
data = normalized_link
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<div>
|
||||
<p id="orgy-file-container" class="resizable">
|
||||
{% if orgy.type == 'youtube' %}
|
||||
<iframe style="border: none" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox" title="Play" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen src="https://vid.puffyan.us/embed/{{orgy.data}}?autoplay=1{% if orgy.end_utc %}&t={{orgy.seconds_since_starts}}{% endif %}"></iframe>
|
||||
<iframe style="border: none" sandbox="allow-scripts allow-same-origin allow-popups allow-presentation allow-popups-to-escape-sandbox" title="Play" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen src="https://cdpn.io/pen/debug/NWeVNRj?v={{orgy.data}}&autoplay=1&modestbranding=1{% if orgy.end_utc %}&start={{orgy.seconds_since_starts}}{% endif %}"></iframe>
|
||||
{% elif orgy.type == 'rumble' %}
|
||||
<iframe src="{{orgy.data}}" frameborder="0" allowfullscreen></iframe>
|
||||
{% elif orgy.type == 'twitch' %}
|
||||
|
|
Loading…
Reference in New Issue