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