A docker implementation of xmltv I created to run on my Synology DS918+ (but it will probably run on any docker host). I use it to update the tv guide on my Plex server.
Follow this guide to create a xmltv docker image on your docker host. The image is used to create and RUN a temporary docker container. When the container run's it will update the xmltv output file and the container will then be trashed. Schedule the docker RUN command on your host daily to update your xmltv.xml file.
10/2-2024 Updated tv_grab_dk_meetv. Fixes problem where the EPG guide in Plex showed the wrong arrings some channels.
3/8-2021
Added support for meetv.dk grabber (tv_grab_dk_meetv) created by Klaus Madsen: https://sourceforge.net/p/xmltvdk/mailman/message/37168487/
These instructions will guide you to build the xmltv docker image and get the xmltv container up and running.
Clone the files in this Github repository to a local folder on your docker host
(in this guide we use: /volume1/docker/xmltv/ on the host)
Open a SSH connection to your docker host
sudo docker image build -t kibuan/xmltv /volume1/docker/xmltv/build
Mounts (MANDATORY)
Mount | Host folder | Example |
---|---|---|
/root/.xmltv | 'Container work-dir' - folder to save your xmltv configuration and cache files on your docker-host | -v '/volume1/docker/xmltv/container:/root/.xmltv' |
/opt/xml | xmltv .xml file output dir on your docker-host | -v '/volume1/docker/xmltv/container:/opt/xml' |
Environment variables (OPTIONAL)
Environment variable | Description | Example |
---|---|---|
OUTPUT_XML_FILENAME | The file name of the xmltv output .xml file (default=-grabber-.xml) | -e 'xmltv.xml' |
XMLTV_GRABBER | The name of the xmltv grabber you want to use (default=tv_grab_eu_xmltvse) | -e 'tv_grab_dk_meetv' |
XMLTV_DAYS | The number of days you want to grab (default=7) | -e '3' |
Use this step to run xmltv configuration script and generate the configuration file.
If you already have a xmltv grabber configuration file in the container 'work-dir' on your host you can skip this.
Create and run temporary container (edit the volume mount):
sudo docker container run --rm -i \
-v '/volume1/docker/xmltv/container:/root/.xmltv' \
kibuan/xmltv
Follow the instructions in the xmltv setup guide. When the container exits you should see the .conf file in your mounted folder on the host.
Setup both the mounts and run the container:
sudo docker container run --rm -i \
-v '/volume1/docker/xmltv/container:/root/.xmltv' \
-v '/volume1/docker/xmltv/container:/opt/xml' \
kibuan/xmltv
When the container exits the .xml file should be ready in the output folder.
Create a bash script on your docker host that runs the container daily to update your xmltv tv guide. Use your docker hosts scheduler to run the script daily.
Example script:
#!/bin/bash
sudo docker container run --rm -i \
-v '/volume1/docker/xmltv/container:/root/.xmltv' \
-v '/volume1/docker/xmltv/container:/opt/xml' \
-e 'XMLTV_DAYS=14' \
kibuan/xmltv
Follow this guide to setup Plex DVR to use your local xmltv.xml file.