push latest changes
This commit is contained in:
parent
7523a19d1f
commit
cb2b5c2c2b
63 changed files with 3158 additions and 1552 deletions
20
templates/jellyfin/details.html
Normal file
20
templates/jellyfin/details.html
Normal file
|
@ -0,0 +1,20 @@
|
|||
{% extends "base.html" %}
|
||||
{% from 'utils.html' import custom_render_form_row,make_tabs %}
|
||||
{% from 'bootstrap/utils.html' import render_icon %}
|
||||
{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}
|
||||
|
||||
{% block app_content %}
|
||||
|
||||
<h2><a href={{info.LocalAddress}}>Jellyfin</a> v{{info.Version}}</h2>
|
||||
{% if status.HasUpdateAvailable %}
|
||||
<h3>Update available</h3>
|
||||
{% endif %}
|
||||
{% if status.HasPendingRestart %}
|
||||
<h3>Restart pending</h3>
|
||||
{% endif %}
|
||||
|
||||
<img src={{cfg.jellyfin_url}}/Items/{{item.Id}}/Images/Art>
|
||||
|
||||
<pre>{{item|pformat}}</pre>
|
||||
|
||||
{% endblock %}
|
|
@ -3,119 +3,80 @@
|
|||
{% from 'bootstrap/utils.html' import render_icon %}
|
||||
{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}
|
||||
|
||||
{% macro make_row(title,items) %}
|
||||
<div class="d-flex flex-wrap">
|
||||
{% for item in items %}
|
||||
{{item|safe}}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro make_tabs(tabs) %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||
{% for (label,_) in tabs %}
|
||||
{% set slug = (label|slugify) %}
|
||||
{% if not (loop.first and loop.last) %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link {{'active' if loop.first}}" id="nav-{{slug}}-tab" data-toggle="pill" href="#pills-{{slug}}" role="tab" aria-controls="pills-{{slug}}" aria-selected="{{loop.first}}">
|
||||
{{label}}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tab-content" id="searchResults">
|
||||
{% for (label,items) in tabs %}
|
||||
{% set slug = (label|slugify) %}
|
||||
<div class="tab-pane fade {{'show active' if loop.first}}" id="pills-{{slug}}" role="tabpanel" aria-labelledby="nav-{{slug}}-tab">
|
||||
{{make_row(label,items)}}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro make_table(items) %}
|
||||
<table class="table table-sm table-bordered">
|
||||
{% for item in items|sort(attribute="Name")%}
|
||||
<tr>
|
||||
<td><a href="{{url_for('jellyfin.details',item_id=item.Id)}}">{{item.Name}}</a> ({{item.ProductionYear}})</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endmacro %}
|
||||
|
||||
{% block app_content %}
|
||||
<h1><a href={{info.LocalAddress}}>Jellyfin</a> v{{info.Version}}</h1>
|
||||
{% if status.HasUpdateAvailable %}
|
||||
<h3>Update available</h3>
|
||||
{% endif %}
|
||||
{% if status.HasPendingRestart %}
|
||||
<h3>Restart pending</h3>
|
||||
{% endif %}
|
||||
|
||||
<h2><a href={{jellyfin.info.LocalAddress}}>Jellyfin</a> v{{jellyfin.info.Version}}</h2>
|
||||
<h3>Library statistics</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<h4>Active Streams</h4>
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th>Episode</th>
|
||||
<th>Show</th>
|
||||
<th>Language</th>
|
||||
<th>User</th>
|
||||
<th>Device</th>
|
||||
<th>Mode</th>
|
||||
</tr>
|
||||
{% for session in jellyfin.sessions %}
|
||||
{% if "NowPlayingItem" in session %}
|
||||
{% with np=session.NowPlayingItem, ps=session.PlayState%}
|
||||
<tr>
|
||||
<td>
|
||||
{% if session.SupportsMediaControl %}
|
||||
<a href="{{url_for('stop_stream',session=session.Id)}}">
|
||||
{{render_icon("stop-circle")}}
|
||||
</a>
|
||||
{% endif %}
|
||||
<a href="{{cfg().jellyfin_url}}web/index.html#!/details?id={{np.Id}}">
|
||||
{{np.Name}}
|
||||
</a>
|
||||
({{(ps.PositionTicks/10_000_000)|timedelta(digits=0)}}/{{(np.RunTimeTicks/10_000_000)|timedelta(digits=0)}})
|
||||
{% if ps.IsPaused %}
|
||||
(Paused)
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{cfg().jellyfin_url}}web/index.html#!/details?id={{np.SeriesId}}">
|
||||
{{np.SeriesName}}
|
||||
</a>
|
||||
<a href="{{cfg().jellyfin_url}}web/index.html#!/details?id={{np.SeasonId}}">
|
||||
({{np.SeasonName}})
|
||||
</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
{% if ("AudioStreamIndex" in ps) and ("SubtitleStreamIndex" in ps) %}
|
||||
{{np.MediaStreams[ps.AudioStreamIndex].Language or "None"}}/{{np.MediaStreams[ps.SubtitleStreamIndex].Language or "None"}}
|
||||
{% else %}
|
||||
Unk/Unk
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{cfg().jellyfin_url}}web/index.html#!/useredit.html?userId={{session.UserId}}">
|
||||
{{session.UserName}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{session.DeviceName}}
|
||||
</td>
|
||||
<td>
|
||||
{% if ps.PlayMethod =="Transcode" %}
|
||||
<p title="{{session.TranscodingInfo.Bitrate|filesizeformat(binary=False)}}/s | {{session.TranscodingInfo.CompletionPercentage|round(2)}}%">
|
||||
{{ps.PlayMethod}}
|
||||
</p>
|
||||
{% else %}
|
||||
<p>
|
||||
{{ps.PlayMethod}}
|
||||
</p>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
<table class="table table-sm table-bordered">
|
||||
{% for name, value in counts.items() %}
|
||||
{% if value != 0 %}
|
||||
<tr>
|
||||
<td>{{name}}</td>
|
||||
<td>{{value}}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</table>
|
||||
{% if library %}
|
||||
<h3>{{library|count}} Items</h3>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg">
|
||||
<h4>Users</h4>
|
||||
<table class="table table-sm">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Last Login</th>
|
||||
<th>Last Active</th>
|
||||
<th>Bandwidth Limit</th>
|
||||
</tr>
|
||||
{% for user in jellyfin.users|sort(attribute="LastLoginDate",reverse=True) %}
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{cfg().jellyfin_url}}web/index.html#!/useredit.html?userId={{user.Id}}">
|
||||
{{user.Name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{% if "LastLoginDate" in user %}
|
||||
{{user.LastLoginDate|fromiso|ago_dt_utc(2)}} ago
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if "LastActivityDate" in user %}
|
||||
{{user.LastActivityDate|fromiso|ago_dt_utc(2)}} ago
|
||||
{% else %}
|
||||
Never
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>{{user.Policy.RemoteClientBitrateLimit|filesizeformat(binary=False)}}/s</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{% set tabs = [] %}
|
||||
{% for title,group in library.values()|groupby("Type") %}
|
||||
{% do tabs.append((title,[make_table(group)])) %}
|
||||
{% endfor %}
|
||||
{{make_tabs(tabs)}}
|
||||
{% endblock %}
|
||||
|
|
56
templates/jellyfin/movie.html
Normal file
56
templates/jellyfin/movie.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
{% extends "base.html" %}
|
||||
{% from 'utils.html' import custom_render_form_row,make_tabs %}
|
||||
{% from 'bootstrap/utils.html' import render_icon %}
|
||||
{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}
|
||||
|
||||
{% block app_content %}
|
||||
|
||||
<h1><a href={{info.LocalAddress}}>Jellyfin</a> v{{info.Version}}</h1>
|
||||
{% if status.HasUpdateAvailable %}
|
||||
<h3>Update available</h3>
|
||||
{% endif %}
|
||||
{% if status.HasPendingRestart %}
|
||||
<h3>Restart pending</h3>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% for ext in item.ExternalUrls %}
|
||||
<a href={{ext.Url}}><span class="badge badge-secondary">{{ext.Name}}</span></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2 title="{{item.Id}}">
|
||||
{{item.Name}}
|
||||
{% if item.IsHD %}
|
||||
<span class="badge badge-primary">HD</span>
|
||||
{% endif %}
|
||||
</h2>
|
||||
<p>{{item.Overview}}</p>
|
||||
|
||||
<hr>
|
||||
|
||||
{# <img src={{info.LocalAddress}}/Items/{{item.Id}}/Images/Primary> #}
|
||||
|
||||
{% set data = [
|
||||
("Path", item.Path),
|
||||
("Genres", item.Genres|join(", ")),
|
||||
] %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<table class="table table-sm table-bordered">
|
||||
{% for k,v in data %}
|
||||
<tr>
|
||||
<td>{{k}}</td>
|
||||
<td>{{v}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pre>{{item|pformat}}</pre>
|
||||
|
||||
{% endblock %}
|
70
templates/jellyfin/series.html
Normal file
70
templates/jellyfin/series.html
Normal file
|
@ -0,0 +1,70 @@
|
|||
{% extends "base.html" %}
|
||||
{% from 'utils.html' import custom_render_form_row,make_tabs %}
|
||||
{% from 'bootstrap/utils.html' import render_icon %}
|
||||
{% from 'bootstrap/form.html' import render_form, render_field, render_form_row %}
|
||||
|
||||
{% block app_content %}
|
||||
|
||||
<h1><a href={{info.LocalAddress}}>Jellyfin</a> v{{info.Version}}</h1>
|
||||
{% if status.HasUpdateAvailable %}
|
||||
<h3>Update available</h3>
|
||||
{% endif %}
|
||||
{% if status.HasPendingRestart %}
|
||||
<h3>Restart pending</h3>
|
||||
{% endif %}
|
||||
|
||||
<h2 title="{{item.Id}}"><a href="{{info.LocalAddress}}/web/index.html#!/details?id={{item.Id}}">{{item.Name}}</a></h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{% for ext in item.ExternalUrls %}
|
||||
<a href={{ext.Url}}><span class="badge badge-secondary">{{ext.Name}}</span></a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<img class="rounded" src={{info.LocalAddress}}/Items/{{item.Id}}/Images/Primary>
|
||||
</div>
|
||||
|
||||
<p>{{item.Overview}}</p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<table class="table table-sm table-bordered">
|
||||
<tr>
|
||||
<td>Path</td>
|
||||
<td>{{item.Path}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
{% for season in item.Seasons %}
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<h3>{{season.Name}}</h3>
|
||||
<table class="table table-sm table-bordered">
|
||||
{% for episode in season.Episodes %}
|
||||
<tr>
|
||||
<td>{{episode.Name}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
<table class="table table-sm table-bordered">
|
||||
{% for k,v in item|flatten %}
|
||||
<tr>
|
||||
<td>{{k}}</td>
|
||||
<td>{{v}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue