diff --git a/app/connections.py b/app/connections.py
index 73e2a8bb..23c7eb39 100644
--- a/app/connections.py
+++ b/app/connections.py
@@ -56,6 +56,11 @@ class HttpRequestType(Enum):
POWER = "powerstate?newstate="
REMOTE = "remotecontrol?command="
VOL = "vol?set=set"
+ # EPG
+ EPG = "epgservice?sRef="
+ # Timer
+ TIMER = ""
+ TIMER_LIST = "timerlist"
# Screenshot
GRUB = "grab?format=jpg&"
@@ -398,7 +403,7 @@ class HttpAPI:
elif req_type is HttpRequestType.GRUB:
data = None # Must be disabled for token-based security.
url = "{}/{}{}".format(self._main_url, req_type.value, ref)
- elif req_type in (HttpRequestType.REMOTE, HttpRequestType.POWER, HttpRequestType.VOL):
+ elif req_type in (HttpRequestType.REMOTE, HttpRequestType.POWER, HttpRequestType.VOL, HttpRequestType.EPG):
url += ref
def done_callback(f):
@@ -452,6 +457,12 @@ def get_response(req_type, url, data=None):
elif req_type is HttpRequestType.PLAYER_LIST:
return [{el.tag: el.text for el in el.iter()} for el in
ETree.fromstring(f.read().decode("utf-8")).iter("e2file")]
+ elif req_type is HttpRequestType.EPG:
+ return {"event_list": [{el.tag: el.text for el in el.iter()} for el in
+ ETree.fromstring(f.read().decode("utf-8")).iter("e2event")]}
+ elif req_type is HttpRequestType.TIMER_LIST:
+ return {"timer_list": [{el.tag: el.text for el in el.iter()} for el in
+ ETree.fromstring(f.read().decode("utf-8")).iter("e2timer")]}
else:
return {el.tag: el.text for el in ETree.fromstring(f.read().decode("utf-8")).iter()}
except HTTPError as e:
diff --git a/app/ui/control.glade b/app/ui/control.glade
index 8191181a..bc9bb191 100644
--- a/app/ui/control.glade
+++ b/app/ui/control.glade
@@ -49,174 +49,32 @@ Author: Dmitriy Yefremov
False
gtk-go-forward
-
diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py
index 48c02111..2540ea2f 100644
--- a/app/ui/main_app_window.py
+++ b/app/ui/main_app_window.py
@@ -90,6 +90,7 @@ class Application(Gtk.Application):
"on_tree_view_key_release": self.on_tree_view_key_release,
"on_bouquets_selection": self.on_bouquets_selection,
"on_satellite_editor_show": self.on_satellite_editor_show,
+ "on_fav_selection": self.on_fav_selection,
"on_services_selection": self.on_services_selection,
"on_fav_cut": self.on_fav_cut,
"on_bouquets_cut": self.on_bouquets_cut,
@@ -250,7 +251,7 @@ class Application(Gtk.Application):
self._signal_level_bar.bind_property("visible", builder.get_object("record_button"), "visible")
self._receiver_info_box.bind_property("visible", self._http_status_image, "visible", 4)
self._receiver_info_box.bind_property("visible", self._signal_box, "visible")
- # Remote controller
+ # Control
self._control_button = builder.get_object("control_button")
self._receiver_info_box.bind_property("visible", self._control_button, "visible")
self._control_revealer = builder.get_object("control_revealer")
@@ -1641,6 +1642,13 @@ class Application(Gtk.Application):
self._data_hash = self.get_data_hash()
yield True
+ def on_fav_selection(self, model, path, column):
+ if self._control_box and self._control_box.update_epg:
+ ref = self.get_service_ref(path)
+ if not ref:
+ return
+ self._control_box.on_service_changed(ref)
+
def on_services_selection(self, model, path, column):
self.update_service_bar(model, path)
diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade
index 13ee6bc1..066b9316 100644
--- a/app/ui/main_window.glade
+++ b/app/ui/main_window.glade
@@ -2409,6 +2409,7 @@ Author: Dmitriy Yefremov
+