This project provides a Docker container that automatically fetches TV schedule data from Schedules Direct on a schedule, converts it to XMLTV format, and serves it via HTTP for use with various home media applications.
This is particularly useful to connect Schedules Direct with Threadfin
- Automatically fetches TV listings from Schedules Direct
- Converts listings to XMLTV format compatible with media center software
- Serves the XMLTV file via HTTP
- Periodically updates the listings data
- Runs in a Docker container for simple deployment
Copy the docker-compose.yaml
file from this project and deploy it using your favorite docker deployment software (such as Dockge, Portainer, or just docker compose up -d
)
Set the environment variables for your setup as described below.
- Docker and Docker Compose
- Schedules Direct subscription (username and password)
-
Clone this repository:
git clone https://github.com/johnpc/schedules-direct-update-and-serve.git cd schedules-direct-update-and-serve
-
Create a
.env
file with your Schedules Direct credentials:SCHEDULES_DIRECT_USERNAME=your_username SCHEDULES_DIRECT_PASSWORD=your_password
-
Start the container:
docker-compose up -d
The service can be configured with custom lineups using the SD_LINEUPS
environment variable. By default, it includes:
- USA-0000001-CUSTOM
- USA-DITV505-X
- USA-MI21464-X
- USA-YOUTUBE-X
You can modify these lineups by setting the SD_LINEUPS
environment variable in your docker-compose.yaml file:
environment:
- SD_LINEUPS=USA-0000001-CUSTOM,USA-DITV505-X,USA-MI21464-X,USA-YOUTUBE-X
Multiple lineups should be separated by commas.
Once running, the XMLTV file is available at:
http://your-server-ip:51969/tvxml.xml
You can use this URL in your media center software (such as Threadfin, Plex, Emby, Jellyfin, TVHeadend, etc.) as the source for your TV guide data.
- The container runs a cron job that regularly updates the TV listings data
tv_grab_zz_sdjson
tool fetches data from Schedules Direct in JSON format- The data is converted to XMLTV format
- Nginx serves the XMLTV file via HTTP on port 51969
Variable | Description |
---|---|
SCHEDULES_DIRECT_USERNAME | Your Schedules Direct username |
SCHEDULES_DIRECT_PASSWORD | Your Schedules Direct password |
SD_LINEUPS | Comma-separated list of lineups to fetch (default: USA-0000001-CUSTOM,USA-DITV505-X,USA-MI21464-X,USA-YOUTUBE-X) |
TZ | Timezone (default: UTC. Since it runs every day at midnight, choose a TZ where that is the time you want it to run.) |
The Docker Compose configuration creates a volume named xmltv_data
to store the fetched data, ensuring it persists between container restarts.
This project uses the tv_grab_zz_sdjson
tool to interact with the Schedules Direct API.