Bouquets downloadable via Plugin or Script
Collapse
This is a sticky topic.
X
X
-
Just tested it on my DM500 and it worked no problems at all,
Got 1 error about cannot find directory so inside the var directory created a folder called script, tried it again and worked fine.
Comment
-
-
-
Code:#!/bin/sh # script to download latest channels lists # Tested on Enigma 1 PLi Jade 3 images (DM500S) # Jfish 1 Feb 2011 # change log # v1 - initial release # v1.1 - remove of reboot at the end of script - no need for it now # v1.2 - check for version update and only update if new version exists # v1.3 - added functions for copy routine - code easier to read and structured far better # v1.4 - check to see if local version exist, if not get channels list down and copy version file over # v1.5 - check to see if server is online before updating channel list # v1.6 - redirect output to NULL (disable screen output) # v1.7 - detect DM version and then perform necessary download for Enigma1 or Enigma2 image # v1.8 - Log of process written to /var/etc/refresh.txt - can be useful in debugging process # v1.9 - delete temp files created in /tmp folder dead=0 dummyval=1 box="UNDEFINED" etype=0 ebq="" url="[URL]http://*********.co.uk/enigma1.tar.gz[/URL]" date=`date -R` checkhost() { echo "Please Waiting..Connecting to Server" wget [URL]http://$url[/URL] 2> /tmp/check.txt svr=`cat /tmp/check.txt` for i in $svr; do if [ $i = "Unable" ] then dead=1 elif [ $i = "can't" ] then dead=1 else dummyval=999 fi done rm -rf /var/bin/index.html } getfiles () { echo "Downloading Latest Channel List For Sky Digital UK" cd /tmp mkdir bq cd bq wget "[URL]http://$url/$ebq[/URL]" echo "$date Successfully downloaded $ebq" >> /var/etc/refresh.txt echo "Completed Downloading Latest Channel List" } loade1 () { echo "$date Downloaded $ebq File From Host $url" >> /var/etc/refresh.txt chmod 755 /tmp/bq/$ebq echo "Extracting Latest Channel List Enigma 1" tar -xzvf $ebq > /dev/null echo "Copying Latest Channel List Enigma 1" rm -rf /var/etc/satellites.xml mv /tmp/bq/satellites.xml /var/etc/ cd /var/tuxbox/config/enigma/ rm -rf *.tv rm -rf *.epl rm -rf *.radio rm -rf *bak rm -rf bouquets rm -rf services rm -rf services.locked mv /tmp/bq/* /var/tuxbox/config/enigma/ rm -rf /tmp/bq rm -rf /var/tuxbox/config/enigma/$ebq echo "Completed Latest Channel List Enigma 1" } loade2 () { echo "$date Downloaded $ebq File From Host $url" >> /var/etc/refresh.txt chmod 755 /tmp/bq/$ebq echo "Extracting Latest Channel List Enigma 2" tar -xzvf $ebq > /dev/null echo "Copying Latest Channel List Enigma 2" rm -rf /var/etc/satellites.xml mv /tmp/bq/satellites.xml /etc/tuxbox/ cd /etc/enigma2 rm -rf *.tv rm -rf *.radio rm -rf blacklist rm -rf lamedb mv /tmp/bq/* /etc/enigma2 rm -rf /tmp/bq rm -rf /etc/enigma2/$ebq echo "Completed Latest Channel List Enigma 2" } reload () { echo "Please Wait...Refreshing Channel List" wget -qO - [URL]http://root:[email protected]/cgi-bin/reloadSettings[/URL] wget -qO - [URL]http://root:[email protected]/cgi-bin/reloadUserBouquets[/URL] echo "Channel List Refreshed" echo "Process Complete" echo "$date Process Complete" >> /var/etc/refresh.txt rm -rf /tmp/remotever.txt rm -rf /tmp/check.txt } getverfile () { cd /tmp wget "[URL]http://$url/remotever.txt[/URL]" chmod 666 /tmp/remotever.txt } detectbox () { echo "Detecting Dreambox Type" if grep -qs DM500 /proc/bus/dreambox ; then box=DM500 etype=1 elif grep -qs DM7020 /proc/bus/dreambox ; then box=DM7020 etype=1 elif grep -qs DM600PVR /proc/bus/dreambox ; then box=DM600PVR etype=1 elif grep -qs DM500PLUS /proc/bus/dreambox ; then box=DM500plus etype=1 elif grep -qs 'dm8000' /proc/stb/info/model ; then box=DM8000HD etype=2 elif grep -qs 'dm800' /proc/stb/info/model ; then box=DM800HD etype=2 else box=UNDEFINED etype=0 fi echo $box echo "$date $box and Enigma $etype Detected" >> /var/etc/refresh.txt if [ $etype -eq 1 ]; then ebq="e1.bq.tar.gz" elif [ $etype -eq 2 ]; then ebq="e2.bq.tar.gz" elif [ $etype -eq 0 ]; then echo "Box Not Identified" echo "** ERROR Unable to Identify Dreambox Version ***" >> /var/etc/refresh.txt echo "$date Process Complete" >> /var/etc/refresh.txt exit fi } detectdm () { echo "Detecting Dreambox Type" if [ -f "/proc/bus/dreambox" ]; then echo "Enigma 1 Image Found" box=`cat /proc/bus/dreambox | grep -i ^type` etype=1 ebq="e1.bq.tar.gz" elif [ -f "/proc/stb/info/model" ]; then echo "Enigma 2 Image Found" box=`cat /proc/stb/info/model | grep -i ^type` etype=2 ebq="e2.bq.tar.gz" else echo "This is not a Dreambox" exit fi } echo "Starting Updating the Channel List" echo "$date Starting Update" >> /var/etc/refresh.txt detectbox checkhost if [ $dead = 0 ] then echo "Connected to Server" echo "$date Successfully Connected to $url" >> /var/etc/refresh.txt if [ ! -f "/var/etc/ver.txt" ]; then echo "Version File Missing - Reloading Channel List" getfiles if [ $etype -eq 1 ]; then loade1 elif [ $etype -eq 2 ]; then loade2 fi getverfile mv /tmp/remotever.txt /var/etc/ver.txt chmod 666 /var/etc/ver.txt rm /tmp/check.txt echo "$date Version File Missing" >> /var/etc/refresh.txt reload exit; fi getverfile localv=`cat /var/etc/ver.txt` remotev=`cat /tmp/remotever.txt` if [ $remotev -gt $localv ]; then echo "New Version of Channel List Found..Updating" getfiles if [ $etype -eq 1 ]; then loade1 elif [ $etype -eq 2 ]; then loade2 fi rm -rf /var/etc/ver.txt mv /tmp/remotever.txt /var/etc/ver.txt chmod 666 /var/etc/ver.txt echo "$date New Version Found" >> /var/etc/refresh.txt reload else echo "No Update Of Channel Needed" echo "$date No Refresh Required" >> /var/etc/refresh.txt echo "$date Process Complete" >> /var/etc/refresh.txt rm -rf /tmp/remotever.txt rm -rf /tmp/check.txt exit; fi else rm -rf /tmp/remotever.txt rm -rf /tmp/check.txt echo "Error Connecting to Server" echo "$date *** Error Connecting To Server $url ***" >> /var/etc/refresh.txt echo "$date Process Complete" >> /var/etc/refresh.txt fiComment
-
-
Hi, and great work guys.
I'm having a few problems getting it going on my box though, using the most recent channelrefresh.rar script which was uploaded.
Is there a newer version of the script available?
I'm on a DM500, and can get the script to execute via the plugin menu, but it just deletes all my bouquets and reboots and I can't figure out what has gone wrong.
Here is the contents of the log (refresh.txt)
Fri, 10 Feb 2012 21:45:25 +0000 Starting Update
Fri, 10 Feb 2012 21:45:25 +0000 DM500 and Enigma 1 Detected
Fri, 10 Feb 2012 21:45:25 +0000 Successfully Connected to http://dl.dropbox.com/u/***removed_b...enigma1.tar.gz
Fri, 10 Feb 2012 21:45:25 +0000 Successfully downloaded e1.bq.tar.gz
Fri, 10 Feb 2012 21:45:25 +0000 Downloaded e1.bq.tar.gz File From Host http://dl.dropbox.com/u/***removed_b...enigma1.tar.gz
Fri, 10 Feb 2012 21:45:25 +0000 New Version Found
Fri, 10 Feb 2012 21:45:25 +0000 Process CompleteComment
-
I have now fixed this - I did not have the bouquet files in a folder called enigma1 within the tar.gz
Great Plugin - Thanks everyoneComment
i put the text there to show this is where i put my web address
Comment