forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-12-08 20:06:07 +02:00
parent 7fbde73d17
commit dd726be4c9
4 changed files with 4 additions and 4 deletions

View File

@ -229,7 +229,7 @@ def sanitize(sanitized, noimages=False):
sanitized = sanitized.replace(replacing, htmlsource)
for i in re.finditer('<p>(https:.*?\.mp4)</p>', sanitized):
sanitized = sanitized.replace(i.group(0), f'<p><video controls preload="metadata" class="embedvid"><source src="{i.group(1)}" type="video/mp4"></video>')
sanitized = sanitized.replace(i.group(0), f'<p><video controls preload="none" class="embedvid"><source src="{i.group(1)}" type="video/mp4"></video>')
for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]:
sanitized = sanitized.replace(rd, "https://old.reddit.com/")

View File

@ -59,7 +59,7 @@ You can use Markdown formatting.
<tr>
<td>Videos</td>
<td>[{{'SITE_NAME' | app_config}}]({{request.host_url}})</td>
<td><video controls preload="metadata" class="embedvid"><source src="https://files.catbox.moe/v4om92.mp4" type="video/mp4"></video></td>
<td><video controls preload="none" class="embedvid"><source src="https://files.catbox.moe/v4om92.mp4" type="video/mp4"></video></td>
</tr>
<tr>

View File

@ -454,7 +454,7 @@
{% elif p.url and p.url.lower().endswith('.mp4') %}
<div class="row no-gutters">
<div class="col">
<video controls preload="metadata" class="embedvid">
<video controls preload="none" class="embedvid">
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>

View File

@ -487,7 +487,7 @@
{% if p.url and p.url.lower().endswith('.mp4') %}
<div id="video-{{p.id}}" style="text-align: center" class="{% if p.over_18 or not ((v and v.cardview) or (not v and environ.get('CARD_VIEW') == '1')) %}d-none{% endif %} mt-4">
<video controls preload="metadata" class="embedvid">
<video controls preload="none" class="embedvid">
<source src="{{p.realurl(v)}}" type="video/mp4">
</video>
</div>