Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19

Thread: ABM Hacks Examples

  1. #16
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,630
    Thanks
    2,006
    Thanked 4,953 Times in 3,274 Posts

    Create a stream relay bouquet

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    # TSIDs that contain services that need stream relay (or this could be done by LCN or CHID).
    TSIDs = [0x7D3, 0x7D7, 0x7D8, 0x7DB, 0x7DC, 0x7E0, 0x7E3, 0x7E4, 0x7E5, 0x7E7, 0x7E8, 0x7E9, 0x7EA, 0x7EB, 0x7EC, 0x7ED, 0x7EE, 0x7F0, 0x7F2, 0x811, 0x838, 0x841, 0x842]
    
    for service in sorted(list(services[section_identifier]["video"].keys())):
    		serv = services[section_identifier]["video"][service]
    		if serv["transport_stream_id"] in TSIDs and "free_ca" in serv and serv["free_ca"] == 1: # only on listed transponders and only encrypted services
    			url = "http://127.0.0.1:17999/1:0:1:%x:%x:%x:%x:0:0:0:" % (
    				serv["service_id"],
    				serv["transport_stream_id"],
    				serv["original_network_id"],
    				serv["namespace"],
    			)
    			serv["stream"] = quote(url)
    			serv["namespace"] = 33 # writing a dummy namespace is a requirement of stream relay
                
    ]]>
        </hacks>
    </custommix>
    In the above example above there is a TSID list that belongs to 28.2E so we know which service lines to modify. Do similar with other providers.

    As stream relay services are on transponders that are currently disabled in the provider file "broken_TSIDS" will need commenting out... and then run the scan on an "sdcustom" region.

    Code:
    	broken_TSIDS = [
    #		2007, #7d7 20170518
    #		2011, #7db 20170425
    #		2012, #7dc 20170518
    #		2019, #7e3 20170518
    #		2021, #7e5 20170516
    #		2023, #7e7 20170331
    #		2025, #7e9 20170518
    #		2026, #7ea 20170425
    #		2029, #7ed 20170516
    	]
    Help keep OpenViX servers online.Please donate!

  2. The Following 2 Users Say Thank You to Huevos For This Useful Post:

    abu baniaz (26-02-23),dsayers (26-02-23)

  3. #17
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,630
    Thanks
    2,006
    Thanked 4,953 Times in 3,274 Posts

    Create a stream relay bouquet by LCN

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    # LCNs (channel numbers) that need stream relay.
    LCNs = [106, 107]
    
    for service in sorted(list(services[section_identifier]["video"].keys())):
    		serv = services[section_identifier]["video"][service]
    		if service in LCNs and ("free_ca" not in serv or serv["free_ca"] == 1): # only on listed transponders and only encrypted services
    			url = "http://127.0.0.1:17999/1:0:1:%x:%x:%x:%x:0:0:0:" % (
    				serv["service_id"],
    				serv["transport_stream_id"],
    				serv["original_network_id"],
    				serv["namespace"],
    			)
    			serv["stream"] = quote(url)
    			serv["namespace"] = 33 # writing a dummy namespace is a requirement of stream relay
                
    ]]>
        </hacks>
    </custommix>
    Help keep OpenViX servers online.Please donate!

  4. The Following 2 Users Say Thank You to Huevos For This Useful Post:

    abu baniaz (27-02-23),dsayers (26-02-23)

  5. #18
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,630
    Thanks
    2,006
    Thanked 4,953 Times in 3,274 Posts
    Creates a whitelist file.
    Code:
    <!-- Do not use ABM custom providers while using this mix file -->
    <custommix>
        <hacks>
    <![CDATA[
    
    def makeServiceRef(service):
    	return "1:0:%X:%X:%X:%X:%X:0:0:0:" % (
    		service["service_type"],
    		service["service_id"],
    		service["transport_stream_id"],
    		service["original_network_id"],
    		service["namespace"],
    	)
    
    TSIDs = [0x7D3, 0x7D7, 0x7D8, 0x7DB, 0x7DC, 0x7E0, 0x7E3, 0x7E4, 0x7E5, 0x7E7, 0x7E8, 0x7E9, 0x7EA, 0x7EB, 0x7EC, 0x7ED, 0x7EE, 0x7F0, 0x7F2, 0x811, 0x82D, 0x838, 0x841, 0x842]
    CHIDs = [0x44B, 0x48F, 0x490, 0x492, 0x4BA, 0x4C2, 0x4E2, 0x4F6, 0x551, 0xB00, 0xFC2, 0xFD2, 0xFD6, 0x177E]
    
    changed = False
    
    streamrelayrefs = [line.strip() for line in open('/etc/enigma2/whitelist_streamrelay', 'r').readlines()] if os.path.isfile('/etc/enigma2/whitelist_streamrelay') else []
    
    for service in sorted(list(services[section_identifier]["video"].keys())):
    	serv = services[section_identifier]["video"][service]
    	if serv["transport_stream_id"] in TSIDs and ("free_ca" not in serv or serv["free_ca"] == 1) and (serv["service_type"] not in DvbScanner.HD_ALLOWED_TYPES or "channel_id" in serv and serv["channel_id"] in CHIDs):
    		sref = makeServiceRef(serv)
    		if sref not in streamrelayrefs:
    			streamrelayrefs.append(sref)
    			changed = True
    	elif ("free_ca" not in serv or serv["free_ca"] == 1) and serv["service_type"] in DvbScanner.HD_ALLOWED_TYPES:
    		del services[section_identifier]["video"][service]
    		del customised["video"][service]
    
    if changed:
    	streamrelayrefs.sort(key=lambda ref: ((x:=ref.split(":"))[6], x[5], x[4], x[3]))
    	open('/etc/enigma2/whitelist_streamrelay', 'w').write('\n'.join(streamrelayrefs))
    	try:
    		from Screens.InfoBarGenerics import reload_streamrelay
    		reload_streamrelay()
    	except:
    		pass
                
    ]]>
        </hacks>
    </custommix>
    Help keep OpenViX servers online.Please donate!

  6. The Following 2 Users Say Thank You to Huevos For This Useful Post:

    abu baniaz (11-11-23),dsayers (11-11-23)

  7. #19
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,630
    Thanks
    2,006
    Thanked 4,953 Times in 3,274 Posts

    Stream Relay OpenViX 6.4.010 and above

    Code:
    <!-- Do not use ABM custom providers while using this mix file -->
    <custommix>
        <hacks>
    <![CDATA[
    
    def makeServiceRef(service):
    	return "1:0:%X:%X:%X:%X:%X:0:0:0:" % (
    		service["service_type"],
    		service["service_id"],
    		service["transport_stream_id"],
    		service["original_network_id"],
    		service["namespace"],
    	)
    
    TSIDs = [0x7D3, 0x7D7, 0x7D8, 0x7DB, 0x7DC, 0x7E0, 0x7E3, 0x7E4, 0x7E5, 0x7E7, 0x7E8, 0x7E9, 0x7EA, 0x7EB, 0x7EC, 0x7ED, 0x7EE, 0x7F0, 0x7F2, 0x82D, 0x838, 0x841, 0x842]
    CHIDs = [0x44B, 0x48F, 0x490, 0x492, 0x4BA, 0x4C2, 0x4E2, 0x4F6, 0x551, 0xB00, 0xFC2, 0xFD2, 0xFD6, 0x177E]
    whitelist = [1372, 3812, 3831, 4039, 4056]
    
    changed = False
    
    try:
    	from Screens.InfoBarGenerics import streamrelay
    except:
    	streamrelay = None
    
    streamrelayrefs = streamrelay and streamrelay.data[:] or [line.strip() for line in open('/etc/enigma2/whitelist_streamrelay', 'r').readlines()] if os.path.isfile('/etc/enigma2/whitelist_streamrelay') else []
    
    for service in sorted(list(services[section_identifier]["video"].keys())):
    	serv = services[section_identifier]["video"][service]
    	if serv["transport_stream_id"] in TSIDs and ("free_ca" not in serv or serv["free_ca"] == 1) and (serv["service_type"] not in DvbScanner.HD_ALLOWED_TYPES or "channel_id" in serv and serv["channel_id"] in CHIDs):
    		sref = makeServiceRef(serv)
    		if sref not in streamrelayrefs:
    			streamrelayrefs.append(sref)
    			changed = True
    	elif ("free_ca" not in serv or serv["free_ca"] == 1) and serv["service_type"] in DvbScanner.HD_ALLOWED_TYPES and "channel_id" in serv and serv["channel_id"] not in whitelist:
    		del services[section_identifier]["video"][service]
    		del customised["video"][service]
    
    if changed:
    	if streamrelay:
    		streamrelay.data = streamrelayrefs
    	else:
    		open('/etc/enigma2/whitelist_streamrelay', 'w').write('\n'.join(streamrelayrefs))
                
    ]]>
        </hacks>
    </custommix>
    Help keep OpenViX servers online.Please donate!

  8. The Following 2 Users Say Thank You to Huevos For This Useful Post:

    abu baniaz (04-12-23),dsayers (03-12-23)

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.