dfsfsd
This commit is contained in:
parent
8ff92c4216
commit
a375e662ec
3 changed files with 3 additions and 3 deletions
|
@ -252,7 +252,7 @@ def sanitize(sanitized, noimages=False):
|
||||||
sanitized = sanitized.replace(replacing, htmlsource)
|
sanitized = sanitized.replace(replacing, htmlsource)
|
||||||
|
|
||||||
for i in re.finditer('<p>(https:.*?\.mp4)</p>', sanitized):
|
for i in re.finditer('<p>(https:.*?\.mp4)</p>', sanitized):
|
||||||
sanitized = sanitized.replace(i.group(0), f'<p><video controls="" preload="metadata" style="max-width: 100%"><source src="{i.group(1)}" type="video/mp4"></video>')
|
sanitized = sanitized.replace(i.group(0), f'<p><video controls loop preload="metadata" style="max-width: 100%"><source src="{i.group(1)}" type="video/mp4"></video>')
|
||||||
|
|
||||||
for i in re.finditer('<a href="(https://open.spotify.com/embed/.*?)"', sanitized):
|
for i in re.finditer('<a href="(https://open.spotify.com/embed/.*?)"', sanitized):
|
||||||
url = i.group(1)
|
url = i.group(1)
|
||||||
|
|
|
@ -338,7 +338,7 @@
|
||||||
{% elif p.url and p.url.lower().endswith('.mp4') %}
|
{% elif p.url and p.url.lower().endswith('.mp4') %}
|
||||||
<div class="row no-gutters">
|
<div class="row no-gutters">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<video controls preload="metadata" style="max-width: 100%">
|
<video controls loop preload="metadata" style="max-width: 100%">
|
||||||
<source src="{{ p.realurl(v) }}" type="video/mp4">
|
<source src="{{ p.realurl(v) }}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -445,7 +445,7 @@
|
||||||
|
|
||||||
{% if p.url and p.url.lower().endswith('.mp4') %}
|
{% 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">
|
<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" style="max-width: 100%">
|
<video controls loop preload="metadata" style="max-width: 100%">
|
||||||
<source src="{{p.realurl(v)}}" type="video/mp4">
|
<source src="{{p.realurl(v)}}" type="video/mp4">
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue