There are numbers next to the rename channels like
# List channels to be renamed
rename = {
219: "Discovery HD",
423: "Eurosport 1",
424: "Eurosport 1 HD",
425: "Eurosport 2",
426: "Eurosport 2 HD",
620: "Cartoon Network",
}
What do the numbers correspond to?
Not channel numbers, as they are different numbers for those channels.
For eg, If I want to rename Universal Channel HD to Universal HD, I wouldn't know what number to type. I tried using cable ch number 164 for Universal HD.
Either than number is wrong or it's because sat custom mix wont work like you said it may not.
All I want to do is rename channels to whatever I want, and I want it to stick even after ABM scans so I need an ABM "hack" that can be added to my sat custom mix file
Last edited by zino; 19-07-17 at 23:51.
ABM primarily deals things in terms of numbers.
I know that, I just want to know what the number corresponds to so I know where to get the number that I need for the channnel that I want to change the name for, for eg, what number do I enter for Universal Channel HD to be changed to Universal HD, for cable. Is there a table somewhere with the corresponding number for each cable channel?
They are the official channel numbers.
Look at official receiver
Look at official channel list on website
Look at example file ABM produces
The following code will remove all bouquets (not just ABM but you can easily edit it file_type so it just does ABM bouquets:
It does work but you just have to switch bouquets after you have done it before it will re-read the bouquets file and notice nothing is present anymore.Code:from enigma import eDVBDB import glob, os path = '/etc/enigma2' filecache = '/usr/lib/enigma2/python/Plugins/SystemPlugins/AutoBouquetsMaker/providers/providers.cache' print 'Removing ALL bouquets...' os.chdir(path) for file_type in ['*.tv', '*.radio', '*.del', '*.pkl']: files=glob.glob(file_type) for filename in files: if os.path.exists(filename): os.remove(filename) for files in ['lamedb', 'blacklist', 'profile']: if os.path.exists(files): os.remove(files) if os.path.exists(filecache): os.remove(filecache) eDVBDB.getInstance().reloadServicelist() eDVBDB.getInstance().reloadBouquets()
dsayers (20-07-17)
So is this the command just for lamedb?
We could add that to the main.py then when abm runs it deletes the lamedb as it seems that is whats causing the issuesCode:path = '/etc/enigma2' os.chdir(path) for files in ['lamedb', 'blacklist', 'profile']: if os.path.exists(files): os.remove(files)
Last edited by dsayers; 20-07-17 at 19:07.
For just lamedb and nothing else the following should be sufficient:
Ensure you have "import os" otherwise executing "os" commands will cause a crash.Code:if os.path.exists('/etc/engima2/lamedb'): os.remove('/etc/enigma2/lamedb')
Is this issue you're referring to preventing your plugin from working correctly then you could add this to your plugin as your plugin runs before ABM does it's scan. Obviously, ensure your plugin only runs a min before ABM because i'm not sure what will happen if recording or watching something at time your plugin runs this code. It may not do much because the file is likely cached in memory anyhow but you would have to test this.
Last edited by bbbuk; 20-07-17 at 19:40.
dsayers (20-07-17)
No its not an issue with my custommix or plugin its for Cable HD channel renames it doesn't seem to rename them until the above delete script is ran or an automatic scan is ran then run abm or Abu,s method here http://www.world-of-satellite.com/sh...l=1#post454260.
Lincsat asked if we could have the lamedb file deleted on every ABM scan so I was just thinking of the easiest way to achieve it
I did, that's why I asked as the official numbers on virgin website didnt correllate to the examples I saw on renaming cable channels. Maybe I found old examples I dont know.
Appreciate this link!
As an example to test, I tried renaming Channel 5HD to Channel 5 HD using the following, but it didn't work.
I added this at the bottom of my custom mix file:
<hacks>
<![CDATA[
rename = {
105: "Channel 5 HD"
}
# 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>
The example given was the Irish Cable providers, it has different numbers to the UK ones.
"Channel 5HD" is on satellite, "Channel 5 HD" is on cable. Is your mix file for satellite as that is what you want to change?
If you are using HD numbering, the official number is 105. If you are using SD numbering, the official number is 171. Adapt your mix file for the numbering system you are using.
My "test" I did 101 and checked channel number 101, not realising that correponds to "original" 101 which is 115 on my box due to the "HD autoswap" by ABM. Plus i had forgetten to do Enigma2 restart. I've got it working exactly how I want now. Channel numbers used are the default original ones for the swaps ABM does automatically for HD swap, and for "manual" swaps I do, I use the new number. This works perfect.
I've renamed a small handful of channels, thanks for all the help guys!! Happy days.