ui/show video, audio
This commit is contained in:
parent
98e5a26514
commit
67d96a1401
3 changed files with 8 additions and 3 deletions
|
@ -41,6 +41,10 @@
|
||||||
<a class="media-gallery__item-thumbnail"
|
<a class="media-gallery__item-thumbnail"
|
||||||
href="{{ media.url }}" target="_blank" rel="noopener noreferrer" data-lightbox="{{ toot.id }}" data-title="{{ media.description }}">
|
href="{{ media.url }}" target="_blank" rel="noopener noreferrer" data-lightbox="{{ toot.id }}" data-title="{{ media.description }}">
|
||||||
<img src="{{ media.url }}" class="toot-media" alt="{{ media.description }}"/></a>
|
<img src="{{ media.url }}" class="toot-media" alt="{{ media.description }}"/></a>
|
||||||
|
</div>
|
||||||
|
{% elif media.type in ['gifv','video','audio'] %}
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<video controls src="{{ media.url }}" class="w-100 shadow-1-strong rounded" alt="{{ media.description }}"/></video>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor%}
|
{% endfor%}
|
||||||
|
|
|
@ -44,6 +44,10 @@
|
||||||
<a class="media-gallery__item-thumbnail"
|
<a class="media-gallery__item-thumbnail"
|
||||||
href="{{ media.url }}" target="_blank" rel="noopener noreferrer" data-lightbox="{{ toot.id }}" data-title="{{ media.description }}">
|
href="{{ media.url }}" target="_blank" rel="noopener noreferrer" data-lightbox="{{ toot.id }}" data-title="{{ media.description }}">
|
||||||
<img src="{{ media.url }}" class="w-100 shadow-1-strong rounded" alt="{{ media.description }}"/></a>
|
<img src="{{ media.url }}" class="w-100 shadow-1-strong rounded" alt="{{ media.description }}"/></a>
|
||||||
|
</div>
|
||||||
|
{% elif media.type in ['gifv','video','audio'] %}
|
||||||
|
<div class="col-lg-6">
|
||||||
|
<video controls src="{{ media.url }}" class="w-100 shadow-1-strong rounded" alt="{{ media.description }}"/></video>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor%}
|
{% endfor%}
|
||||||
|
|
|
@ -49,8 +49,6 @@ def get_context(url, toot_id):
|
||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def toot_process(statuses, my_acct, duplicates_counter=0):
|
def toot_process(statuses, my_acct, duplicates_counter=0):
|
||||||
for status in statuses:
|
for status in statuses:
|
||||||
is_reblog = False
|
is_reblog = False
|
||||||
|
@ -222,7 +220,6 @@ def toot_process(statuses, my_acct, duplicates_counter=0):
|
||||||
# poll_id,emoji_list,visibility,reblogged,favourited,bookmarked,sensitive,reblogs_count,favourites_count,language))
|
# poll_id,emoji_list,visibility,reblogged,favourited,bookmarked,sensitive,reblogs_count,favourites_count,language))
|
||||||
return duplicates_counter
|
return duplicates_counter
|
||||||
|
|
||||||
|
|
||||||
def archive_toot(url, archive_match):
|
def archive_toot(url, archive_match):
|
||||||
mastodon, user = app_login(url)
|
mastodon, user = app_login(url)
|
||||||
acct = mastodon.me().acct
|
acct = mastodon.me().acct
|
||||||
|
|
Loading…
Reference in a new issue