diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 8650c510..dbda8f29 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -1465,8 +1465,8 @@ class MainAppWindow: data = model[paths][:] cur_name, srv_type, fav_id = data[2], data[5], data[7] - if srv_type == BqServiceType.IPTV.name: - show_dialog(DialogType.ERROR, self._main_window, "This item is not allowed to edit!") + if srv_type == BqServiceType.IPTV.name or srv_type == BqServiceType.MARKER.name: + show_dialog(DialogType.ERROR, self._main_window, "This action is not allowed in current context!") return response = show_dialog(DialogType.INPUT, self._main_window, cur_name) diff --git a/app/ui/main_helper.py b/app/ui/main_helper.py index 60077e46..c7997c95 100644 --- a/app/ui/main_helper.py +++ b/app/ui/main_helper.py @@ -161,8 +161,10 @@ def rename(view, parent_window, target, fav_view=None, service_view=None, servic old_srv = services.get(f_id, None) if old_srv: if srv_type == BqServiceType.IPTV.name or srv_type == BqServiceType.MARKER.name: - old_name = old_srv.service - new_fav_id = f_id.replace(old_name.strip(), srv_name.strip(), 2) + l, sep, r = f_id.partition("#DESCRIPTION") + old_name = old_srv.service.strip() + new_name = srv_name.strip() + new_fav_id = "".join((new_name.join(l.rsplit(old_name, 1)), sep, new_name.join(r.rsplit(old_name, 1)))) services[f_id] = old_srv._replace(service=srv_name, fav_id=new_fav_id) else: services[f_id] = old_srv._replace(service=srv_name)