diff --git a/app/ftp.py b/app/ftp.py index 0627a17e..3f10fa66 100644 --- a/app/ftp.py +++ b/app/ftp.py @@ -97,7 +97,7 @@ def telnet(host, port=23, user="root", password="root", timeout=1): time.sleep(timeout) command = yield tn.write("{}\r\n".format(command).encode("utf-8")) - time.sleep(timeout) + time.sleep(5) # need more time command = yield time.sleep(timeout) tn.write("{}\r\n".format(command).encode("utf-8")) diff --git a/app/ui/main_app_window.py b/app/ui/main_app_window.py index 68486bec..951b8279 100644 --- a/app/ui/main_app_window.py +++ b/app/ui/main_app_window.py @@ -1,5 +1,7 @@ from contextlib import suppress +import os + from app.commons import run_task from app.eparser import get_channels, get_bouquets, write_bouquets, write_channels, Bouquets, Bouquet, Channel from app.properties import get_config, write_config @@ -206,6 +208,11 @@ class MainAppWindow: return else: self.__bouquets.pop(bq_selected) + self.__fav_model.clear() + # removing bouquet file + bqf = "{}userbouquet.{}.{}".format(self.__options["data_dir_path"], *bq_selected.split(":")) + with suppress(FileNotFoundError): + os.remove(bqf) model.remove(itr) if model_name == self._FAV_LIST_NAME: