[RELEASE] Docker image of Shepherd xmltv downloader for Australia

https://hub.docker.com/r/jtalikka/shepherddownloader

Docker image which contains an Alpine Linux environment customised to run the Shepherd xmltv downloader script for Australian TV.

Read more about Shepherd at https://github.com/ShephedProject/shepherd/wiki

Instructions for use at the docker hub page, also works under Docker for Windows (see the instructions attached) .Install docker for windows.zip (177.2 KB)

3 Likes

Hi, thanks for the work in putting together this shepherd docker.
I’m interested in running this docker on my unRaid server. Not sure if you’re familiar with it, but unRaid uses templates to setup Docker containers parameters etc.
I am able to install the shepherd docker on my unRaid server, but I am unable to configure or edit the container - I’m pretty sure this is because the variables/associations are incorrect for my setup.
Do you have any experience with unRaid and it’s docker template system? Or any ideas how I can convert across the appropriate shepherd docker configs?

Here is the command output from my shepherd docker config if it helps:

root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name=‘shepherd’ --net=‘bridge’ -e TZ=“Australia/Sydney” -e HOST_OS=“Unraid” -p ‘8085:8085/tcp’ -v ‘/mnt/user/appdata/shepherd’:’/var/shepherd_home/.shepherd’:‘rw’ ‘jtalikka/shepherddownloader’ d3aeee7a6984a48c6cf931ac856c6efea1a52bec2a90ece002a23e77383f71c2

Cheers,
Rich

I don’t have any experience with unRaid, but we need some way to open an interactive console to the container so the Shepherd configuration script can run. Do you have command line access to the system, and can you run docker commands that way?

based on this forum post ( How to use a command line command for a Docker - Docker Engine - Unraid ) it should be possible to telnet in to the machine, and then you could run:

docker run -it --name shepherd -e “TZ=Australia/Canberra” -v “/mnt/user/appdata/shepherd:/var/shepherd_home/.shepherd” jtalikka/shepherddownloader

Thanks for the quick reply

Yeah, I tried to bash into the container (there is actually already a console/terminal link pre-configured in unRaid as part of the install) but I get the following error

Error response from daemon: Container d5c1c28944201492259495c92f6aa870430222214150c771b3d6a99709eb6b18 is not running

then after about 10 sec the connection is closed.

I’m pretty sure it is an issue with the container interface not being properly configured (by me!) to see all the container contents (if that makes sense). On the rare occasion I do get a command prompt in the console window, if I enter the “perl shepherd” command to start the program, I get the following error:

Can't locate LWP/Protocol/http.pm in @INC (you may need to install the LWP::Protocol::http module) (@INC contains: references /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at shepherd line 5308.
BEGIN failed--compilation aborted at shepherd line 5308.

I fear this may be beyond my expertise level and/or unRaid is not really intended for this purpose.

Cheers,
Rich

@jani.talikka perfect! Thanks.

I’ve noticed that the docker stops automatically after running, which is a good idea. How do I reconfigure it? I need to update the icons -> which icon “service” do you recommend?

to reconfigure it, just run the interactive shell:

docker rm shepherd && docker run -it --name shepherd -e “TZ=Australia/Canberra” -v “/home/user/docker/shepherd:/var/shepherd_home/.shepherd” jtalikka/shepherddownloader /bin/bash

and then run any of the shepherd commands:

./shepherd --help

to get the list of possible commands

./shepherd --configure

to re-set up channels etc, or ( @rich110 could you run the --check and post me the output, there seems to be some component missing for you which isn’t happening on my version)

./shepherd --check

to check if all the components seem to be working

At the moment the abc_website scraper is failing for me which is a shame, as it had the best data for the abc channels. If the issue is with the scraper Shepherd will automatically update itself when the issue is resolved by the Shepherd maintainers.

@markcs unfortunately I haven’t worked out how to get the icons working for plex yet, the icon feature in Shepherd is written for MythTV, but adding links to the xmltv file to the channel icons would give the icons to Plex. The MythTV icon feature downloads the icons and then installs them in the MythTV database, so the code is completely different to what we need.

Thanks - I am giving this a go in Docker for OS X. Not sure if this will be an issue for me, as I answered yes to symlinks by mistake
 although seems to be grabbing shows slowly.

At this stage I can only see the output.xmltv file (0 bytes), I assume the merged.xmltv will come later on - > 4hrs?

After the initial setup is completed, does this auto run in the docker for new grabs & updates?

@ncsa, the output.xmltv file should fill up when the first run finishes. The container stops when the Shepherd run is finished, so you’ll need to schedule the container to start every so often (the instructions show how to set up a cron job in linux to run the container every hour - so three times it will just exit after checking for component updates, the fourth time it will do a partial or full update).

I think in OS X it should just be a matter of running the crontab command like in the linux instructions ( Scheduling Commands With Cron On Your Mac - Onyx Mueller implies that it should all just work ), so just add the following line to your crontab:

1 * * * * docker start shepherd > /dev/null

ok thanks - the first run went well and for now will run it manually from the Kitematic tool.

Sorry for the late reply

Unfortunately, it still doesn’t work. There is something really wrong with the way/location the docker installs on unRaid. The behaviour is really erratic too, sometimes the bash console for the container shows a prompt and other times (most of the time) it has the above listed daemon error. Regardless though, the console connection usually closes within about 10sec. On the rare occasion I can enter the commands you listed (e.g. --check) I get an error saying another instance of the docker is already running.

Either way, I’ve installed shepherd as a docker on my Win10 laptop - not really ideal as the laptop (unlike the server) is not on 24/7 so I have to give some thought to the grabbing schedule.

Two questions


  1. Is there a way to choose the download location of the xmltv file shepherd creates from the grab? In particular, can I save the output directly to my network plex folder to avoid having to make a Windows scheduled task to copy the file over?
  2. Can I config shepherd to rename the created ‘output.xmltv’ to something different (e.g. VIC_Melb.xml)?

Thanks in advance,
Rich

I wrote this to create an xmltv file from Freeview. It relies on the data from Freeview and is a simple Perl script

2 Likes

Working a treat on my Synology NAS with docker and a scheduled task, thanks!!!

Is there anyway to get the icons for the channels? I notice you explicitly state to enter “no” when running through the initial setup, is there a reason for this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.