[mythtv] Mythfilldatabase and Shepherd (tv_grab_au)
mythtv at maxbarry.com
Wed Jul 20 00:25:47 UTC 2011
stuart at tase wrote:
> On Tuesday 19 Jul 2011 11:42:00 Max Barry wrote:
>> That wouldn't be ideal for us since we're not the datasource; we don't
>> have any special knowledge about when would be a good time to run. We
>> just don't want everybody piling on to a particular source at once. Changing
>> the default MFDB window to 0/23 would be simpler and better
>> from our point of view.
> I assumed that this is in effect already what the scripts you use do, or do you
> just ask users to setup the cron job at a random time?
During installation, Shepherd creates a cron job for the user, which by
default looks like this:
21 * * * * nice /usr/bin/mythfilldatabase > /dev/null
The "21" above is randomized.
Until yesterday, we used --graboptions to send a '--daily' flag to
Shepherd, but we've removed that, since --graboptions is no longer
> The time you feed back
> to MythTV doesn't have to be provided by the data source, it could just come
> from the grabber which generates a relatively random time ~24 from the last
> The way this would be implemented in xmltv would be through the --capabilities
> API - http://wiki.xmltv.org/index.php/XmltvCapabilities. A new
> 'suggestnextrun' capability for example.
Would that override the MFDB valid window? I.e. if a user has a default
install, with a valid window of 2-5am, and Shepherd responds with some
--capabilities flag that says, "Run at 6:32am," which would take
precedence? Either way may have problems.
> The ultimate aim here is to simplify things for the end-user so that all xmltv
> grabbers can operate in exactly the same way and with minimal configuration.
> For most xmltv grabbers this means simply by selecting them from a list of
> available grabbers in mythtv-setup and selecting which channels to grab data
> for. This is also cross-platform, it should work the same way on Windows, BSD
> and OSX.
Right, and we certainly tried to do this, but couldn't find a way to
work with mythtv-setup that wasn't filled with gotchas for users.
Matching grabber XMLTV IDs to MythTV channels, for example, was a common
source of anguish: users had to scan channels, then select a grabber,
configure channels there, and carefully copy each channel's XMLTV ID
back into the appropriate place in MythTV.
I just had a quick browse of the MythTV wiki, to see whether things have
changed, but it seems not. (Please correct me if I'm wrong!) The UK
grabber's installation instructions, for example, include this:
... which is exactly what we used to ask our users to do. I also see
they advise users NOT to run the grabber config from within
mythtv-setup: we encountered a few problems with that, too.
We ended up automating the installation process to remove error-prone
gotchas such as setting up symlinks, matching XMLTV IDs, and modifying
scheduling. It's a little brittle, because it relies upon certain fields
in the MythTV DB (like MythFillEnabled) not changing, but it has made
life a lot easier for us and our users.
More information about the mythtv-dev