Bouquets downloadable via Plugin or Script

Collapse
This is a sticky topic.
X
X
 
  • Time
  • Show
Clear All
new posts
  • SGTFlipFlop
    V.I.P. Member
    • Sep 2009
    • 1002

    #1

    Bouquets downloadable via Plugin or Script

    Is it possible too write a separate Plugin / Script to automatically download the up-to-date bouquets same way as we download the EPG for example if the bouquets are hosted at a private HTTP site?


    I've no experience writing Scripts / Plugins but just wanted to know if it is possible.


    Anyone done something similar or know how to let me know


    Thanks for reading
  • jfish
    DK Veteran
    • Sep 2008
    • 799

    #2
    Originally posted by SGTFlipFlop
    Is it possible too write a separate Plugin / Script to automatically download the up-to-date bouquets same way as we download the EPG for example if the bouquets are hosted at a private HTTP site?


    I've no experience writing Scripts / Plugins but just wanted to know if it is possible.


    Anyone done something similar or know how to let me know


    Thanks for reading
    I do Linux scripting, so shouldnt be difficult to use some kind of HTTP GET function to download the files and them move them to the correct location for the bouquets and run script using CRON say once a week.

    Comment

    • SGTFlipFlop
      V.I.P. Member
      • Sep 2009
      • 1002

      #3
      That sounds good, That is exactly what I was thinking about. I had a look at making it myself but have no knowledge in this side of things

      Comment

      • lincsat
        DK Veteran
        • Jun 2008
        • 1228

        #4
        You can write it into rcS or init to download on boot. You can get a tarball hosted somewhere, then wget the tarball, gunzip and move files to the correct folder - you just have to keep the tarball up to date. It does work

        Comment

        • jfish
          DK Veteran
          • Sep 2008
          • 799

          #5
          a very quick and dirty script I have written in a few minutes . obviously will need to do more work to check from existance of file and other error checking.

          Basically the file is downloaded to the tmp folder, and unzipped to the correct folder where the boquets are stored.

          THIS HAS NOT BEEN TESTED

          #/bin/bash
          cd /tmp
          wget "http://somewebsite.com/boquets.tar.gz"
          tar xzf aboquets.tar.gz -C somedir/

          Comment

          • markj113
            Junior Member
            • Sep 2010
            • 26

            #6
            the only problem then would be the regional channels like bbc 1, bbc 2 and itv.

            Unless you stored different versions on the server like an english, welsh and irish one?

            Comment

            • jfish
              DK Veteran
              • Sep 2008
              • 799

              #7
              Originally posted by markj113
              the only problem then would be the regional channels like bbc 1, bbc 2 and itv.

              Unless you stored different versions on the server like an english, welsh and irish one?
              only way is to have some flag file say in the var/etc folder like eng or wel or ir - and the script can parse the file and determine with region you want to download.

              Comment

              • tw87
                Top Poster +
                • Jun 2009
                • 233

                #8
                Glad your asking this mate as I asked on other forums and was told can't be done. Also asked here and was basically flamed because I also asked here as well as the other forum.

                Hope it can be done as your bouquet sets are the best.
                IF YOU THINK MY POST HAS BEEN HELPFUL PLEASE HIT

                Comment

                • jfish
                  DK Veteran
                  • Sep 2008
                  • 799

                  #9
                  I will have time this weekend so develop this script on my Linux machine at home and then run it on my DM500S and see what happens .. will use my internal web server to download from as a test.

                  Comment

                  • SGTFlipFlop
                    V.I.P. Member
                    • Sep 2009
                    • 1002

                    #10
                    Originally posted by jfish
                    I will have time this weekend so develop this script on my Linux machine at home and then run it on my DM500S and see what happens .. will use my internal web server to download from as a test.
                    Much appreciated mate for the work

                    Comment

                    • jfish
                      DK Veteran
                      • Sep 2008
                      • 799

                      #11
                      an update

                      over the weekend the little time I had (I was on call) I did write the script and did some testing and all were successful.

                      just need to clean it up a bit, especially the last stage of reloading the updates channels list ... at the moment the box has to be rebooted.. will post script later on .. but the script downloads from my internal web server so who ever wants to test script will have to modify it to download from an alternative web server.

                      Comment

                      • jfish
                        DK Veteran
                        • Sep 2008
                        • 799

                        #12
                        as promised the script


                        #!/bin/sh
                        # script to download latest channels lists
                        # Tested on Enigma 1 images (DM500s)
                        # Jfish 1 Feb 2011


                        cd /tmp/
                        mkdir bq
                        cd bq
                        wget "http://192.168.1.10/bq.tar.gz"
                        chmod 755 /tmp/bq/bq.tar.gz
                        tar -xzvf bq.tar.gz

                        rm -rf /var/etc/satellites.xml
                        mv /tmp/bq/satellites.xml /var/etc/
                        rm -rf /tmp/bq/satellite.xml

                        cd /var/tuxbox/config/enigma/
                        rm -rf *.tv
                        rm -rf *.radio
                        rm -rf *.epl
                        rm -rf bouquets
                        rm -rf services
                        rm -rf services.locked

                        mv /tmp/bq/* /var/tuxbox/config/enigma/
                        rm -rf /tmp/bq.tar.gz
                        rm -rf /tmp/bq

                        wget -qO - http://root:[email protected]/cgi-bin/reloadSettings
                        wget -qO - http://root:[email protected]/cgi-b...adUserBouquets
                        reboot
                        couple of points

                        The web server 192.168.1.10 is my internal web server, this will need to be changed

                        The above was tested on a DM500S using Pli Jade 3 - should run on other Images - the above script wont run on Enigma 2 images

                        the tar.gz file is named bq.tar.gz. If creating the file on a Windows box use IZArc - create as Zip file first and then convert to a tar.gz file

                        The box gets rebooted at the end of script

                        save script as an sh file (channelreload.sh) and copy it to var/bin (may be different on other images)

                        use cron to schedule this to be executed once a day - I have not tested this as yet

                        to run it say every tuesday at 2am in the morning the cron command is

                        crontab 0 2 * * 2 /var/bin/channelreload.sh

                        The command for cron is

                        # Minute Hour Day of Month Month Day of Week Command

                        so you can change the schedule

                        to check for what is scheduled type crontab -l
                        Last edited by jfish; 6 February, 2011, 01:46.

                        Comment

                        • jfish
                          DK Veteran
                          • Sep 2008
                          • 799

                          #13
                          see attache file

                          by default on the PLi Jade image - cron doesnt start as default, to do so, goto settings, hardware settings and then to services and select cron to start

                          once txt file is downloaded, rename extenstion to sh and upload to DM
                          Attached Files

                          Comment

                          • SGTFlipFlop
                            V.I.P. Member
                            • Sep 2009
                            • 1002

                            #14
                            Had a quick look at it earlier, Does the cron on Pli image need to be started via telnet?

                            Comment

                            • jfish
                              DK Veteran
                              • Sep 2008
                              • 799

                              #15
                              Originally posted by SGTFlipFlop
                              Had a quick look at it earlier, Does the cron on Pli image need to be started via telnet?
                              no you do it thru interface

                              Comment

                              Working...