mythtv31 and schedules Direct

For discussion related to MythTV which doesn't belong in another forum.

Moderator: Forum Moderators

Post Reply
jim23434
Newcomer
Posts: 3
Joined: Thu Jul 21, 2016 4:13 pm
United States of America

mythtv31 and schedules Direct

Post by jim23434 » Thu Mar 26, 2020 1:35 pm

First let me state that I love mythtv and have been using it for years. It took awhile to learn to install but was worth the effort. I can't say that about release 31 and how it handles schedules Direct. Another high learning curve for a 74 year old user. Sad to say but how are you going to get a average user to install 31 and SD. Your not.

dseven
Newcomer
Posts: 7
Joined: Thu Mar 26, 2020 11:11 pm
United States of America

Re: mythtv31 and schedules Direct

Post by dseven » Fri Mar 27, 2020 5:57 pm

I agree. I spent a good part of yesterday fumbling around with it, and I consider myself quite technically competent. I did get get it (seemingly) working in the end, with a test installation, but after a lot of confusion and frustration. I'm not yet sure when I'm going to tackle upgrading my "production" instance. I found the wiki page vague and confusing - as if written by someone who understands the inner workings but didn't really consider the typical end-user who doesn't, and there's too much "jumping in and out" (do this in mythtv-setup, then do this using the grabber setup scripts, then ...)

Not complaining - just sharing my observation/agreement.

User avatar
paulh
Developer
Posts: 509
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: mythtv31 and schedules Direct

Post by paulh » Fri Mar 27, 2020 7:13 pm

The wiki by its nature is largely user generated content. If you think it's vague and confusing then help to update it so it's not :D

dseven
Newcomer
Posts: 7
Joined: Thu Mar 26, 2020 11:11 pm
United States of America

Re: mythtv31 and schedules Direct

Post by dseven » Fri Mar 27, 2020 7:38 pm

I may do that.

Is there official documentation on implementing SD with XMLTV, and the transition process from DataDirect, somewhere else, then?

User avatar
paulh
Developer
Posts: 509
Joined: Thu Feb 06, 2014 6:09 pm
Great Britain

Re: mythtv31 and schedules Direct

Post by paulh » Fri Mar 27, 2020 11:09 pm

I'm not aware of any official documentation other than the wiki. If there is one thing devs don't like it's doing documentation so it's left to the users to fill in the gaps :lol: :roll:

I did look to see if I still had the notes from when I had to switch to SD from the RadioTimes grabber when it went defunct but unfortunately it is so long ago it's long since been nuked and I can't remember the details sorry.

We are well aware setting up MythTV needs attention and should be a lot easier. The problem is it's something most of us do once and then forget about it. It should be compulsory for every dev to do a clean setup once a year to remind them how difficult it can be sometimes :twisted:

jim23434
Newcomer
Posts: 3
Joined: Thu Jul 21, 2016 4:13 pm
United States of America

Re: mythtv31 and schedules Direct

Post by jim23434 » Mon Mar 30, 2020 4:34 pm

Thanks for the developers reply on this thread. Like I stated before I think Myth is a great program and much thanks to the developers work.
Resolved my problem by installing myth29 back-end on a unused nuc and after reading about the settings was able to get
schedules direct working on Kodi and Ubuntu 20.04. Temp fix for now, but works.

Thanks again

dseven
Newcomer
Posts: 7
Joined: Thu Mar 26, 2020 11:11 pm
United States of America

Re: mythtv31 and schedules Direct

Post by dseven » Mon Mar 30, 2020 6:06 pm

FWIW, I decided to "take the plunge" yesterday, and upgraded to 0.31. I decided to delete my channels and re-scan, rather than try to edit the existing ones with new XMLTV references. This worked OK, once I got the XMLTV grabber configured properly (I'm using the SQLite variant). I did lose the channel references for all of my past recordings, but I don't really care. No other apparent issues so-far. Will see if new recordings (using existing schedules) work tonight. "Upcoming Recordings" in MythWeb looks right, so I'm hopeful.

ccaudle
Newcomer
Posts: 5
Joined: Tue Jan 03, 2017 12:37 am
United States of America

Re: mythtv31 and schedules Direct

Post by ccaudle » Fri Apr 17, 2020 1:34 am

One thing which is not clear from the wiki is how to handle installations like the rpmfusion build on Fedora. There the mythtvbackend runs under a system user account (mythtv) which does not have a login shell enabled and does not have a home directory.

I ran mythfilldatabase after switching over to the new Schedules Direct format, but from the messages it was using the configuration files in my .mythtv and .xmltv directories. When the backend tries to collect new entries in the future it will not have a configuration file available. The instructions in the wiki seem to assume that the mythbackend is running from a user account with a home directory.

Am I correct in assuming that the first time mythbackend attempts to fill new schedule info on its own the grabber is
either not going to run, or will run and crash out right away because it can't find the configuration file?
I had never paid attention to how the schedule information was collected with older versions, but presumably it was all internal to mythbackend because I do not recall ever having to configure an external program to collect schedule information in the past.

wesnewell
Senior
Posts: 585
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: mythtv31 and schedules Direct

Post by wesnewell » Fri Apr 17, 2020 4:17 am

Just a wag, create a mythtv user account and copy the files there so it can find them.
wes@mythfe0:~$ ls /home/mythtv/.mythtv
3rdParty channels MythBrowser MythNetvision themes
cache config.xml MythMusic sd.xmltv tmp
BE/FE-Asrock AB350 Pro AMD Ryzen 3 2200G, 6 atsc tuners. Frontends-GF8200's,,AMD Athlon II's. Mythtv user since 2005.

dseven
Newcomer
Posts: 7
Joined: Thu Mar 26, 2020 11:11 pm
United States of America

Re: mythtv31 and schedules Direct

Post by dseven » Fri Apr 17, 2020 6:48 pm

ccaudle wrote:
Fri Apr 17, 2020 1:34 am
One thing which is not clear from the wiki is how to handle installations like the rpmfusion build on Fedora. There the mythtvbackend runs under a system user account (mythtv) which does not have a login shell enabled and does not have a home directory.

I ran mythfilldatabase after switching over to the new Schedules Direct format, but from the messages it was using the configuration files in my .mythtv and .xmltv directories. When the backend tries to collect new entries in the future it will not have a configuration file available. The instructions in the wiki seem to assume that the mythbackend is running from a user account with a home directory.

Am I correct in assuming that the first time mythbackend attempts to fill new schedule info on its own the grabber is
either not going to run, or will run and crash out right away because it can't find the configuration file?
I had never paid attention to how the schedule information was collected with older versions, but presumably it was all internal to mythbackend because I do not recall ever having to configure an external program to collect schedule information in the past.
mythfilldatabase should run the xmltv script with args "--config-file <mythtv_config_dir>/<source_name>.xmltv". So long as that is accessible to the user running mythfilldatabase (along with any related files - such as the sqlite DB, if you go that route), I think it should work.

Edit: further - ongoing (daily) updates are handled by a periodic HouseKeeperTask, which runs mythfilldatabase (or at least the equivalent) and should use the same config path

bitspiel
Junior
Posts: 23
Joined: Sat Mar 15, 2014 8:23 am
United States of America

Re: mythtv31 and schedules Direct

Post by bitspiel » Mon Apr 20, 2020 10:02 pm

I built myth31 from source on Fedora 31 have my backend run as a service. Thus after enabling it it will auto start after reboots, power fails, etc. I keep my actual service file on mythtv's home so I remember, years from now (I was on 27 last!), when I next upgrade the magic this file does.

Enjoy!

Code: Select all

[root@optimyth system]# pwd
/usr/lib/systemd/system
[root@optimyth system]# ls -l mythtvbackend.service
lrwxrwxrwx 1 root root 34 Apr  7 00:22 mythtvbackend.service -> /home/mythtv/mythtvbackend.service
[root@optimyth system]# cat mythtvbackend.service
[Unit]
Description=MythTV Backend Service
After=network.target mysqld.service
Wants=httpd.service

[Service]
User=mythtv
Environment=HOME=/home/mythtv
StandardOutput=null
PIDFile=/home/mythtv/mythtvbackend.pid
ExecStart=/usr/local/bin/mythbackend --daemon --logpath /home/mythtv/logs --loglevel debug --pidfile /home/mythtv/mythtvbackend.pid
Type=forking
ExecReload=/bin/kill -HUP $MAINPID
KillSignal=SIGTERM
Restart=always
RestartSec=15

[Install]
WantedBy=multi-user.target
[root@optimyth system]#
Be sure to systemctl enable mythtvbackend

bitspiel
Junior
Posts: 23
Joined: Sat Mar 15, 2014 8:23 am
United States of America

Re: mythtv31 and schedules Direct

Post by bitspiel » Mon Apr 20, 2020 10:04 pm

A not so obvious point I failed to bring up in my previous post is that mythtvbackend.service will run, as I have it configured, as mythtv not root.

User avatar
bill6502
Developer
Posts: 1533
Joined: Fri Feb 07, 2014 5:28 pm
United States of America

Re: mythtv31 and schedules Direct

Post by bill6502 » Tue Apr 21, 2020 9:10 pm

I just commented here: viewtopic.php?f=36&t=3745&p=17980#p17980
regarding the use of MYTHCONFDIR rather than HOME.

Also, side light, please use: systemctl cat mythtv-backend (or any .service/.timer/... .) That way if
there's an override file, it will be printed in addition to the one in lib. Local changes belong in an
override file. That way if the distribution releases a new version of the service, your changes won't
get removed. see systemctl edit. It does the proper placement/permissions/daemon-reload for you.

Post Reply