From cb3f2d71d19a9ba75bbbc59c9bdbd5175db3f484 Mon Sep 17 00:00:00 2001 From: DYefremov Date: Sat, 22 Dec 2018 15:33:32 +0300 Subject: [PATCH] fix getting the max marker number --- app/ui/main_helper.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ui/main_helper.py b/app/ui/main_helper.py index a36ec6ce..ee9d9e0d 100644 --- a/app/ui/main_helper.py +++ b/app/ui/main_helper.py @@ -25,9 +25,9 @@ def insert_marker(view, bouquets, selected_bouquet, channels, parent_window): return # Searching for max num value in all marker services (if empty default = 0) - max_num = max(map(lambda num: int(num.data_id, 18), + max_num = max(map(lambda num: int(num.data_id, 16), filter(lambda ch: ch.service_type == BqServiceType.MARKER.name, channels.values())), default=0) - max_num = '{:x}'.format(max_num + 1) + max_num = '{:X}'.format(max_num + 1) fav_id = "1:64:{}:0:0:0:0:0:0:0::{}\n#DESCRIPTION {}\n".format(max_num, response, response) s_type = BqServiceType.MARKER.name model, paths = view.get_selection().get_selected_rows()