Hi Rios,
Sorry for my late reply but I just discovered your mail.
I’ve attached the script along with the channel definition and the channel tags I’m using.
1. First of all take abackup of your current tvheadend setup. Even though this script works for me, it might mess things up for you. So please take a backup before you proceed.I will not take any responsibility if you mess up your configuration.
2. Make sure that in General Config for the EPG Grabber that update channel name, number and icon is unchecked else your channels will be renamed immitiatly.
3. Delete all the channels you have. From within the TVHeadend UI go to channels, select them all and delete.
4. Make sure that all your services are up to date for all the adapters you have. If you are not sure then just delete them all and go to the general tab and select “Map DVB services to channel…”
5. Stop TVHeadend service.
6. Extract the files from htsCreateChannel.tgz packet. I recommend extracting it to your .hts directory. That is where I keep them and the rest of these instructions will assume that you do.
7. If you want to use the same channel tags as I do remove your current channeltags directory and extract the channeltags.tgz packet. From within your .hts directory do the following:
> $ rm -rf tvheadend/channeltags
> $ tar xzf channeltags.tgz
Make sure that the directory and files have the correct ownership and priviledges. I’m using the same channel tags as Sky currently is, that is Entertainment, Sports, Movies, Documentaries, …
8. If you want to use icons I recommend having a local apache server running with you icon directory. Most of the icons I got from http://www.team-mediaportal.com/extensions/tv-channels/uk-tv-radio-channel-logos. They are located in the directory /var/www/pvr.logos on the same machine that is running TVHeadend and can be accessed as http://192.168.1.3/pvr.logos/ from other machines in my local network.
The script is called htsCreateChannels.py and can be started with various arguments. I recommend that you will use -–no-act argument until you are only getting errors/warnings that you are sure you want to ignore. The script reads in the list I created of channels, read channel tags from tvheadend/channeltags and all the transports from tvheadend/dvbtransports. It creates all the channels in tvheadend/channels and patches the needed transports.
It will use a channel definition file, which is by default assumed to be channels.cvs. This is a cvs formatted file with the following format:
> Channel Number, HD Channel Number, Service Name, Channel Name, Channel Tag
HD Channel Number, Channel Name and Channel Tag are optional so if empty HD Channel Number is assumed to be the same has Channel Number and Channel Name is assumed to be the same as Service Name.
Orginally I used the list of sky channels that I found at: http://www.channelwiki.org/wiki/List_of_channels_on_Sky_(UK_&_Ireland). But have been modifying it since.
9. Make sure that there are no channels defined in tvheadend/channels. Then run the script. If you are not using icons just run with the following command:
$ ./htsCreateChannels.py --tvheadend-dir=tvheadend --no-act
Check if you get any warning or errors. If you get any warning like…
> warning: "310:Sky DramaRom" was not found in dvbtransports, defined in line 168.
Then check if you can find the service, update channels.cvs and try again. When searching for services I usually find it easiest simple to grep for it, i.e.
> $ grep -i drama tvheadend/dvbtransports/*/*
When you have fixed all the warnings just skip the –no-act argument and all the channels will be created. Make sure that the ownership and privileges for tvheadend/channels is correct.
If you are using icons use the following arguments:
> $ ./htsCreateChannels.py --tvheadend-dir=tvheadend --icon-dir=/var/www/pvr.logos --http-prefix=
http://192.168.1.3/pvr.logos/ --no-act
>
--icon-dir is the directory where the script should search for the correct icond and -–http-prefix is the prefix that should be added in the icon property of the channel.
I haven’t run the script for a while, so I’m sure it is not up to date. To figure out what the new service name is I usually go to http://tv.sky.com/tv-guide, find the channel and the service name is usually the name that pops up when you move your mouse over the channel icon.
9. Start tvheadend again.
Hope this will be useful. Let me know if you run in to any problems.
Regards,
Indridi