[mythtv] New thetvdb.com query engine (grabber)

Robert McNamara robert.mcnamara at gmail.com
Mon Feb 9 01:45:35 UTC 2009

On Sun, Feb 8, 2009 at 4:16 PM, Jean-Yves Avenard <jyavenard at gmail.com> wrote:
> Hi
> 2009/2/9 Robert McNamara <robert.mcnamara at gmail.com>:
>> If you are curious about the structure, why not just look at the
>> script?  His ticket uses identical command line switches as the
>> existing tmdb.pl (and former imdb.pl) script, making it a drop-in
>> replacement for MythVideo's UI grabber.
> Completely irrelevant the command line switches a program use. They
> all use the same anyway (-M, -D etc..)

They were two separate thoughts.  ie, if you are curious about the
structure, why not look at the script? Then, as a followup, I
explained to you what Doug's script was and how it worked.  See below
for why I did this (as the information is presented in a fashion that
makes sense for a script called by the UI, not for the batch update

> I was more referring to the internals so the new grabber could be a
> drop-in replacement to say imdbpy.py
> That's a beauty of python , provided of course they use the same classes.

I'm aware of how Python works.  And had you looked at the script, you
would have seen that it would not be a drop in replacement for
imdbpy.py.  I have already explained what it *is* a drop-in
replacement for.

>> This is very useful for future functionality which will allow multiple grabbers within the UI.
>>  Hads has already posted his command line batch updater for TMDB and
>> TTVDB, which may be more like what you would like.  Doug's submission
> Yes, but Hads re-did the whole lot of what find_meta.py already did.
> What I'm suggesting is that we keep the same function/class structure
> as the existing imdbpy that way you only need one command line batch
> program which can work with different grabber.

So why not look at the script?  Then you would *know* the answer to
your query-- and if it's *not* the same class structure (and it's
not), then would you like him to re implement it for your purpose?  I
assume not.

>> is much more helpful for every day myth use as it is a direct parallel
>> to the "real" script used in the UI.  When multiple grabbers are
>> allowed and assignable within the UI, Doug's script will be perfect
>> for the purpose.
> Except that as I've mentioned earlier, as it currently ism the command
> line batch program can't do the same job as the mythvideo UI: that is
> filling the genres, cast and country of origin ; because the existing
> mythtv perl and python binding don't provide this interface.
> You would have to manually modify the mysql database..
> Imagine the hassle of ongoing support if each grabber has to manually
> work on mysql

And as I mentioned earlier, the script isn't *for* direct usage at the
command line.  It doesn't even use the Myth python bindings (nor does
it need to).  Which as I implied, you would know if you had looked at
the script.  Had you done so (and if you had known about how the UI
calls external grabber scripts in MythVideo) then you would know they
do not access the DB *at all*.  They just dump text or links that
MythVideo itself then handles the insertion/download of.

>> In my opinion, it is wasted effort to keep reinventing the wheel with
>> batch-update scripts and cron'ed jobs.  If you want to contribute
> Which is exactly what I'm trying to suggest: stop re-inventing the
> wheel with multiple grabbers and batch-update script...
> I'm all for one batch-update script , multiple grabber

Except a batch update script isn't relevant to most people more than
once when they first start with myth.  Doug's script *is* relevant on
an everyday basis as it's usable by the UI.  Which is exactly what I
apparently wasted my time explaining to you.  The script *doesn't use
the bindings*, it merely formats the information in the way that the
mythvideo metadata handling stuff expects it and dumps it.

>> directly to the "official" functionality, I suggest pinging Anduin for
>> where he would like to see the grabber functionality *in the UI*
>> going.  I know he has been putting in a lot of work lately on
>> generalizing metadata download for exactly this purpose.  In my
>> opinion the sooner generalized metadata download, multiple grabber
>> scripts, and directory preferences for grabbers are implemented, the
>> sooner such scripts become irrelevant.  So why not "measure twice, cut
>> once" as my mother would say?  If not, I'm perfectly happy to have
> So am I... my aim here is purely to minimise redundancy..

A batch grabber has limited application-- it can apply to people who
are first starting with MythTV *exactly once*, and it can help people
who are pirating file squirrels.  As you have been told before, Myth
won't change to service those who are stealing media (the people who
would need to regularly batch process large numbers of files).  And,
as I explained above, taking the longer road of working towards
multiple grabbers in the UI + automatic scanning + directory
preferences renders the need for command line batch processors null
anyway.  Sure, it may take a bit longer, but it's contributing to real
myth development rather than a new hack to replace the old hack.  It's
also doing things the "right way" and negating the need for continued
reinvention of the wheel.

So again, why not ping the MythVideo maintainer for how he sees this
occurring in the UI itself, then figuring out how we can all
collaborate on getting myth there?  I have done/will do my part, why
don't we agree to abstain from hacks for a bit and see if we can get
the job done right?


More information about the mythtv-dev mailing list