1
0
mirror of https://github.com/fHDHR/fHDHR_NextPVR.git synced 2025-12-06 08:26:57 -05:00
fHDHR_NextPVR/data/www/templates/channels.html
2020-11-30 08:49:25 -05:00

91 lines
3.4 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h4 style="text-align: center;">{{ fhdhr.config.dict["fhdhr"]["friendlyname"] }} Channels</h4>
<div style="text-align: center;">
<button onclick="OpenLink('/api/channels?method=scan&redirect=%2Fchannels')">Force Channel Update</a></button><p> Note: This may take some time.</p>
</div>
<br>
<table class="center" style="width:50%">
<tr>
<th></th>
<th></th>
</tr>
{% for key in list(channels_dict.keys()) %}
<tr>
<td>{{ key }}</td>
<td>{{ channels_dict[key] }}</td>
</tr>
{% endfor %}
<table class="center" style="width:100%">
<tr>
<th>Play</th>
<th>Channel Name</th>
<th>Channel CallSign</th>
<th>Channel Number</th>
<th>Channel Thumbnail</th>
<th>Enabled</th>
<th>Favorite</th>
<th>Update</th>
<th>Reset</th>
</tr>
{% for chan_dict in channelslist %}
<tr>
<td>
{% if chan_dict["enabled"] %}
<a href="{{ chan_dict["play_url"] }}">Play</a>
{% endif %}
</td>
<form method="post" action="/api/channels?method=update&redirect=%2Fchannels">
<input type="hidden" name="id" value={{ chan_dict["id"] }}>
<td data-th="Channel Name"><input type="text" name="name" value={{ chan_dict["name"] }}></td>
<td data-th="Channel Calsign"><input type="text" name="callsign" value={{ chan_dict["callsign"] }}></td>
<td data-th="Channel Number"><input type="text" name="number" value={{ chan_dict["number"] }}></td>
<td data-th="Channel Thumbnail"><input type="text" name="number" value={{ chan_dict["thumbnail"] }}></td>
<td>
<select name="enabled">
{% if chan_dict["enabled"] %}
<option value=True selected>Enabled</option>
<option value=False>Disabled</option>
{% else %}
<option value=True>Enabled</option>
<option value=False selected>Disabled</option>
{% endif %}
</select>
</td>
<td>
<select name="favorite">
{% if chan_dict["favorite"] %}
<option value=1 selected>Yes</option>
<option value=0>No</option>
{% else %}
<option value=1>Yes</option>
<option value=0 selected>No</option>
{% endif %}
</select>
</td>
<td data-th="Update"><input type="submit" value="Update"></td>
</form>
<form method="post" action="/api/channels?method=update&redirect=%2Fchannels">
<input type="hidden" name="id" value={{ chan_dict["id"] }}>
<input type="hidden" name="name" value={{ chan_dict["origin_name"] }}>
<input type="hidden" name="callsign" value={{ chan_dict["origin_callsign"] }}>
<input type="hidden" name="number" value={{ chan_dict["origin_number"] }}>
<input type="hidden" name="thumbnail" value={{ chan_dict["origin_thumbnail"] }}>
<input type="hidden" name="enabled" value=True>
<td data-th="Reset"><input type="submit" value="Reset"></td>
</form>
</tr>
{% endfor %}
{% endblock %}