HD bouquet corresponds with channelsontop, so not a bug.
Ok thanks for looking into it for me.
Last edited by jawz; 17-09-17 at 01:09.
Easiest way to cure this is switch off the HD bouquet and create your own.
jawz (17-09-17)
how would you suggest i create my own hd bouquet. not sure how to instruct only hd channels to go in the bouquet.
thanks
Spend some time reading the code. There is a list of service types in dvbscanner.py. Try to work it out. If you can't, post your attempt. It's the only way to lesrn.
jawz (17-09-17)
thanks I was reading only the provider file. will give it a go
You need to look in the files in the scanner folder. CustomMix xml files are read by tools.py. Ifyou don't read the surrounding code you are just trying to write code in the dark.
jawz (17-09-17)
thanks for the help Huevos but i think i will need to come back to this once i learn some basic python.
I think it works the other way around. You want to achieve something with your code. Learning just comes along the way and is secondary.
Something like this at the end of your hacks section should create an HD section as the first bouquet. Order would be identical to your current list.
Code:current_first_section = sorted(sections.keys())[0] # get the current first section number start_HD_bouquet_at = 1 # where we are going to place our new HD section (i.e. the first bouquet) if start_HD_bouquet_at < current_first_section: # Only add this section if there is space sections[start_HD_bouquet_at] = "HD Channels" # name the HD section current_slot = start_HD_bouquet_at # remember the next available slot for lcn in sorted(customised["video"].keys()): # iterate through occupied slots if not (current_slot < current_first_section): # if there are no more slots in the HD section break if customised["video"][lcn]["service_type"] in DvbScanner.HD_ALLOWED_TYPES: # if this channel is HD customised["video"][current_slot] = customised["video"][lcn] current_slot += 1
Last edited by Huevos; 18-09-17 at 12:49.
jawz (18-09-17)
Excellent work again Huevos. Works exactly as you said.
thanks
Huevos is that code written just to have the bouquet placed at the top, or could i edit this to make the bouquet be placed at the bottom?
No, but the code to do that is simpler.
Code:if customised["video"]: # check not zero length LCN_list = sorted(customised["video"].keys()) # get LCNs sorted low to high next_slot = LCN_list[-1]+1 # get last LCN +1 sections[next_slot] = "HD Channels" # create HD section and name it for lcn in LCN_list: # run through LCNs in order if customised["video"][lcn]["service_type"] in DvbScanner.HD_ALLOWED_TYPES:: # if this channel is HD customised["video"][next_slot] = customised["video"][lcn] # add to HD section next_slot += 1 # bump slot
jawz (19-09-17)
thanks Huevos, but unfortunately i got a crash with this added to the bottom of my file. (I removed the previous code placing the hd bouquet at the top)
Enigma2_crash_2017-09-19_18-02-49.log
thanks