ShephedProject / shepherd

Shepherd delivers reliable, high-quality Australian TV guide data (EPG).
Other
20 stars 14 forks source link

Discrepancy between output XMLTV file path and mythfilldatabase's path #33

Open kentcb opened 7 months ago

kentcb commented 7 months ago

Hi,

I'm trying to understand why guide data is not updated. I can see that shepherd is successfully creating the output.xmltv file:

$ ls -al /home/shepherd/.shepherd/output.xmltv
-rw-rw-r-- 1 shepherd shepherd 6871855 Jan 20 18:23 /home/shepherd/.shepherd/output.xmltv

However, mythfilldatabase never imports it (even after waiting over a day). The cron job is configured as:

$ whoami
shepherd
$ crontab -l
21 * * * * nice /usr/bin/mythfilldatabase > /dev/null

If I execute mythfilldatabase manually I get:

$ /usr/bin/mythfilldatabase
2024-01-21 11:21:52.121888 C  mythfilldatabase version: master [v34.0~master.202401182304.3ded86daee~ubuntu23.10.1] www.mythtv.org
2024-01-21 11:21:52.121901 C  Qt version: compile: 5.15.10, runtime: 5.15.10
2024-01-21 11:21:52.121940 I  Ubuntu 23.10 (x86_64)
2024-01-21 11:21:52.121942 N  Enabled verbose msgs:  general
2024-01-21 11:21:52.121951 N  Setting Log Level to LOG_INFO
2024-01-21 11:21:52.132248 I  Added logging to the console
2024-01-21 11:21:52.132830 I  Setup Interrupt handler
2024-01-21 11:21:52.132835 I  Setup Terminated handler
2024-01-21 11:21:52.132838 I  Setup Segmentation fault handler
2024-01-21 11:21:52.132841 I  Setup Aborted handler
2024-01-21 11:21:52.132845 I  Setup Floating point exception handler
2024-01-21 11:21:52.132848 I  Setup Illegal instruction handler
2024-01-21 11:21:52.132851 I  Setup Bus error handler
2024-01-21 11:21:52.132859 I  Setup Real-time signal 0 handler
2024-01-21 11:21:52.132864 I  Setup Hangup handler
2024-01-21 11:21:52.133088 N  Using runtime prefix = /usr
2024-01-21 11:21:52.133090 N  Using configuration directory = /home/shepherd/.mythtv
2024-01-21 11:21:52.133286 I  Assumed character encoding: en_US.UTF-8
2024-01-21 11:21:52.133646 I  Empty LocalHostName. This is typical.
2024-01-21 11:21:52.133659 I  Using a profile name of: '30b1d172d44c' (Usually the same as this host's name.)
2024-01-21 11:21:52.133841 I  Start up testing connections. DB mythdatabase, BE , attempt 0, status dbAwake, Delay: 2000
2024-01-21 11:21:53.166760 N  Setting QT default locale to en_AU
2024-01-21 11:21:53.166771 I  Current locale en_AU
2024-01-21 11:21:53.166819 E  No locale defaults file for en_AU, skipping
2024-01-21 11:21:53.168341 I  Loading en_us translation for module mythfrontend
2024-01-21 11:21:53.169924 I  Current MythTV Schema Version (DBSchemaVer): 1379
2024-01-21 11:21:53.172820 I  MythCoreContext::ConnectCommandSocket(): Connecting to backend server: 192.168.10.211:6543 (try 1 of 1)
2024-01-21 11:21:53.173637 I  MythCoreContext::CheckProtoVersion(): Using protocol version 91 BuzzOff
2024-01-21 11:21:53.173892 I  Opening blocking connection to master backend
2024-01-21 11:21:53.174658 I  Updating source #1 (Free-to-air) with grabber tv_grab_au
2024-01-21 11:21:53.175161 I  Found 38 channels for source 1 which use grabber
2024-01-21 11:21:53.175306 I  Starting process manager
2024-01-21 11:21:53.175346 I  Starting process signal handler
2024-01-21 11:21:53.175400 I  Starting IO manager (read)
2024-01-21 11:21:53.175460 I  Starting IO manager (write)
2024-01-21 11:21:53.626223 I  Grabber has capabilities: baseline manualconfig preferredmethod
2024-01-21 11:21:54.076984 I  Grabber prefers method: allatonce
2024-01-21 11:21:54.077848 I  XMLTV config file is: /home/shepherd/.mythtv/Free-to-air.xmltv

Note the final line, which points to a completely different XMLTV file.

Here is my video source as configured in MythTV:

image

So I guess mythfilldatabase is somehow defaulting to using the source's name rather than a default...? In an attempt to find why mythfilldatabase is trying to import from the wrong XMLTV file, I tried:

root@30b1d172d44c:/# find / -type f -exec grep -li 'Free-to-air' {} + 2>/dev/null
/home/shepherd/.shepherd/references/Shepherd/Configure.pm

But the found shepherd script is just responsible for importing data from the Free-to-air source, and when it configures the mythfilldatabase cron job, it does so without any arguments.

So I'm confused. I could probably just manually edit the cron job to explicitly specify the correct file path, but I wanted to understand where things have gone wrong first. Any ideas?

kentcb commented 7 months ago

fwiw, I ended up giving up on swimming upstream and gave up trying to run under a separate shepherd user, instead running under the mythtv user. Worked fine then, but would consider it a nice-to-have to be able to run separately.