This repository has been archived on 2026-11-11. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
videovault/app/web/templates/video.html
T

42 lines
1.8 KiB
HTML

{% block title %}{{ v.title or 'Video' }}{% endblock %}
{% extends "base.html" %}
{% block content %}
<div class="player-wrap">
{% if v.optimized_path %}
<video id="player" controls autoplay
poster="{{ media_url(v,'poster') if v.poster_path }}"
src="{{ media_url(v,'video') }}"></video>
{% else %}
<div class="ph big">🎬 {{ v.status }} — inget optimerat flöde ännu</div>
{% endif %}
</div>
<h1 class="vid-title">{{ v.title or v.site or 'Namtlös' }}</h1>
<div class="cats">
{% for c in cats if c %}<span class="chip-sm">{{ c }}</span>{% endfor %}
</div>
<ul class="meta-list">
{% if v.site %}<li>Kanal: <b>{{ v.site }}</b></li>{% endif %}
{% if v.uploader %}<li>Skapare: <b>{{ v.uploader }}</b></li>{% endif %}
{% if v.duration %}<li>Längd: <b>{{ v.duration }} s</b></li>{% endif %}
{% if v.quality %}<li>Kvalitet: <b>{{ v.quality }}</b></li>{% endif %}
{% if v.size_bytes %}<li>Storlek: <b>{{ '%.1f'|format(v.size_bytes / 1e6) }} MB</b></li>{% endif %}
{% if v.published_at %}<li>Publicerad: <b>{{ v.published_at }}</b></li>{% endif %}
{% if v.added_at %}<li>Tillagd: <b>{{ v.added_at }}</b></li>{% endif %}
{% if v.error %}<li class="err">Fel: {{ v.error }}</li>{% endif %}
<li><a href="{{ v.url }}" target="_blank" rel="noopener">Originalkälla ↗</a></li>
</ul>
<div class="actions">
{% if v.source_url_ok %}<a class="btn" href="{{ media_url(v,'source') if v.download_path }}">Ladda ner källfil</a>{% endif %}
<form action="/video/{{ v.id }}/delete" method="post" onsubmit="return confirm('Ta bort media + post?')" style="display:inline">
<button class="btn danger" type="submit">Ta bort</button>
</form>
</div>
<div class="tags">
{% for t in tags if t %}<span class="tag">{{ t }}</span>{% endfor %}
</div>
{% endblock %}