Superb quality and spec AB-Com PULSe 4K SE. Crazy offer! Only £99! FREE UK DELIVERY! 4K UHD, Enigma 2, Multiboot 4 images & more!...
Superb quality and spec AB-Com PULSe 4K Rev II Twin Satellite tuner only £149! FREE UK DELIVERY! 4K UHD, Enigma 2, SATA HDD facility, Multiboot 4 images & more!...

[ABM-DVB-S/S2] Rename by SID using mix file

abu baniaz

Moderator
Joined
Sep 16, 2010
Messages
24,106
Reaction score
175
Points
63
Location
East London
What is the current code for using a mix file to rename a channel by SID

I tried adding following section (copied from provider file), it crashed
Code:
rename_by_sid = {
	20700: "ITV1 HD",
	20830: "ITV1 HD",
	21000: "ITV1 HD",
}


# Rename channels by sid
if "service_id" in service and service["service_id"] in rename_by_sid:
	service["service_name"] = rename_by_sid[service["service_id"]]
	service["service_flags"] = dxHoldName

17:04:25.0690 Traceback (most recent call last):
17:04:25.0691 File "/home/vixdev/6.7/builds/openvix/developer/vuduo4k/tmp/work/cortexa15hf-neon-vfpv4-oe-linux-gnueabi/enigma2-plugin-systemplugins-autobouquetsmaker/enigma2-plugin-systemplugins-autobouquetsmaker-3.4+git-r0/image/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/scanner/main.py", line 494, in doBuildIndex
17:04:25.0702 File "/home/vixdev/6.7/builds/openvix/developer/vuduo4k/tmp/work/cortexa15hf-neon-vfpv4-oe-linux-gnueabi/enigma2-plugin-systemplugins-autobouquetsmaker/enigma2-plugin-systemplugins-autobouquetsmaker-3.4+git-r0/image/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/scanner/manager.py", line 147, in save
17:04:25.0705 File "/home/vixdev/6.7/builds/openvix/developer/vuduo4k/tmp/work/cortexa15hf-neon-vfpv4-oe-linux-gnueabi/enigma2-plugin-systemplugins-autobouquetsmaker/enigma2-plugin-systemplugins-autobouquetsmaker-3.4+git-r0/image/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/scanner/tools.py", line 246, in customMix
17:04:25.0707 File "<string>", line 41, in <module>
17:04:25.0708 TypeError: argument of type 'int' is not iterable
17:04:25.0708 [ePyObject] (CallObject(<bound method AutoBouquetsMaker.doBuildIndex of <class 'Plugins.SystemPlugins.AutoBouquetsMaker.scanner.main.AutoBouquetsMaker'>>,()) failed)
 
Modified code for rename by channel id that used to be used in custommix

Code:
rename = {
	20700: "ITV1 HD",
	20830: "ITV1 HD",
	21000: "ITV1 HD",
}

# Channel renames
for service in sorted(customised["video"].keys()):
	if "service_id" in customised["video"][service] and customised["video"][service]["service_id"] in rename:
		customised["video"][service]["interactive_name"] = rename[customised["video"][service]["service_id"]]
 
Or possibly to use both channel id and sid

Code:
rename_by_chid = {
}

rename_by_sid = {
	20700: "ITV1 HD",
	20830: "ITV1 HD",
	21000: "ITV1 HD",
}

# Rename by sid
for service in sorted(customised["video"].keys()):
	if "service_id" in customised["video"][service] and customised["video"][service]["service_id"] in rename_by_sid:
		customised["video"][service]["interactive_name"] = rename_by_sid[customised["video"][service]["service_id"]]

# Rename by channel id 
for service in sorted(customised["video"].keys()):
	if "channel_id" in customised["video"][service] and customised["video"][service]["channel_id"] in rename_by_chid:
		customised["video"][service]["interactive_name"] = rename_by_chid[customised["video"][service]["channel_id"]]
 
With the above renames are done in bouquets but service list are not changed.

If I add dxHoldName I get a crash

Code:
/SystemPlugins/AutoBouquetsMaker/scanner/tools.py", line 246, in customMix
< 14971.788807> 14:15:54.2001   File "<string>", line 19, in <module>
< 14971.789045> 14:15:54.2003 NameError: name 'dxHoldName' is not defined
< 14971.789123> 14:15:54.2004 [ePyObject] (CallObject(<bound method AutoBouquetsMaker.doBuildIndex of <class 'Plugins.SystemPlugins.AutoBouquetsMaker.scanner.main.AutoBouquetsMaker'>>,()) failed

Code:
# Renames by sid
for service in sorted(customised["video"].keys()):
	if "service_id" in customised["video"][service] and customised["video"][service]["service_id"] in rename_by_sid:
		customised["video"][service]["interactive_name"] = rename_by_sid[customised["video"][service]["service_id"]]
		service["service_flags"] = dxHoldName
 

OpenViX Feeds Status

Back
Top