diff --git a/app/eparser/lamedb.py b/app/eparser/lamedb.py index f37da14f..04cee627 100644 --- a/app/eparser/lamedb.py +++ b/app/eparser/lamedb.py @@ -79,7 +79,7 @@ def parse_channels(services, transponders, path): """ Parsing channels """ channels = [] transponders = parse_transponders(transponders) - blacklist = get_blacklist(path) + blacklist = str(get_blacklist(path)) srv = split(services, 3) if srv[0][0] == "": # remove first empty element @@ -95,7 +95,7 @@ def parse_channels(services, transponders, path): coded = CODED_ICON if list(filter(lambda x: x.startswith("C:"), all_flags)) else None flags = list(filter(lambda x: x.startswith("f:"), all_flags)) hide = HIDE_ICON if flags and int(flags[0][2:]) == 2 else None - locked = LOCKED_ICON if blacklist and fav_id in blacklist else None + locked = LOCKED_ICON if fav_id in blacklist else None package = list(filter(lambda x: x.startswith("p:"), all_flags)) package = package[0][2:] if package else None diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 0bbecd7d..e00d42a9 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -202,7 +202,7 @@ class MainAppWindow: model, paths = selection.get_selected_rows() model_name = model.get_name() itrs = [model.get_iter(path) for path in paths] - rows = [model.get(in_itr, *[x for x in range(view.get_n_columns())]) for in_itr in itrs] + rows = [model.get(in_itr, *[x for x in range(model.get_n_columns())]) for in_itr in itrs] bq_selected = self.is_bouquet_selected() fav_bouquet = None @@ -236,8 +236,9 @@ class MainAppWindow: fav_id = row[-2] for bq in self.__bouquets: services = self.__bouquets[bq] - with suppress(ValueError): - services.remove(fav_id) + if services: + with suppress(ValueError): + services.remove(fav_id) self.__channels.pop(fav_id, None) self.__fav_model.clear() @@ -350,19 +351,18 @@ class MainAppWindow: if source == self._SERVICE_LIST_NAME: ext_model = self.__services_view.get_model() ext_itrs = [ext_model.get_iter_from_string(itr) for itr in itrs] - ext_rows = [ext_model.get(ext_itr, *[x for x in range(self.__services_view.get_n_columns())]) for - ext_itr in - ext_itrs] + ext_rows = [ext_model.get(ext_itr, *[x for x in range(ext_model.get_n_columns())]) for + ext_itr in ext_itrs] dest_index -= 1 for ext_row in ext_rows: dest_index += 1 - fav_id = ext_row[13] + fav_id = ext_row[-2] channel = self.__channels[fav_id] model.insert(dest_index, (0, channel.service, channel.service_type, channel.pos, channel.fav_id)) fav_bouquet.insert(dest_index, channel.fav_id) elif source == self._FAV_LIST_NAME: in_itrs = [model.get_iter_from_string(itr) for itr in itrs] - in_rows = [model.get(in_itr, *[x for x in range(view.get_n_columns())]) for in_itr in in_itrs] + in_rows = [model.get(in_itr, *[x for x in range(model.get_n_columns())]) for in_itr in in_itrs] for row in in_rows: model.insert(dest_index, row) fav_bouquet.insert(dest_index, row[4]) diff --git a/app/ui/main_window.glade b/app/ui/main_window.glade index 3cf7aeba..c7e19451 100644 --- a/app/ui/main_window.glade +++ b/app/ui/main_window.glade @@ -1030,43 +1030,6 @@ 2 - - - Hide - True - False - True - False - queue - 0 - True - - - - False - True - 3 - - - - - Locked - True - False - True - False - queue - 0 - True - - - - False - True - 5 - 4 - - False @@ -1082,7 +1045,6 @@ - 150 True True True