[mythtv] [PATCH] abstract IMDB queries into external scripts

Tim Harvey tharvey at alumni.calpoly.edu
Thu Jan 29 02:33:37 EST 2004


Ok, here's my followup patch:

Installation:

   I still can't figure out how to include 'new' files in a patch.  The
suggestions posted in this thread did not work for me (cvs add fails,
and hacking my local dir to 'think' there is a CVS entry just tells me
it can't find the prev rev in CVS to diff against).  Therefore you'll
have to extract the contents of the 'scripts.tgz' in the
mythvideo/mythvideo directory.  The Makefile will be looking for files
in that directory.  Apparently my last patch had something wrong with
the binary I uploaded (last byte was left off!?).  I'm not sure what
caused this, but please let me know if there is something wrong with
this one as well.

This patch does the following:

   - Implements settings in 'Video Settings->General Settings' setup
dialog related to external movie lookups
   - Abstracts movie lookups into external commands
       - If external command does not exist, cannot be executed, or
produces stderr, the user is notified with a popup. 
   - Provides a default movie lookup perl script for IMDB lookups
   - Adjusts the area of the 'rating' text in the VideoManager's info
dialog so that it shouldn't overun the 'Parental Level' label
   - Adjusts the area height of the keyslbl_one/two/three text items so
that they are not cutoff 
   - Adds some verbose debugging to VideoManager (mythfrontend -v)
   - Fixes a minor memory leak (deletes 'op' when copying poster)     
   - Adds some error checking/timeout detection to the poster file copy
operation

Notes:

I believe I have made the 'imdb.pl' script fairly robust for IMDB
lookups.  For my (rather large) collection of movies, I get a single
match for about 50% of my movies, and a very small list with typically
the one I'm looking for listed first, for the rest.  One helpful hint
here is to make sure that your filenames reflect the exact name of the
movie.  Any comments included in your filename (year, Disk#, etc) should
be at the end of the filename and enclosed in '[]'s or '()'s as this
data will not be included in the query.

There are several query options that IMDB supports (although many of
them I tested seemed to be broken so I patched up the script to fix
them).  The default cmdline parms for the script (modify to your liking
via 'Setup->Video Settings->General->Video Manager') will ignore any
non-movies (ie: video games, videos, TV programs).

The imdb.pl script also supports parsing and returning to VideoManager
the movie 'writer' and 'cast' (list of actors).  This data currently is
just ignored by VideoManager.  I'll probably submit a followup patch in
the near future that supports this data in the database.

Tim

> -----Original Message-----
> From: mythtv-dev-bounces at mythtv.org
[mailto:mythtv-dev-bounces at mythtv.org]
> On Behalf Of Isaac Richards
> Sent: Thursday, January 22, 2004 9:37 PM
> To: Development of mythtv
> Subject: Re: [mythtv] [PATCH] abstract IMDB queries into external
scripts
> 
> On Thursday 22 January 2004 02:34 am, Tim Harvey wrote:
> > Any feedback on this?  I'm waiting to see if its generally liked
before
> > I enhance the IMDB queries in the perl script.  If there are not any
> > complaints I think this should get into CVS so that next time it
breaks
> > it can be fixed quicker/easier.
> 
> It looks essentially fine to me, though I'd like to have some feedback
in
> case
> of an error (couldn't run the script, for instance) to the user before
I
> check it in.
> 
> As for using the IMDB::Movie perl module, well, it'd be nice not to
> introduce
> any more dependencies.
> 
> Isaac
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythvideo_path.tgz
Type: application/x-compressed
Size: 15289 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20040128/a47db17f/mythvideo_path-0001.bin


More information about the mythtv-dev mailing list