zgemma iptv !?

Shazza291

Newbie
is it possible to add a iptv "m3u address that ends in ts" to zgemma , as it would be easier having on main box (zgemma) than having to keep switching to a android box to access the m3u iptv channels , cheers.
 
How to automatically download your IPTV M3U file and create/update a bouquet

Post by tommycahir » Thu Nov 24, 2016 12:06 pm

Notes:
  • The python script at the core of this is leveraging the great work done in 2booms m2b plugin which I have reworked to be called from command line
  • This method can not be used if you are also assigning an EPG to the bouquet as it will completely overwrite the stream references which are used to assign epg data.
  • This approach can only be used with one m3u in the /tmp folder.
  • This script does not current support the use of passwords for the m3u file.

# I do not take responsibility for any lost data or damage to your system or device, This is done at your own risk! #


Prerequisites:
  • Enigma2 Box IP Address: To find your IP Address go to Menu-> Setup-> Network-> Device Setup-> Lan Setup (WLan option if that is used)-> Adapter settings
    - Note that if you have DHCP set to Yes then your IP Address may change periodically, if you want a static IP address then you need to change the settings here.
  • Enigma2 Box userID and password: This varies from box to box and image to image so google is your friend here.
  • FTP client: a good commonly used one is filezilla but there are loads out there that will do the job.
    - Filezilla basic user guide
    - Youtube guide on using Filezilla
  • File editor: I personally use PsPad but others recommend Notepad++
  • SSH client: You will need to connect to the server to test your script and change permissions, I personally use Putty available from
    Code:
    http://www.putty.org/

Setting up and configuring the shell script
  • Download the attachment autobouquet.zip
    At the bottom of the post
  • Edit the autobouquet.sh file to point to your m3u file using your xml editor.
    - Note If your IPTV provider uses a username and password in URL to redirect to a download then you need to install CURL and use the 2nd command to get your file. Directions on using this in the .sh file itself
  • Change the parameter for the python script to whatever type of IPTV your provider is using. I have defaulted to Gstreamer here but if that doesn't work then choose another and rerun until one works for you, it must be exactly as per below options.
    - The options available are: LiveStreamerhls or LiveStreamerhlsvariant or Gstreamer or Multicast
  • FTP both of these files to your box to the /usr/script/ folder
  • Set the permissions on the autobouquet.sh file to 755 using your FTP client (right click properties in filezilla) or chmod 755 autobouquet.sh from the SSH command line.
  • If you want to manually run the script to test it then open a SSH connection and change directory using "cd /usr/script/" then run "./autobouquet.sh"

Setting up the automated task to run the script - SSH method
  • Open an SSH session to you enigma2 device.

  • On the command line run the below command to open the crontab

  • crontab -e
  • Once this opens press i to switch to INSERT mode (seen at bottom of the screen)
  • Add the following command to the crontab, this can be done by hitting cntrl +v or retyping.
    - This will run the command to download the m3u file @ 5:30am every day and the output will be stored in the folder specified.
    CODE: SELECT ALL

    30 05 * * * cd /usr/script/ && ./autobouquet.sh
  • Now hit ESC followed by :wq and this will exit the crontab editor and save the entry. (q=quit w=write)
  • To check if the new entry to the cron was successful then run the below and you should see the same detail as you entered
    CODE: SELECT ALL

    crontab -l

Setting up the automated task to run the script - Box GUI method
  • On your box remote go to Menu->Timers->CronTimers
  • In the CronTimers screen click the green button to Add a new timer
  • Set it to run daily and set the desired time for it to run
  • In the command Type choose predefined
  • In the command to run field press right or left until you come to autobouquet.sh
  • Click the green button to save the new timer and now your m3u will be extracted each day and the bouquet will be refreshed also.
  • You should ensure that autostart is set to active also
    file.php



    file.php
 

Attachments

  • autobouquet.zip
    2.1 KB · Views: 90
Back
Top