This post will only be relevant to you if you are a provider or manage multiple boxes.
As mentioned on the plugin homepage the new plugin has a mechanism to update provider details (i.e. name, host name, port) across multiple boxes. We’ve received a number of enquiries on how providers can provide automated updates and one line installs. This post aims to address these questions.
Create Provider Update File
The provider update file is a text file that has your provider details. The plugin will automatically check this file every 6 hours and apply any updates. The text file should follow the format ‘Name,M3UURL,EPGURL’ e.g.
SULS,http://www.suls.co.uk/get.php?username=USERNAME&password=PASSWORD&type=m3u_plus&output=ts,http://www.suls.co.uk/xmltv.php?username=USERNAME&password=PASSWORD
Note: USERNAME & PASSWORD should be left as the generic placeholders
Upload the provider.txt file to an accessible hosting space e.g. your panel or some cloud service like Dropbox
Create Generic Provider Config
Create a generic config file with your provider URLs e.g.
<!-- E2m3u2bouquet supplier config file Add as many suppliers as required this config file will be used and the relevant bouquets set up for all suppliers entered 0 = No/False 1 = Yes/True For elements with <![CDATA[]] enter value between empty brackets e.g. <![CDATA[mypassword]]> --> <config> <supplier> <name>SULS</name><!-- Supplier Name --> <enabled>1</enabled><!-- Enable or disable the supplier (0 or 1) --> <settingslevel>simple</settingslevel> <m3uurl><![CDATA[http://www.suls.co.uk/get.php?username=USERNAME&password=PASSWORD&type=m3u_plus&output=ts]]></m3uurl><!-- Extended M3U url --> <epgurl><![CDATA[http://www.suls.co.uk/xmltv.php?username=USERNAME&password=PASSWORD]]></epgurl><!-- XMLTV EPG url --> <username><![CDATA[uuuuu]]></username><!-- (Optional) will replace USERNAME placeholder in urls --> <password><![CDATA[ppppp]]></password><!-- (Optional) will replace PASSWORD placeholder in urls --> <providerupdate><![CDATA[https://www.dropbox.com/s/<fileid>/provider.txt?dl=1]]></providerupdate><!-- (Optional) Provider update url --> <providerhideurls>1</providerhideurls><!-- (Optional) Hide Provider urls in plugin --> <iptvtypes>0</iptvtypes><!-- Change all TV streams to IPTV type (0 or 1) --> <streamtypetv></streamtypetv><!-- (Optional) Custom TV stream type (e.g. 1, 4097, 5001 or 5002 --> <streamtypevod></streamtypevod><!-- (Optional) Custom VOD stream type (e.g. 4097, 5001 or 5002 --> <multivod>0</multivod><!-- Split VOD into seperate categories (0 or 1) --> <allbouquet>0</allbouquet><!-- Create all channels bouquet (0 or 1) --> <picons>0</picons><!-- Automatically download Picons (0 or 1) --> <xcludesref>1</xcludesref><!-- Disable service ref overriding from override.xml file (0 or 1) --> <bouqueturl><![CDATA[]]></bouqueturl><!-- (Optional) url to download providers bouquet - to map custom service references --> <bouquetdownload>0</bouquetdownload><!-- Download providers bouquet (uses default url) must have username and password set above - to map custom service references --> <bouquettop>1</bouquettop><!-- Place IPTV bouquets at top (0 or 1) --> </supplier> </config>
- The providerupdate url https://www.dropbox.com/s/<fileid>/provider.txt?dl=1 should be set to the URL of your provider update file created in the previous step
- Again USERNAME & PASSWORD should be left as the generic placeholders
- The username string ‘uuuuu’ and password string ‘ppppp’ should be left as these values. They will get replaced with the individuals details within the install command below
Upload the config.xml file to an accessible hosting space e.g. your panel or some cloud service like Dropbox
One line install script
The version below will only copy the config file if the user doesn’t already have one
wget -O /tmp/config.xml "https://www.dropbox.com/s/<fileid>/config.xml?dl=1" && sed -i 's/uuuuu/myusername/g' /tmp/config.xml && sed -i 's/ppppp/mypassword/g' /tmp/config.xml && opkg install --force-reinstall "https://github.com/su1s/e2m3u2bouquet/releases/download/v0.8.5/enigma2-plugin-extensions-e2m3u2bouquet_0.8.5_all.ipk" && reboot
- The config file URL https://www.dropbox.com/s/<fileid>/config.xml?dl=1 should be set to the URL of your config file
- The text myusername & mypassword in the command should be replaced with the individuals users username & password. You should do this on a server script (see below for a JavaScript generator) or instruct the user to make the change.
- The command above references the 0.8.5 version of the plugin, this should be updated to the current release version
The version below will overwrite the config file even if the user already has one (not recommended)
rm -f /etc/enigma2/e2m3u2bouquet/config.xml && wget -O /tmp/config.xml "https://www.dropbox.com/s/<fileid>/config.xml?dl=1" && sed -i 's/uuuuu/myusername/g' /tmp/config.xml && sed -i 's/ppppp/mypassword/g' /tmp/config.xml && opkg install --force-reinstall "https://github.com/su1s/e2m3u2bouquet/releases/download/v0.8.5/enigma2-plugin-extensions-e2m3u2bouquet_0.8.5_all.ipk" && reboot
- The config file url https://www.dropbox.com/s/<fileid>/config.xml?dl=1 should be set to the URL of your config file
- The text myusername & mypassword in the command should be replaced with the individuals users username & password. You should do this on a server script or instruct the user to make the change.
- The command above references the 0.8.5 version of the plugin, this should be updated to the current release version
Below is an example of a simple JavaScript generator page that asks for the users username & password and then outputs the custom install line. The config.xml URL in the line towards the bottom starting ‘var installcmd’ will need edited to the correct config.xml URL and as it currently references the 0.8.5 version of the plugin, this should be updated to the current release version
<!doctype html> <html lang="en"> <head> <title>Generator Demo</title> <style> h1 { font-size: 1.5em } input, button { min-width: 72px; min-height: 36px; border: 1px solid grey; padding: 3px; } label, input, button { display: block; } input { margin-bottom: 1em; } pre { background: #f1f1f1; border: 1px solid #ccc; overflow: auto; padding: 1em; white-space: pre-wrap; word-break: break-all; word-wrap: break-word; } .hidden { display: none; } </style> </head> <body> <h1>Generator Demo</h1> <label for="username">Username</label> <input id="username" placeholder="Enter Username"> <label for="password">Password</label> <input id="password" placeholder="Enter Password"> <button id="generate">Generate</button> <pre id="output" class="hidden"></pre> <script type="text/javascript"> function onClick() { var username = document.getElementById('username').value; var password = document.getElementById('password').value; var output = document.getElementById('output'); output.classList.remove('hidden'); if (inputsAreEmpty(username, password)) { output.textContent = 'Error: need to enter username and password'; return; } var displaycmd = installcmd.replace('myusername', username).replace('mypassword', password); output.textContent = displaycmd; return; } function inputsAreEmpty(username, password) { if (username === '' || password === '') { return true; } else { return false; } } var installcmd = "wget -O /tmp/config.xml \"https://www.dropbox.com/s/<fileid>/config.xml?dl=1\" && sed -i 's/uuuuu/myusername/g' /tmp/config.xml && sed -i 's/ppppp/mypassword/g' /tmp/config.xml && opkg install --force-reinstall \"https://github.com/su1s/e2m3u2bouquet/releases/download/v0.8.5/enigma2-plugin-extensions-e2m3u2bouquet_0.8.5_all.ipk\" && reboot"; var button = document.getElementById('generate'); button.addEventListener('click', onClick); </script> </body> </html>
Update v0.8.5
v0.85 has a new parameter in the config.xml file <providerhideurls> – if this is set to 1 provider urls will not be shown in the plugin.
Hi Mate,
First of all, fantastic work – really appreciate the time and effort you invest into this!
Quick question, if the e2 device already has a config file from provider A located in /etc/enigma2/e2m3u2bouquet/config.xml, would a new file from provider B be merged with this if placed in /tmp/config.xml ?
I’m just wondering how different provider can collocate without ridding any existing config?
TIA
If there’s already a config file in ‘/etc/enigma2/e2m3u2bouquet/config.xml’ then it won’t be changed or overridden.
[…] Add provider managed update support to script same functionality as shown here […]
i would love to see a .deb file for the DM920, any chance on that ?
If I recall correctly someone tried manually installing the files but other things stopped it from working. It’s not something that we can test or support.
Hey guys, Nice work on the plugin. I’m using provider managed script install. Do you have a way for the javerscript generator to insert the new provider into the current config.xml rather than ignore or replace the config?
Many thanks
Sorted it with another bash script.