fHDHR_IPTVorg-US/fHDHR_web/pages/channels_editor.py
deathbybandaid 8230801cc9 test
2020-12-09 08:40:25 -05:00

24 lines
774 B
Python

from flask import request, render_template
class Channels_Editor_HTML():
endpoints = ["/channels_editor", "/channels_editor.html"]
endpoint_name = "page_channels_editor_html"
def __init__(self, fhdhr):
self.fhdhr = fhdhr
def __call__(self, *args):
return self.get(*args)
def get(self, *args):
channelslist = []
for fhdhr_id in list(self.fhdhr.device.channels.list.keys()):
channel_obj = self.fhdhr.device.channels.list[fhdhr_id]
channel_dict = channel_obj.dict.copy()
channel_dict["play_url"] = channel_obj.play_url
channelslist.append(channel_dict)
return render_template('channels_editor.html', request=request, fhdhr=self.fhdhr, channelslist=channelslist)