[mythtv-commits] mythtv commit: r24960 - in trunk/mythtv by robertm

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Fri Jun 4 21:43:33 UTC 2010


      Author: robertm
        Date: 2010-06-04 21:43:33 +0000 (Fri, 04 Jun 2010)
New Revision: 24960
   Changeset: http://svn.mythtv.org/trac/changeset/24960

Added:

   trunk/mythtv/libs/libmythui/metadatacommon.cpp
   trunk/mythtv/libs/libmythui/metadatacommon.h
   trunk/mythtv/libs/libmythui/metadatadownload.cpp
   trunk/mythtv/libs/libmythui/metadatadownload.h
   trunk/mythtv/libs/libmythui/metadataimagedownload.cpp
   trunk/mythtv/libs/libmythui/metadataimagedownload.h
   trunk/mythtv/programs/scripts/metadata/
   trunk/mythtv/programs/scripts/metadata/Movie/
   trunk/mythtv/programs/scripts/metadata/Television/

Removed:

   trunk/mythtv/programs/scripts/metadata/Movie/allocine.pl
   trunk/mythtv/programs/scripts/metadata/Movie/alpacine.pl
   trunk/mythtv/programs/scripts/metadata/Movie/kinox.pl

Modified:

   trunk/mythtv/libs/libmythui/libmythui.pro
   trunk/mythtv/libs/libmythui/mythuihelper.cpp
   trunk/mythtv/programs/scripts/metadata/Movie/tmdb.py
   trunk/mythtv/programs/scripts/metadata/Television/ttvdb.py
   trunk/mythtv/programs/scripts/scripts.pro

Log:

Add Generic Metadata Classes.  This adds a "universal" method of dealing with video, music, and game metadata to libmythui (where it lives pending my writing an all-purpose online imagery browser).

In short, these classes allow the plugin or frontend developer to easily add metadata lookups for any kind of data to any type of screen.  The workflow is as follows:

1) Create a pointer to a new MetadataLookup object.
2) Use the various "sets" from metadatacommon.h to populate as much information as is necessary to complete a metadata grab. (Title, Subtitle, Season, Episode, TMDB #)
OPTIONAL 2.5) lookup->SetAutomatic(true) to tell the query thread to attempt fuzzy name matching.  By default this matching is quite strict to avoid false positives.
3) Pass the semi-populated lookup object to the MetadataDownload thread.
4) Listen for MetadataLookupEvents, which can pass back a single or list of matching lookups.  If you get multiple lookups, pick the one you want and chuck it back into the queue.
5) When the final lookup arrives, it is a fully populated MetadataLookup object.  Use the "Gets" to pull out all data relevant to your media type.
OPTIONALLY:
6) The lookup returns a map of all available artwork for the item.  Construct another metadatalookup, create a DownloadMap of the artwork you want downloaded, and add it to the MetadataImageDownload thread.
7) Wait for an ImageDownloadEvent, which will return the same downlload map pointing at the local locations of all your requested files.  Supports local and SG image download.

There are a LOT of cool things that this can do, and the above only scratches the surface.  I am sure there are also parts of this that need work and could be cleaner, we'll try to get those ironed out well in advance of .24.

This moves the functional Movie and Television grabbers to trunk/mythtv/programs/scripts/metadata in anticipation of their use in recordings in the very near future.  It also svn del's the secondary grabbers which are no longer functional using this scheme.  If you would like to see support for KinoX, Allocine, or Alpacine returned, please feel free to contact me for help in writing a grabber to conform to the new spec.  Since there is only one choice for each of these grabbers yet, I have not moved the metadata script picker into the core yet.





More information about the mythtv-commits mailing list