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.
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.
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-compose build
to build the applicationdocker-compose.yml
and insert your own personal URLs for retrieving the M3U and EPG files. Run the container: docker-compose up
python3 python3-pip git
via apt
/yum
/whatever package managercd
into the new folder (iptv-filter
by default)pip3 install -r requirements.txt
IPTV_SAFE_START=1 python3 manage.py migrate
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)IPTV_SAFE_START=1 python3 manage.py makemigrations
IPTV_SAFE_START=1 python3 manage.py migrate
apt
/yum
/whatever package managerpip3 install -r requirements.txt
SET IPTV_SAFE_START=1
python manage.py migrate
SET IPTV_SAFE_START=
SET IPTV_M3U_URL="<your_m3u_url>"
SET IPTV_EPG_URL="<your_epg_url>"
python manage.py runserver 0:8000 --noreload
SET IPTV_SAFE_START=1
python manage.py makemigrations
python manage.py migrate
SET IPTV_SAFE_START=
(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.