[mythtv-users] Populating the .xmltv file for my grabber from mythtv database?

David Watkins watkinshome at gmail.com
Tue May 4 16:55:32 UTC 2021


On Sun, 2 May 2021 at 14:55, Larry Kennedy <lunchtimelarry at gmail.com> wrote:

> I am just now attempting the upgrade to version 31, and the cutover from
> DD to XMLTV.
>
> I successfully configured the sqlite grabber to pull from SD, and noticed
> that it downloaded all of the channels on my SD lineup, even though most
> are not selected.  I guess this is intended behavior?
>
> Seeing how tedious it is to mark channels as "selected" in the Sqlite
> database, I came up with a slightly different way to transfer the channels
> I currently care about.
>
> I run this query in my existing mythconverg database:
>
> SELECT CONCAT('update channels set selected = 1 where channum = ', channum
> ,";") AS combined FROM channel where visible=1
>
> Pipe this output to a file named selected.sql which creates the sqlite
> update statements to set the correct channels to "selected" in the new
> grabber database to match what you now have as visible channels in mythtv.
>
> Then, just use the grabber tool to make all the channels as "not selected"
> by default, and then pipe the file from above into the sqlite query as seen
> on the xmltv wiki:
>
> sqlite3 $HOME/.xmltv/SchedulesDirect.DB < selected.sql
>
> This seems simpler than some of the other methods I've seen on the wiki
> and elsewhere...
>
> Moving on....I need some advice before I go past the rubicon on this v31 +
> xmltv upgrade:
>
> After I do the 31 upgrade, and since I only use an HDHR, I plan to just
> blow away my channels and repopulate.  I think all the channel ids will
> line up the same as before.
>
> Currently, in v30, I run mythfilldatabase as a cron job.  Should I
> continue to do that, or switch to another method?  I've never let mythtv
> natively run the mythfilldatabase process.  I'm having a hard time
> following the intent of the setup-video-sources wiki page on this topic.
> Advice appreciated!
>
> Thanks,
> Larry
>
>
I have a combined BE/FE which shuts down when not being used and wakes up
for recordings.  I run this script from crondaily and it seems to work out
OK.

#!/usr/bin/bash
/usr/local/bin/mythshutdown --lock

tv_grab_zz_sdjson --days 10 --config-file ~/.xmltv/tv_grab_zz_sdjson.conf
--output ~/sd_listing.xml 2>/dev/null

/usr/local/bin/mythfilldatabase --only-update-guide --max-days 10 --file
--sourceid 2 --xmlfile ~/sd_listing.xml 2>/dev/null

/usr/local/bin/mythshutdown --unlock

It's not an ideal solution because I have a low powered ION motherboard
with only 4GB RAM and  this more or less guarantees that MFD will run while
a recording is in progress when I'd prefer to ensure it ran when the box
wasn't recording.  Also, if  I ever go more than 10 days without a
scheduled recording the whole thing will come to a stop because it will run
out of guide data and never wake up to load any more.  In practice neither
of those things causes a problem.


Although SD returns 18 days of guide data I've found that many channels
just have 'boilerplate'  programme information after 10 days or so, so I
limit both SD and MFD to 10.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20210504/17cb06ea/attachment.htm>


More information about the mythtv-users mailing list