Custom IPTV Plugin.....

pwillo1982

DW Member +
Joined
Dec 3, 2008
Messages
524
Reaction score
41
I am writing a plugin that will login to my IPTV provider's member portal and automatically add the channels to my box as a new bouquet.

Its a python script that does the following:

Login to the portal using Python-Mechanize to simulate a browser (Needs to handle session cookies)
download my .m3u file
convert it to a usable enigma2 bouquet file by doing various operations
copy the converted IPTV.tv file to /etc/enigma2/
edit /etc/enigma2/bouquets.tv to include the new bouquet


This all works fine but I am unable to automatically re-load the channel lists once its finished, my python script uses the following built in web service command:

Code:
You don't have permission to view the code content. Log in or register now.

Which returns the following xml response in the console to say they channels are being re-loaded successfully:

Code:
You don't have permission to view the code content. Log in or register now.

But when i'm going into the channel lists my new bouquet isn't showing?

Strange thing is, if I manually browse to http://DM_IP/web/servicelistreload?mode=0 in chrome I get the same response but when I go into the lists my new bouquet appears fine.


Anyone know what may be causing this?
 
Never mind, if I launch the command directly in the shell it reloads successfully so I just called my python script from a .sh script and run the refresh command once the python script finished

Code:
You don't have permission to view the code content. Log in or register now.
 
Are there any guides/files for making your own ipk files around?
 
How are you saving your file mate, I had problem with windows. So I wrote the plugin on the Dreambox with VI or on my centos server with nano
 
The script is working fine now and have it installed as a plugin by ftp'ing the files over, just need to work out how to package it into an ipk file
 
You do that from your Dreambox / receiver, I am not on my PC at the moment, but will get you the code it's quite easy mate
 
Thanks bud, I seen that command but what parameters does it take?

Does it just take a folder as input that is in the same structure as the box?
 
Sorry mate still can't get on a PC, but you need to create a architecture file, I can't remember it fully but I will get you all the details later.

You need to create the folder then all the files.

I will put up the source for one I wrote about a year ago
 
Cheers, no rush, much appreciated!

This thread should be a good how-to anyway once its got the details in as I haven't seen much info here or anywhere else.

Once thats sorted I just need to get my head around making some custom screens so I can enter username and password on the box itself and write them to file.

I'll add instructions for that once I have got my head round it myself :)
 
Managed to sort it myself now anyway....

Just had to install enigma2-plugin-extensions-opkg-tools_1.3_all.ipk and then the following:

create a directory on the box for your plugin e.g. /tmp/plugin-name

create a file named "control" with contents similar to the below:

Code:
You don't have permission to view the code content. Log in or register now.

This needs to be placed inside a folder named "CONTROL" within your plugin directory e.g. /tmp/plugin-name/CONTROL/control

Then you need to create a directory structure that is the same as your box, e.g. if you want the files to be installed to
Code:
You don't have permission to view the code content. Log in or register now.

you would create the same path within your plugin folder and place the files in there:

Code:
You don't have permission to view the code content. Log in or register now.

For any other files in any other folders you just follow the same process as above.

Once you have all the files in place you run the following command:

Code:
You don't have permission to view the code content. Log in or register now.

Once finished your ipk file will be in the same directory
 
Last edited:
Back
Top