Initial commit
This commit is contained in:
commit
7523a19d1f
40 changed files with 3984 additions and 0 deletions
121
templates/jellyfin/index.html
Normal file
121
templates/jellyfin/index.html
Normal file
|
@ -0,0 +1,121 @@
|
|||
{% 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={{jellyfin.info.LocalAddress}}>Jellyfin</a> v{{jellyfin.info.Version}}</h2>
|
||||
|
||||
<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 %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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 %}
|
Loading…
Add table
Add a link
Reference in a new issue