Giter Site home page Giter Site logo

iptv-filter's Introduction

iptv-filter

I was sick of trying to parse through 13000+ "Channels" on an IPTV service so I decided to write this and share it. I've never used Django before (and I'm a python beginner) so I'm sure there is improvement available in the codebase.

Concept

This application pulls an m3u file and an epg file and stores their components in a database; users tag the groups they wish to subscribe to within that subset and the app serves up an m3u file on the fly composed of the segments that are included.

Launching iptv-filter

There are two options for running this: Docker, and Plain Python. In both cases you will setting up the prerequisite libraries and initial backing database via the below commands.

Docker

Initialization

  • Run docker-compose build to build the application
  • Edit docker-compose.yml and insert your own personal URLs for retrieving the M3U and EPG files.

Running

Run the container: docker-compose up

Python

Linux

Initialization

  • Install python3 python3-pip git via apt/yum/whatever package manager
  • Clone this repo into a folder
  • cd into the new folder (iptv-filter by default)
  • From the root folder, run pip3 install -r requirements.txt
  • Run IPTV_SAFE_START=1 python3 manage.py migrate

Running

  • export IPTV_M3U_URL="<your_m3u_url>"
  • export IPTV_EPG_URL="<your_epg_url>"
  • python3 manage.py runserver 0:8000 --noreload (this is what ./run.sh does)

Upgrading

  • IPTV_SAFE_START=1 python3 manage.py makemigrations
  • IPTV_SAFE_START=1 python3 manage.py migrate

Windows

Initialization

  • Install python 3 via apt/yum/whatever package manager
  • From the root folder, run pip3 install -r requirements.txt
  • SET IPTV_SAFE_START=1
  • python manage.py migrate
  • SET IPTV_SAFE_START=

Running

  • SET IPTV_M3U_URL="<your_m3u_url>"
  • SET IPTV_EPG_URL="<your_epg_url>"
  • python manage.py runserver 0:8000 --noreload

Upgrading

  • SET IPTV_SAFE_START=1
  • python manage.py makemigrations
  • python manage.py migrate
  • SET IPTV_SAFE_START=

Scheduled retrieval

  • When launched, the application will pull the latest m3u and epg files. Depending on your host this could take over 20 minutes.
  • The logs will indicate when the M3U file and then the EPG file have completed loading
  • Once this is complete, use the API's below.
  • M3U are otherwise scheduled to reload at 4AM every day
  • EPG are scheduled to be loaded on the half-hour, every hour (1:30, 2:30, ...)

API URLs

(Assuming you want to access this from the same box, you'll be using 'localhost' as the URL) The following are the common URLs to use:

These are utility URLs and probably won't be needed.

iptv-filter's People

Contributors

cmcconomy avatar mometto avatar mvanlaar avatar thatsricci avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.