diff --git a/app/ui/control.py b/app/ui/control.py
index 30e96006..35e5ff71 100644
--- a/app/ui/control.py
+++ b/app/ui/control.py
@@ -6,10 +6,11 @@ from urllib.parse import quote
from gi.repository import GLib
-from .dialogs import get_dialogs_string, show_dialog, DialogType
+from .dialogs import get_dialogs_string, show_dialog, DialogType, get_message
from .uicommons import Gtk, Gdk, UI_RESOURCES_PATH, Column
from ..commons import run_task, run_with_delay, log, run_idle
from ..connections import HttpAPI
+from ..eparser.ecommons import BqServiceType
class ControlBox(Gtk.HBox):
@@ -669,6 +670,12 @@ class ControlBox(Gtk.HBox):
service = self._app.current_services.get(fav_id, None)
if service:
+ if service.service_type == BqServiceType.ALT.name:
+ msg = "Alternative service.\n\n {}".format(get_message("Not implemented yet!"))
+ show_dialog(DialogType.ERROR, transient=self._app._main_window, text=msg)
+ context.finish(False, False, time)
+ return
+
self._timer_name_entry.set_text(service.service)
self._timer_service_entry.set_text(service.service)
self._timer_service_ref_entry.set_text(service.picon_id.rstrip(".png").replace("_", ":"))
diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py
index 004e3bf5..1ffdb01c 100644
--- a/app/ui/main_app_window.py
+++ b/app/ui/main_app_window.py
@@ -93,6 +93,7 @@ class Application(Gtk.Application):
"on_bouquets_selection": self.on_bouquets_selection,
"on_satellite_editor_show": self.on_satellite_editor_show,
"on_fav_selection": self.on_fav_selection,
+ "on_alt_selection": self.on_alt_selection,
"on_services_selection": self.on_services_selection,
"on_fav_cut": self.on_fav_cut,
"on_bouquets_cut": self.on_bouquets_cut,
@@ -2746,13 +2747,13 @@ class Application(Gtk.Application):
row = self._fav_model[path][:]
srv_type, fav_id = row[Column.FAV_TYPE], row[Column.FAV_ID]
- if srv_type == BqServiceType.IPTV.name or srv_type in self._marker_types:
+ if srv_type in self._marker_types:
self.show_error_dialog("Not allowed in this context!")
self.set_playback_elms_active()
return
srv = self._services.get(fav_id, None)
- if srv and srv.transponder:
+ if srv and srv.transponder or srv_type == BqServiceType.IPTV.name:
return srv.picon_id.rstrip(".png").replace("_", ":")
def update_info(self):
@@ -3313,6 +3314,13 @@ class Application(Gtk.Application):
return True
+ def on_alt_selection(self, model, path, column):
+ if self._control_box and self._control_box.update_epg:
+ row = model[path][:]
+ srv = self._services.get(row[Column.ALT_FAV_ID], None)
+ if srv and srv.transponder or row[Column.ALT_TYPE] == BqServiceType.IPTV.name:
+ self._control_box.on_service_changed(srv.picon_id.rstrip(".png").replace("_", ":"))
+
# ***************** Profile label ********************* #
@run_idle
diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade
index 201dcef8..0dc589e7 100644
--- a/app/ui/main_window.glade
+++ b/app/ui/main_window.glade
@@ -2679,10 +2679,12 @@ Author: Dmitriy Yefremov
False
True
both
+ True
+