diff --git a/app/ui/dialogs.glade b/app/ui/dialogs.glade index 1dba4e46..669016a7 100644 --- a/app/ui/dialogs.glade +++ b/app/ui/dialogs.glade @@ -585,7 +585,7 @@ Author: Dmitriy Yefremov - 320 + 400 False False @@ -597,8 +597,23 @@ Author: Dmitriy Yefremov True center - + + True + False + 2 + True + + + True + False + IPTV streams list configuration + + + + + button7 + False @@ -609,7 +624,20 @@ Author: Dmitriy Yefremov False end - + + gtk-apply + True + True + True + True + True + + + + True + True + 0 + @@ -618,6 +646,7 @@ Author: Dmitriy Yefremov True True True + True True @@ -637,23 +666,12 @@ Author: Dmitriy Yefremov True False vertical - 5 - - - True - False - IPTV streams list configuration - - - False - True - 0 - - True False + 5 + 5 5 @@ -669,7 +687,7 @@ Author: Dmitriy Yefremov - + True True @@ -691,10 +709,12 @@ Author: Dmitriy Yefremov True False + 5 + 5 0.019999999552965164 in - + True False 5 @@ -704,7 +724,7 @@ Author: Dmitriy Yefremov 2 True - + True True 5 @@ -718,8 +738,9 @@ Author: Dmitriy Yefremov - + True + False True 5 5 @@ -732,8 +753,9 @@ Author: Dmitriy Yefremov - + True + False True 5 5 @@ -746,8 +768,9 @@ Author: Dmitriy Yefremov - + True + False True 5 5 @@ -760,7 +783,7 @@ Author: Dmitriy Yefremov - + True False Namespace @@ -771,7 +794,7 @@ Author: Dmitriy Yefremov - + True False NID @@ -782,7 +805,7 @@ Author: Dmitriy Yefremov - + True False SID @@ -793,7 +816,7 @@ Author: Dmitriy Yefremov - + True False Type @@ -804,11 +827,12 @@ Author: Dmitriy Yefremov - + Auto True True False + center True True @@ -818,11 +842,12 @@ Author: Dmitriy Yefremov - + Auto True True False + center True True @@ -832,11 +857,12 @@ Author: Dmitriy Yefremov - + Auto True True False + center True True @@ -868,7 +894,57 @@ Author: Dmitriy Yefremov False True - 1 + 0 + + + + + True + False + True + + + False + 6 + end + + + + + + False + False + 0 + + + + + False + 16 + + + True + False + Done! + + + False + True + 0 + + + + + False + False + 0 + + + + + False + True + 2 diff --git a/app/ui/iptv.py b/app/ui/iptv.py index a5168019..62274315 100644 --- a/app/ui/iptv.py +++ b/app/ui/iptv.py @@ -262,21 +262,38 @@ class SearchUnavailableDialog: class IptvListConfigurationDialog: - def __init__(self, transient): - handlers = {} + def __init__(self, transient, services, iptv_rows, model, bouquet, profile): + handlers = {"on_apply": self.on_apply} builder = Gtk.Builder() builder.set_translation_domain(TEXT_DOMAIN) builder.add_objects_from_file(UI_RESOURCES_PATH + "dialogs.glade", ("iptv_list_configuration_dialog",)) builder.connect_signals(handlers) + self._rows = iptv_rows + self._services = services + self._bouquet = bouquet + self._profile = profile + self._dialog = builder.get_object("iptv_list_configuration_dialog") self._dialog.set_transient_for(transient) + self._sid_auto_check_button = builder.get_object("sid_auto_check_button") + self._namespace_auto_check_button = builder.get_object("namespace_auto_check_button") + self._nid_auto_check_button = builder.get_object("nid_auto_check_button") + self._list_srv_type_entry = builder.get_object("list_srv_type_entry") + self._list_sid_entry = builder.get_object("list_sid_entry") + self._list_net_id_entry = builder.get_object("list_net_id_entry") + self._list_namespace_entry = builder.get_object("list_namespace_entry") + self._apply_all_lists_switch = builder.get_object("apply_all_lists_switch") def show(self): response = self._dialog.run() self._dialog.destroy() + def on_apply(self, item): + for fav_id in self._bouquet: + print(self._services[fav_id]) + if __name__ == "__main__": pass diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 2482c840..7c9311fa 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -979,8 +979,23 @@ class MainAppWindow: self._is_played = True self._player.play() + @run_idle def on_iptv_list_configuration(self, item): - IptvListConfigurationDialog(self._main_window).show() + iptv_rows = list(filter(lambda r: r[5] == BqServiceType.IPTV.value, self._fav_model)) + if not iptv_rows: + show_dialog(DialogType.ERROR, self._main_window, "This list does not contains iptv streams!") + return + + bq_selected = self.get_selected_bouquet() + if not bq_selected: + return + + IptvListConfigurationDialog(self._main_window, + self._services, + iptv_rows, + self._fav_model, + self._bouquets.get(bq_selected, []), + Profile(self._profile)).show() @run_idle def on_remove_all_unavailable(self, item): diff --git a/app/ui/satellites_dialog.glade b/app/ui/satellites_dialog.glade index 9753dd20..0c616dd4 100644 --- a/app/ui/satellites_dialog.glade +++ b/app/ui/satellites_dialog.glade @@ -467,6 +467,8 @@ Author: Dmitriy Yefremov center-on-parent True applications-utilities + True + True center