Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Exclude unwanted channels based on group and generate a new M3U file with proxied streams and attributes. Streams get proxied through a webserver running on the app. Xtream support.

License

NotificationsYou must be signed in to change notification settings

alex-ahl/iptv-handler

Repository files navigation

Exclude unwanted channels based on group and generate a new M3U file with proxied streams and attributes. Updates the playlist on specified hourly frequency. Streams get proxied through a webserver running on the app. Support for XtreamCodes.

Setup

General

Get the generated .m3u file at/m3u

Settable environment variables

VariableDefaultRequiredTypeDescription
DATABASE_URL-YesstringConnection string to DB
M3U-YesstringURL to the M3U playlist (.m3u)
INIT_APPtrueNobooleanInitialize app with M3U playlist from environment variable.
HOURLY_UPDATE_FREQUENCY12NonumberFrequency of provider playlist update in hours
GROUP_EXCLUDES-NostringA comma separated list of groups to exclude from the final playlist. Case-insensitive.
PROXY_DOMAIN-YesstringDomain on which the app is running - to proxy m3u requests. (Example: localhost:3000)
ENVDevelopmentNostringSet environment Development or Production.
PORT3001NonumberPort to run on (Default 3001)
RUST_LOGinfoYesstringLog level (warn,server=warn,iptv=info,api=warn rest-client=warn)
XTREAM_ENABLEDfalseNobooleanEnable Xtream
XTREAM_BASE_DOMAIN-NostringXtream provider base domain
XTREAM_USERNAME-NostringXtream provider username
XTREAM_PASSWORD-NostringXtream provider username
XTREAM_PROXIED_USERNAME-NostringProxied Xtream username
XTREAM_PROXIED_PASSWORD-NostringProxied Xtream password

Development

Set required environment variables in and.env file and then rundocker-compose up.

This will fire up a MariaDB container instance and create a new DB.Which in turn will create tables and basic data using sql files in theserver -> db -> migrations folder.

Production

To build and run a production docker image.

In src/server folder:docker build -t image:tag .

Create an external docker network with the namedb and run your mariadb/mysql database there.

Example of productiondocker-compose.yml

version: '3.7'services:  iptvhandler:    image: iptv-handler    tty: true # color terminal output    ports:      - "3001:3001"    restart: always    environment:      DATABASE_URL: mysql://username:password@db:3306/iptvhandler      M3U: http://iptvprovider.tv:1234/get.php?username=username&password=password&type=m3u_plus&output=ts      RUST_LOG: warn,server=info,iptv=debug      HOURLY_UPDATE_FREQUENCY: 4      GROUP_EXCLUDES: Music,Country,Cou      PROXY_DOMAIN: myproxydomain.lan      ENV: production      XTREAM_ENABLE: "true"      XTREAM_BASE_DOMAIN: iptvprovider.tv      XTREAM_USERNAME: username      XTREAM_PASSWORD: password      XTREAM_PROXIED_USERNAME: my_new_username      XTREAM_PROXIED_PASSWORD: my_new_password    networks:      - dbnetworks:  db:    external: true

DB

SQLX requirements for static type checking:

  • Needs to be named DATABASE_URL
  • Unfortunately have to have a common connection string for both docker container and host. Since IDE is running from host it needs access to db...
  • DATABASE_URL needs to be in .env file to work. Env variable in docker-compose does not work.
  • Add 127.0.0.1 host.docker.internal to your hosts file if docker hasn't done that for you

Example:DATABASE_URL="mysql://db:db@host.docker.internal:3306/iptvhandler"

About

Exclude unwanted channels based on group and generate a new M3U file with proxied streams and attributes. Streams get proxied through a webserver running on the app. Xtream support.

Topics

Resources

License

Stars

Watchers

Forks

Languages


[8]ページ先頭

©2009-2025 Movatter.jp