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 1 of 2 12 LastLast
Results 1 to 15 of 19

Thread: ABM Hacks Examples

  1. #1
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts

    ABM Hacks Examples

    This thread is for example ABM Hacks.

    Example files go in:
    /usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/custom
    Last edited by Huevos; 24-07-15 at 12:05.
    Help keep OpenViX servers online.Please donate!

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

    judge (24-07-15),Peterj (24-07-15),Sicilian (30-07-15)

  3. #2
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    Sort channels in each section alphabetically.

    This can be used for any provider but the attached file would need to be correctly named for the provider being modified. Switch "swap channels" to "no".

    Code:
    <custommix>
    	<hacks>
    <![CDATA[
    
    section_numbers = sorted(sections.keys())
    for this_section in section_numbers:
    	if section_numbers.index(this_section)+1 < len(section_numbers):#this_section < 1000:
    		next_section = section_numbers[section_numbers.index(this_section)+1]
    	else:
    		next_section = 65535
    	sort_list = []
    	for service in sorted(customised["video"].keys()):
    		if service in range(this_section, next_section):
    			if 'interactive_name' in customised["video"][service]:
    				sort_list.append((customised["video"][service], re.sub('^(?![a-z])', 'zzzzz', customised["video"][service]['interactive_name'].lower())))
    			else:
    				sort_list.append((customised["video"][service], re.sub('^(?![a-z])', 'zzzzz', customised["video"][service]['service_name'].lower())))
    			del customised["video"][service]
    	sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    	i = this_section
    	for service in sort_list:
    		customised["video"][i] = service[0]
    		i += 1
    			
    ]]>
    	</hacks>
    </custommix>
    Attached Files Attached Files
    Help keep OpenViX servers online.Please donate!

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

    abu baniaz (13-02-16),Bangord30 (10-07-16),Sicilian (30-07-15),sunday96 (07-08-15)

  5. #3
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    Create an ITV regions bouquet.

    Hades 018+.

    For use in conjunction with "Sky UK". This will create an ITV regions bouquet as the last but one bouquet. In ABM -> Configure, "Include not indexed channels" must be set to "Yes".

    sat_282_sky_uk_CustomMix.xml:
    Code:
    <custommix>
    	<hacks>
    <![CDATA[
    
    ITVs = []
    ITVsPlusOne = []
    rest = []
    last_section = max(sections.keys())
    last_section_name = sections[last_section]
    
    for service in sorted(services["sat_282_sky_uk"]["video"].keys()):
    	if service in range(last_section, 1450) or service in [103, 133, 178]:
    		# ITV regions
    		if 'interactive_name' in services["sat_282_sky_uk"]["video"][service] and (service in [103,178] or (service in range(last_section, 1450) and '+1' not in services["sat_282_sky_uk"]["video"][service]["interactive_name"] and ('ITV' in services["sat_282_sky_uk"]["video"][service]["interactive_name"] or 'STV' in services["sat_282_sky_uk"]["video"][service]["interactive_name"] or 'UTV' in services["sat_282_sky_uk"]["video"][service]["interactive_name"]))):
    			ITVs.append(services["sat_282_sky_uk"]["video"][service])
    			
    		# ITV +1 regions
    		elif 'interactive_name' in services["sat_282_sky_uk"]["video"][service] and (service in [133] or (service in range(last_section, 1450) and '+1' in services["sat_282_sky_uk"]["video"][service]["interactive_name"] and ('ITV' in services["sat_282_sky_uk"]["video"][service]["interactive_name"] or 'STV' in services["sat_282_sky_uk"]["video"][service]["interactive_name"] or 'UTV' in services["sat_282_sky_uk"]["video"][service]["interactive_name"]))):
    			ITVsPlusOne.append(services["sat_282_sky_uk"]["video"][service])
    		
    		else:
    			rest.append(services["sat_282_sky_uk"]["video"][service])
    
    i = last_section
    sections[i] = "ITV Regions"
    
    sort_list = []
    for x in ITVs:
    	sort_list.append((x, re.sub('^(?![a-z])', 'zzzzz', x['interactive_name'].lower())))
    sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    for service in sort_list:
    	customised["video"][i] = service[0]
    	i += 1
    			
    sort_list = []
    for x in ITVsPlusOne:
    	sort_list.append((x, re.sub('^(?![a-z])', 'zzzzz', x['interactive_name'].lower())))
    sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    for service in sort_list:
    	customised["video"][i] = service[0]
    	i += 1
    		
    sections[i] = last_section_name	
    sort_list = []
    for x in rest:
    	sort_list.append((x, re.sub('^(?![a-z])', 'zzzzz', x['service_name'].lower())))
    sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    for service in sort_list:
    	customised["video"][i] = service[0]
    	i += 1
    			
    ]]>
    	</hacks>
    </custommix>
    grab.jpg
    Attached Files Attached Files
    Last edited by Huevos; 07-08-15 at 10:45.
    Help keep OpenViX servers online.Please donate!

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

    abu baniaz (13-02-16),Bangord30 (10-07-16),dsayers (09-09-17),judge (03-08-15),lincsat (24-07-15),Sicilian (30-07-15)

  7. #4
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    Create a timeshift bouquet.

    For Sky UK. Creates a bouquet with "+1", "+2" and "+24" channels. Bouquet is placed after the interactive sections so as not to interfere with numbering.

    Code:
    <custommix>
    	<hacks>
    <![CDATA[
    
    timeshift = []
    rest = []
    last_section = max(sections.keys())
    last_section_name = sections[last_section]
    
    for service in sorted(services["sat_282_sky_uk"]["video"].keys()):
    	if service in range(last_section, 1450):
    		rest.append(services["sat_282_sky_uk"]["video"][service])
    	elif service < 1000 and ("+1" in services["sat_282_sky_uk"]["video"][service]["service_name"] or "+2" in services["sat_282_sky_uk"]["video"][service]["service_name"]):
    		timeshift.append(services["sat_282_sky_uk"]["video"][service])
    		
    i = last_section
    sections[i] = "Timeshift"
    
    sort_list = []
    for x in timeshift:
    	sort_list.append((x, re.sub('^(?![a-z])', 'zzzzz', x['service_name'].lower())))
    sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    for service in sort_list:
    	customised["video"][i] = service[0]
    	i += 1
    
    sections[i] = last_section_name	
    sort_list = []
    for x in rest:
    	sort_list.append((x, re.sub('^(?![a-z])', 'zzzzz', x['service_name'].lower())))
    sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    for service in sort_list:
    	customised["video"][i] = service[0]
    	i += 1
    			
    ]]>
    	</hacks>
    </custommix>
    grab.jpg
    Attached Files Attached Files
    Help keep OpenViX servers online.Please donate!

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

    abu baniaz (07-08-15),Bangord30 (10-07-16),judge (11-08-15),Sicilian (26-09-18),sinky50 (14-09-15),Willmoore (07-08-15)

  9. #5
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts
    For those who want number printed next to channel name.

    Only 1-999 are numbered (inclusive of enforced numbers, i.e where we give a channel a number in that range. Eg Setanta sports)

    This will break SNPicons

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    for service in sorted(services[section_identifier]["video"].keys()):
        if service in range(1,1000):
            if "interactive_name" in services[section_identifier]["video"][service]:
                services[section_identifier]["video"][service]["interactive_name"] = str(services[section_identifier]["video"][service]["number"]) + " - " + services[section_identifier]["video"][service]["interactive_name"]
            else:
                services[section_identifier]["video"][service]["interactive_name"] = str(services[section_identifier]["video"][service]["number"]) + " - " + services[section_identifier]["video"][service]["service_name"]
                
    ]]>
    
        </hacks>
    </custommix>


    To show channel numbers on Info bars:
    Menu > Setup > System > User Interface > Settings > Show channel number in infobar
    Change this to yes and Restart E2 for setting to be applied.

    N.B
    Enigma2 does not have numbering. The numbers are dynamic and based on the order in which bouquets/channels are loaded. As such not easy to do for Graphical EPG screen.


    Edit: mark II version... allows swap to display the correct numbers. For use in OpenViX 4.2.001+.

    Code:
    <custommix>
    	<hacks>
    <![CDATA[
    
    # swap channel numbers. Only swaps number. Channel swap is still done in bouquetwriter.py
    if providerConfig.isSwapChannels() and "swapchannels" in providers[section_identifier] and len(providers[section_identifier]["swapchannels"]) > 0 and "preferred_order" in providers[section_identifier]["swapchannels"][0]:
    	for swaprule in providers[section_identifier]["swapchannels"][0]["preferred_order"]:
    		if swaprule[0] in services[section_identifier]["video"] and swaprule[1] in services[section_identifier]["video"] and services[section_identifier]["video"][swaprule[1]]["service_type"] >= 17:
    			customised["video"][swaprule[0]]["number"] = swaprule[1]
    			customised["video"][swaprule[1]]["number"] = swaprule[0]
    			
    for service in sorted(customised["video"].keys()):
        if service in range(1,1000):
            if "interactive_name" in customised["video"][service]:
                customised["video"][service]["interactive_name"] = str(customised["video"][service]["number"]) + " - " + customised["video"][service]["interactive_name"]
            else:
                customised["video"][service]["interactive_name"] = str(customised["video"][service]["number"]) + " - " + customised["video"][service]["service_name"]
    
    ]]>
    
        </hacks>
    </custommix>
    Attached Files Attached Files

  10. The Following 4 Users Say Thank You to abu baniaz For This Useful Post:

    Bangord30 (10-07-16),judge (11-08-15),outrage_uk (29-09-15),Sicilian (26-09-18)

  11. #6
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts

    Create csv file

    These will make a csv file containing:
    Interactive name
    Service reference
    Channel Name
    Official LCN (Logical Channel Number)
    EPG/Channel ID
    Encryption type (some are wrong on the tables)
    Provider name
    IPTV link
    TSID
    Service type
    Ocram Picon SRP value


    EDIT:
    These are not compatible with Python 3 images
    Attached Files Attached Files
    Last edited by abu baniaz; 24-02-23 at 20:37. Reason: not python 3 compatible

  12. The Following 4 Users Say Thank You to abu baniaz For This Useful Post:

    Bangord30 (10-07-16),dsayers (17-07-16),Sicilian (26-09-18)

  13. #7
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    This is a test provider file. It goes in the provider folder. You can sort by the Channel/EPG ID, LCN, Name
    Attached Files Attached Files
    Last edited by abu baniaz; 09-03-16 at 20:02.
    Help keep OpenViX servers online.Please donate!

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

    abu baniaz (12-07-16),Bangord30 (10-07-16),Sicilian (26-09-18)

  15. #8
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts

    Add FTV channels to FTA only

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    ftv_IDs = [
        1016, # Liverpool TV
        1078, # Birmingham TV
        1758, # 4Music
        2615, # YESTERDAY +1
        5043, # Tyne & Wear TV
        5090, # London Live
        5315, # Bristol TV
        5536, # Cardiff TV
        5537, # Leeds TV
    ]
    
    for number in customised["video"].keys():
        if customised["video"][number]["channel_id"] in ftv_IDs:
            customised["video"][number]["free_ca"] = 0
        elif customised["video"][number]["free_ca"] == 1:
            del customised["video"][number]
                
    ]]>
        </hacks>
    </custommix>
    grab1.jpg

    grab2.jpg

    grab3.jpg

    grab4-jpg.jpg
    Attached Files Attached Files
    Last edited by abu baniaz; 14-07-20 at 15:03. Reason: update list.
    Help keep OpenViX servers online.Please donate!

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

    abu baniaz (10-07-16),Bangord30 (10-07-16),deltec (04-12-23),givecredit (11-07-16),Sicilian (26-09-18)

  17. #9
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts
    Place all News channels in the News bouquet.

    N.B. You will get an "All channels" bouquet as a result of this hack.

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    exceptions = {
        570:"News",
        571:"News",
        572:"News",
        573:"News",
        574:"News",
        575:"News",
        576:"News",
        577:"News",
        578:"News",
        579:"News"
    }
    
    hacked_bouquets = {}
    next_lcn = max(customised["video"].keys())+1
    sections_copy = {min(sections.keys()): "All channels"}
    for section in sections:
        hacked_bouquets[sections[section]] = []
    
    for service in sorted(services[section_identifier]["video"].keys()):
        if service in exceptions and exceptions[service] in hacked_bouquets:
            hacked_bouquets[exceptions[services[section_identifier]["video"][service]["number"]]].append(services[section_identifier]["video"][service])
        else:
            sec_list = []
            for x in sections:
                if int(x) <= service:
                    sec_list.append(x)
            section_number = max(sec_list)
            hacked_bouquets[sections[section_number]].append(services[section_identifier]["video"][service])
            
    for section in sorted(sections.keys()):
        sections_copy[next_lcn] = sections[section]
        for service in hacked_bouquets[sections[section]]:
            customised["video"][next_lcn] = service
            next_lcn += 1
            
    sections = sections_copy
                
    ]]>
        </hacks>
    </custommix>
    Edit: No longer valid after 2018-05-01 changes.
    Attached Files Attached Files

  18. The Following 3 Users Say Thank You to abu baniaz For This Useful Post:

    dsayers (17-07-16),Huevos (18-07-16),Sicilian (26-09-18)

  19. #10
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts
    Rename channels based on numbers

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    rename = {
        101: "My name for 101",
        102: "My name for 102",
        103: "My name for 103"
        }
        
    # Rename channels
    for channel_number in sorted(customised["video"].keys()):
        if channel_number in rename:
            customised["video"][channel_number]["interactive_name"] = rename[channel_number]
        
    ]]>
        </hacks>
    </custommix>
    Attached Files Attached Files

  20. The Following 4 Users Say Thank You to abu baniaz For This Useful Post:

    Bangord30 (19-07-17),dsayers (20-07-17),outrage_uk (23-07-17),Sicilian (26-09-18)

  21. #11
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    Class that contains some tools for working on <hacks>
    Code:
    import re
    
    class FavTools():
    	def makeSpace(self, customised, sections, pos, length):
    		# make some space part way through the channel list to insert a section.
    		# all channels below will be shifted down and renumbered
    		customised_tmp = {}
    		sections_tmp = {}
    		
    		for sec_num in sorted(sections.keys()):
    			sections_tmp[sec_num + (0 if sec_num < pos else length)] = sections[sec_num]
    		sections = sections_tmp
    		
    		for service in sorted(customised["video"].keys()):
    			customised_tmp[service + (0 if service < pos else length)] = customised["video"][service]
    		customised["video"] = customised_tmp
    		return customised, sections
    		
    	def getSectionNumber(self, sections, section_name):
    		# returns section number for any given section name
    		for section, name in sections.iteritems():
    			if name == section_name:
    				return section
    	
    	def getNextSection(self, sections, section_name):
    		#returns next section number when given the name of the current section
    		thisSection = self.getSectionNumber(sections, section_name)
    		if thisSection is None:
    			return
    		for section in sorted(sections.keys()):
    			if section > thisSection:
    				return section
    				
    	def getLastServiceInSection(self, services, sections, section_name):
    		ret = None
    		thisSection = self.getSectionNumber(sections, section_name)
    		if thisSection is None:
    			return
    		nextSection = self.getNextSection(sections, section_name)
    		lastService = 0
    		if nextSection is None:
    			return max(services.keys())
    		for service in sorted(services.keys()):
    			if service >= thisSection and service < nextSection:
    				ret = service
    		return ret
    		
    	def listChannelsInSection(self, services, providers, provider, section_name):
    		# returns LCN list
    		if provider not in services:
    			return []
    		thisSection = self.getSectionNumber(sections, section_name)
    		if thisSection is None:
    			return []
    		nextSection = self.getNextSection(sections, section_name)
    		if nextSection is none:
    			nextSection = 65536
    		ret = []
    		for service in sorted(services[sky]["video"].keys()):
    			if service >= thisSection and service < nextSection:
    				ret.append(service)
    		return ret		
    
    	def sortListFlatAlpha(self, services):
    		#returns list of services in alphabetical order by service name (or interactive name if it is set).
    		sort_list = []
    		for service in services:
    			if 'interactive_name' in service:
    				sort_list.append((service, re.sub('^(?![a-z])', 'zzzzz', service['interactive_name'].lower())))
    			else:
    				sort_list.append((service, re.sub('^(?![a-z])', 'zzzzz', service['service_name'].lower())))
    		sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    		return [i[0] for i in sort_list]
    		
    	def sortDictFlatAlpha(self, services):
    		# services is a dict with LCNs as keys
    		# returns keys, sorted flat alphabetic by service name (or interactive name if it is set).
    		sort_list = []
    		for lcn in services:
    			if "interactive_name" in services[lcn]:
    				sort_list.append((lcn, re.sub('^(?![a-z])', 'zzzzz', services[lcn]['interactive_name'].lower())))
    			else:
    				sort_list.append((lcn, re.sub('^(?![a-z])', 'zzzzz', services[lcn]['service_name'].lower())))
    		sort_list = sorted(sort_list, key=lambda listItem: listItem[1])
    		return [i[0] for i in sort_list]
    		
    	def getHDchannelList(self, services, providers, providerConfigs, provider, skipLastSection=False):
    		# returns LCNs
    		HD_channels_numbers = []
    		last_section = 65536
    		if skipLastSection:
    			last_section = max(providers[provider]["sections"].keys())
    		for service in sorted(services[provider]["video"].keys()):
    			if service < last_section and services[provider]["video"][service]["service_type"] in DvbScanner.HD_ALLOWED_TYPES:
    				HD_channels_numbers.append(service)
    		
    		# Apply channels-on-top
    		hd_channels_numbers_tmp = HD_channels_numbers
    		if providerConfigs[provider].getArea().startswith('sd'):
    			channels_on_top = providers[provider]["sdchannelsontop"]
    			channels_on_top_tmp = list(providers[provider]["sdchannelsontop"])
    		else:
    			channels_on_top = providers[provider]["hdchannelsontop"]
    			channels_on_top_tmp = list(providers[provider]["hdchannelsontop"])
    		channels_on_top_tmp = list(channels_on_top)
    		for number in channels_on_top:
    			if number in hd_channels_numbers_tmp:
    				hd_channels_numbers_tmp.remove(number)
    			else:
    				channels_on_top_tmp.remove(number)
    		hd_channels_numbers = channels_on_top_tmp
    		hd_channels_numbers += hd_channels_numbers_tmp
    		return hd_channels_numbers
    Tool for getting ITV channels and sorting them.
    Code:
    def SkyUKITVs(services, providers):
    	sky = "sat_282_sky_uk"
    	if sky not in services:
    		return []
    	ITVs = []
    	ITVsPlusOne = []
    	last_sky_section = max(providers[sky]["sections"].keys())
    	not_indexed_itv = []
    	
    	for service in sorted(services[sky]["video"].keys()):
    		if service in range(last_sky_section, 1450) or service in [103, 133, 178]:
    			# ITV regions
    			if 'interactive_name' in services[sky]["video"][service] and (service in [103,178] or (service in range(last_sky_section, 1450) and '+1' not in services[sky]["video"][service]["interactive_name"] and ('ITV' in services[sky]["video"][service]["interactive_name"] or 'STV' in services[sky]["video"][service]["interactive_name"] or 'UTV' in services[sky]["video"][service]["interactive_name"]))):
    				ITVs.append(services[sky]["video"][service])
    				if service >= last_sky_section:
    					not_indexed_itv.append(service)
    	
    			# ITV +1 regions
    			elif 'interactive_name' in services[sky]["video"][service] and (service in [133] or (service in range(last_sky_section, 1450) and '+1' in services[sky]["video"][service]["interactive_name"] and ('ITV' in services[sky]["video"][service]["interactive_name"] or 'STV' in services[sky]["video"][service]["interactive_name"] or 'UTV' in services[sky]["video"][service]["interactive_name"]))):
    				ITVsPlusOne.append(services[sky]["video"][service])
    				if service >= last_sky_section:
    					not_indexed_itv.append(service)
    	
    	ITVs = FavTools().sortListFlatAlpha(ITVs)
    	ITVs += FavTools().sortListFlatAlpha(ITVsPlusOne)
    	return ITVs, not_indexed_itv
    Help keep OpenViX servers online.Please donate!

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

    dsayers (24-09-17),jawz (24-09-17),Sicilian (26-09-18)

  23. #12
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts
    Quote Originally Posted by lincsat View Post
    Using the Humber region and the latest provider file, I get ITV Yorkshire West HD on 103 and ITV Yorkshire East on 176...
    That is the default behaviour. If there is not a simulcast HD channel available ABM will select the substitute HD channel provided by the broadcaster. More on that here: ITV HD channel scanned by ABM doesn't match local region.

    If you want to override that behaviour and only swap the simulcast versions of BBC/ITV, not the substitutes, you can try the following:
    Code:
    <custommix>
    	<hacks>
    <![CDATA[
    
    # this hack prevents non-similcast services between 101 and 103 from swapping. Based on the premise that a service is only similcast if it is in the 800's.
    if providerConfig.isSwapChannels():
    	providerConfig.unsetSwapChannels()
    	swapDict = {}
    	for swaprule in providers[section_identifier]["swapchannels"]:
    		if swaprule[0] in services[section_identifier]["video"] and swaprule[1] in services[section_identifier]["video"] and services[section_identifier]["video"][swaprule[1]]["service_type"] in DvbScanner.HD_ALLOWED_TYPES and services[section_identifier]["video"][swaprule[0]]["service_type"] not in DvbScanner.HD_ALLOWED_TYPES:
    			conditional = len(swaprule) > 2 and swaprule[2] or None
    			if not conditional or eval(conditional, {}, {'service_sd': services[section_identifier]["video"][swaprule[0]], 'service_hd': services[section_identifier]["video"][swaprule[1]]}):
    				if swaprule[0] in range(101,104) and swaprule[1] not in range(801,804):
    					continue
    				swapDict[swaprule[0]] = swaprule[1]
    				swapDict[swaprule[1]] = swaprule[0]
    	for number in swapDict:
    		customised["video"][number] = services[section_identifier]["video"][swapDict[number]]
    		
    ]]>
        </hacks>
    </custommix>
    ABM-config.jpg

    ABM-main.jpg

    ABM-HD.jpg
    Attached Files Attached Files
    Last edited by Huevos; 31-05-18 at 11:19.
    Help keep OpenViX servers online.Please donate!

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

    Sicilian (26-09-18),Willo3092 (31-05-18)

  25. #13
    Huevos's Avatar
    Title
    Administrator
    Join Date
    Jun 2010
    Location
    38.5N, 0.5W
    Posts
    13,945
    Thanks
    2,062
    Thanked 5,145 Times in 3,395 Posts

    Add CH 4 HD to Freesat at position 126 without scanning Sky UK.

    CH 4 HD is no longer part of Freesat but as long as it exists in lamedb it can be inserted into the Freesat line up without needing to scan other providers.

    The channel will be added to 126, so enable swap to place it into 104

    Code:
    <custommix>
        <hacks>
    <![CDATA[
    
    customised["video"][126] = {'service_type': 0x19, 'service_id': 0x52d0, 'transport_stream_id': 0x0814, 'original_network_id': 0x0002, 'namespace': 0x011a0000, 'free_ca': 0x0} # CH 4 HD
    
    ]]>
        </hacks>
    </custommix>
    Attached Files Attached Files
    Last edited by abu baniaz; 08-07-20 at 18:45. Reason: 126, swap, attach xml
    Help keep OpenViX servers online.Please donate!

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

    abu baniaz (10-07-18),dsayers (10-07-18),Sicilian (12-07-18),Valiant (10-07-18),Willo3092 (10-07-18)

  27. #14
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts
    Delete some services that cannot be received. Particularly useful for users in Freeview light areas

    Code:
    <custommix>
        <deletes>
        <!-- Delete channels that do not work --> 
            <delete target="8"></delete>
            <delete target="9"></delete>
            <delete target="11"></delete>
            <delete target="12"></delete>
            <delete target="16"></delete>
            <delete target="17"></delete>
            <delete target="18"></delete>
            <delete target="19"></delete>
            <delete target="20"></delete>
            <delete target="21"></delete>
            <delete target="22"></delete>
            <delete target="23"></delete>
            <delete target="25"></delete>
            <delete target="26"></delete>
            <delete target="27"></delete>
            <delete target="29"></delete>
            <delete target="30"></delete>
            <delete target="31"></delete>
            <delete target="32"></delete>
            <delete target="34"></delete>
            <delete target="35"></delete>
            <delete target="36"></delete>
            <delete target="37"></delete>
            <delete target="38"></delete>
            <delete target="39"></delete>
            <delete target="40"></delete>
            <delete target="41"></delete>
            <delete target="42"></delete>
            <delete target="43"></delete>
            <delete target="44"></delete>
            <delete target="46"></delete>
            <delete target="47"></delete>
            <delete target="48"></delete>
            <delete target="49"></delete>
            <delete target="50"></delete>
            <delete target="54"></delete>
            <delete target="57"></delete>
            <delete target="58"></delete>
            <delete target="59"></delete>
            <delete target="60"></delete>
            <delete target="61"></delete>
            <delete target="62"></delete>
            <delete target="63"></delete>
            <delete target="64"></delete>
            <delete target="65"></delete>
            <delete target="66"></delete>
            <delete target="68"></delete>
            <delete target="70"></delete>
            <delete target="71"></delete>
            <delete target="72"></delete>
            <delete target="74"></delete>
            <delete target="77"></delete>
            <delete target="79"></delete>
            <delete target="80"></delete>
            <delete target="81"></delete>
            <delete target="83"></delete>
            <delete target="85"></delete>
            <delete target="203"></delete>
            <delete target="206"></delete>
            <delete target="207"></delete>
            <delete target="208"></delete>
            <delete target="233"></delete>
            <delete target="234"></delete>
            <delete target="672"></delete>
            <delete target="673"></delete>
            <delete target="674"></delete>
            <delete target="675"></delete>
            <delete target="678"></delete>
            <delete target="679"></delete>
        </deletes>
        <hacks>
    <![CDATA[
    
    ]]>
    
        </hacks>
    </custommix>
    Attached Files Attached Files

  28. The Following 2 Users Say Thank You to abu baniaz For This Useful Post:

    Andy_Hazza (25-09-18),Sicilian (26-09-18)

  29. #15
    abu baniaz's Avatar
    Title
    Moderator
    Join Date
    Sep 2010
    Location
    East London
    Posts
    23,541
    Thanks
    6,517
    Thanked 9,224 Times in 6,287 Posts
    Please be advised that some of these are not compatible with python3 images.

  30. The Following User Says Thank You to abu baniaz For This Useful Post:

    cactikid (24-02-23)

Page 1 of 2 12 LastLast

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.