mirror of
https://github.com/DYefremov/DemonEditor.git
synced 2025-12-21 16:09:41 +01:00
added hide/skip for bouquet list
This commit is contained in:
@@ -468,12 +468,9 @@ class MainAppWindow:
|
||||
fav_id = srv.data
|
||||
# IPTV and MARKER services
|
||||
s_type = srv.type
|
||||
if s_type is BqServiceType.MARKER:
|
||||
if s_type is BqServiceType.MARKER or s_type is BqServiceType.IPTV:
|
||||
self.__channels[fav_id] = Channel(*agr[0:3], srv.name, *agr[0:3],
|
||||
s_type.name, *agr, srv.num, fav_id, None)
|
||||
elif s_type is BqServiceType.IPTV:
|
||||
self.__channels[fav_id] = Channel(*agr[0:3], srv.name, *agr[0:3],
|
||||
srv.type.name, *agr, srv.num, fav_id, None)
|
||||
services.append(fav_id)
|
||||
self.__bouquets["{}:{}".format(name, bt_type)] = services
|
||||
|
||||
|
||||
@@ -158,7 +158,13 @@ def set_flags(flag, services_view, fav_view, channels, blacklist):
|
||||
return
|
||||
|
||||
if flag is FLAG.HIDE:
|
||||
set_hide(channels, model, paths, target)
|
||||
if target is ViewTarget.SERVICES:
|
||||
set_hide(channels, model, paths)
|
||||
else:
|
||||
fav_ids = [model.get_value(model.get_iter(path), 7) for path in paths]
|
||||
srv_model = services_view.get_model()
|
||||
srv_paths = [row.path for row in srv_model if row[16] in fav_ids]
|
||||
set_hide(channels, srv_model, srv_paths)
|
||||
elif flag is FLAG.LOCK:
|
||||
set_lock(blacklist, channels, model, paths, target, services_model=services_view.get_model())
|
||||
|
||||
@@ -188,9 +194,7 @@ def set_lock(blacklist, channels, model, paths, target, services_model):
|
||||
ch[4] = None if locked else LOCKED_ICON
|
||||
|
||||
|
||||
def set_hide(channels, model, paths, target):
|
||||
if target is ViewTarget.FAV:
|
||||
return
|
||||
def set_hide(channels, model, paths):
|
||||
col_num = 5
|
||||
hide = has_locked_hide(model, paths, col_num)
|
||||
|
||||
@@ -216,6 +220,9 @@ def set_hide(channels, model, paths, target):
|
||||
continue # skip if already allowed to show
|
||||
value -= FLAG.HIDE.value
|
||||
|
||||
if value == 0 and index is not None:
|
||||
del flags[index]
|
||||
else:
|
||||
value = "f:{}".format(value) if value > 10 else "f:0{}".format(value)
|
||||
if index is not None:
|
||||
flags[index] = value
|
||||
|
||||
Reference in New Issue
Block a user