Difference between revisions of "MythTV Universal Metadata Format"

From MythTV Official Wiki
Jump to: navigation, search
(Replace examples with actual grabber output for accuracy)
m (Movie/Video Jobs)
Line 451: Line 451:
* "Actor"
* "Actor"
* "Guest Star"
* "Author"
* "Author"
* "Producer"
* "Producer"

Revision as of 17:22, 1 June 2010

In order to unify metadata grabbing for all MythTV screens and plugins, the following universal metadata grabber format specification will be used. Metadata grabbing will be handled by common code with relatively little custom code necessary for new plugins. Grabber scripts must conform the the standard, and can otherwise "drop in" to provide metadata lookup for user plugins and core MythTV screens.

Explanation of supported tags

The "Used in" values below only reflect the tags which could be displayed in the plugins today. When writing your grabber script, you should feel free to use any and all tags listed to make data available to future improvements in MythTV.

Tag name Description Used in Video Used in Music Used in Games
metadata All results are encapsulated in <metadata> tags. Metadata tags are the root node. Yes Yes Yes
item Any returned item is encapsulated in an <item> tag. Yes Yes Yes
title A textual title for the item being returned. Yes Yes Yes
subtitle The subtitle on the item being returned. Yes No No
tagline The tagline/catch phrase of the item being returned. Yes No No
description The plot of the item being returned. In music, this is used to contain the lyrics. Yes Yes Yes
season The season number of the item being returned. Yes No No
episode The episode number of the item being returned. Yes No No
dvdseason The DVD season on which the returned item appears. Yes No No
dvdepisode The DVD episode number of the returned item.. Yes No No
albumtitle The title of the album on which this item was released. No Yes No
system The game system for which this item was released. No No Yes
inetref REQUIRED. The reference number/serial number of the item at the metadata source. Used for a detailed lookup. Yes Yes Yes
imdb the IMDB number for the item being returned. Yes No No
tmsref The Tribune Media Services code number for the item being returned (only provided by TheTVDB so far). Yes No No
homepage The homepage of the item being returned.. Yes No No
trailer A web link to the trailer for the returned item. Yes No No
language The two-character (ISO-639) language code of the item. Yes Yes No
releasedate Rhe release date for the returned item in RFC-822 format. Yes Yes No
lastupdated The date and time the item was last updated at the source in RFC-822 format. Yes Yes Yes
userrating A float value of the user rating at the source. Yes Yes No
tracknum The integer track number of the returned item. No Yes No
popularity An integer popularity value for the item. Yes Yes Yes
budget The integer amount spent to produce the returned item. Yes No No
revenue The integer amount earned by the returned item. Yes No No
year The integer year of the returned item. Yes Yes Yes
runtime The runtime of the returned item in minutes. Yes No No
runtimesecs The runtime of the returned item in seconds. No Yes No
certifications Encapsulates <certification> items, this is the parental rating container. Yes Yes No
certification An individual parental rating item, must be contained in a <certifications> tag. Takes two attributes, locale and name. Yes Yes Yes
categories Encapsulates <category> items, this is the genre container. Yes Yes Yes
category An individual genre item, takes attribute name. Yes Yes Yes
countries Encapsulates <country> items, this is the locale container. Yes Yes Yes
country A locale of production for the returned item, takes attribute name. Yes Yes Yes
studios Encapsulates <studio> items, this is the production company container. Yes Yes Yes
studio The production company/publisher of the item, takes attribute name. Yes Yes Yes
people Encapsulates <person> items, this is the role/job container. Yes Yes No
person A person involved with the production of this item, requires attribute job and name, optionally takes character, thumb and url. Yes Yes No
images Encapsulates <image> items, this is the artwork container. Yes Yes Yes
image A binary graphic related to the returned item, requires attribute type and url, optionally takes attribute thumb for a thumbnail. Yes Yes Yes

Query Results

Important.png Note: For consistency between grabbers, please use the following format for your grabber query command line:

./grabbername -M "query phrase"

A query result is nothing more than a series of items filled as completely as you care or are able to fill them. The only caveat is that a query (and by definition, any returned single item) must return an inetref to use in a followup query.

<?xml version='1.0' encoding='UTF-8'?>
    <title>Star Wars: Episode V</title>
    <subtitle>The Empire Strikes Back</subtitle>
      <certification locale="us" name="PG"/>
    <description>While Luke takes advanced Jedi training from Yoda, his friends are relentlessly pursued by Darth Vader as part of his plan to capture Luke.</description>
      <image type="coverart" url="http://i2.themoviedb.org/posters/4a7/4bc9138c017a3c57fe0074a7/star-wars-episode-v-the-empire-strikes-back-original.jpg" thumb="http://i1.themoviedb.org/posters/4a7/4bc9138c017a3c57fe0074a7/star-wars-episode-v-the-empire-strikes-back-cover.jpg"/>
      <image type="fanart" url="http://i1.themoviedb.org/backdrops/494/4bc9138a017a3c57fe007494/star-wars-episode-v-the-empire-strikes-back-original.jpg" thumb="http://i1.themoviedb.org/backdrops/494/4bc9138a017a3c57fe007494/star-wars-episode-v-the-empire-strikes-back-thumb.jpg"/>
    <lastupdated>Wed, 26 May 2010 04:11:22 GMT</lastupdated>
    <title>Star Wars: Episode VI</title>
    <subtitle>Return of the Jedi</subtitle>
      <certification locale="us" name="PG"/>
    <description>After rescuing Han Solo from the palace of Jabba the Hutt, the Rebels attempt to destroy the Second Death Star, while Luke Skywalker tries to bring his father back to the Light Side of the Force.</description>
      <image type="coverart" url="http://i1.themoviedb.org/posters/506/4bc9139e017a3c57fe007506/star-wars-episode-vi-return-of-the-jedi-original.jpg" thumb="http://i2.themoviedb.org/posters/506/4bc9139e017a3c57fe007506/star-wars-episode-vi-return-of-the-jedi-cover.jpg"/>
      <image type="fanart" url="http://i3.themoviedb.org/backdrops/4f8/4bc9139c017a3c57fe0074f8/star-wars-episode-vi-return-of-the-jedi-original.jpg" thumb="http://i3.themoviedb.org/backdrops/4f8/4bc9139c017a3c57fe0074f8/star-wars-episode-vi-return-of-the-jedi-thumb.jpg"/>
    <lastupdated>Sat, 15 May 2010 22:20:40 GMT</lastupdated>

Data Grab Commands

Important.png Note: For consistency between grabbers, please use the following format for your grabber data command line:

Title Search: ./grabbername -D "Inetref"

Television Title And Subtitle Search: ./grabbername -N "title" "subtitle"

Television Season and Episode Search: ./grabbername -D "Inetref" "season number" "episode number"

Movie Example

<?xml version='1.0' encoding='UTF-8'?>
    <title>Star Wars: Episode IV</title>
    <subtitle>A New Hope</subtitle>
    <tagline>A long time ago in a galaxy far, far away...</tagline>
    <description>When Princess Leia is taken prisoner by Darth Vader, she sends her two droids on a mission to find an old Jedi Knight. Their paths cross that of Luke Skywalker who, along with Obi Wan Kenobi, Han Solo and Chewbacca, heads off to Alderaan to deliver the droids to the Rebellion.</description>
      <certification locale="us" name="PG"/>
      <category type="genre" name="Action"/>
      <category type="genre" name="Adventure"/>
      <category type="genre" name="Fantasy"/>
      <category type="genre" name="Science Fiction"/>
      <studio name="Lucasfilm"/>
      <country name="Tunisia"/>
      <country name="United States of America"/>
    <lastupdated>Sat, 29 May 2010 16:18:37 GMT</lastupdated>
      <person name="George Lucas" job="Director" thumb="http://i2.themoviedb.org/profiles/15a/4bccb006017a3c0f2a00015a/george-lucas-thumb.jpg" url="http://www.themoviedb.org/person/1" department="Directing"/>
      <person name="George Lucas" job="Author" thumb="http://i3.themoviedb.org/profiles/15a/4bccb006017a3c0f2a00015a/george-lucas-thumb.jpg" url="http://www.themoviedb.org/person/1" department="Writing"/>
      <person name="Mark Hamill" job="Actor" character="Luke Skywalker" thumb="http://i1.themoviedb.org/profiles/174/4bccaf4c017a3c0f32000174/mark-hamill-thumb.jpg" url="http://www.themoviedb.org/person/2" department="Actors"/>
      <person name="Harrison Ford" job="Actor" character="Han Solo" thumb="http://i3.themoviedb.org/profiles/00a/4bd38e2c017a3c534700000a/harrison-ford-thumb.jpg" url="http://www.themoviedb.org/person/3" department="Actors"/>
      <person name="Carrie Fisher" job="Actor" character="Leia Organa" thumb="http://i2.themoviedb.org/profiles/1a7/4bccb3c4017a3c0f300001a7/carrie-fisher-thumb.jpg" url="http://www.themoviedb.org/person/4" department="Actors"/>
      <person name="Peter Cushing" job="Actor" character="Grand Moff Tarkin" thumb="http://i2.themoviedb.org/profiles/1fe/4bccb56b017a3c0f340001fe/peter-cushing-thumb.jpg" url="http://www.themoviedb.org/person/5" department="Actors"/>
      <person name="Anthony Daniels" job="Actor" character="C-3PO" thumb="http://i3.themoviedb.org/profiles/17a/4bccb612017a3c0f2f00017a/anthony-daniels-thumb.jpg" url="http://www.themoviedb.org/person/6" department="Actors"/>
      <person name="Kenny Baker" job="Actor" character="R2-D2" url="http://www.themoviedb.org/person/130" department="Actors"/>
      <person name="George Lucas" job="Executive Producer" thumb="http://i1.themoviedb.org/profiles/15a/4bccb006017a3c0f2a00015a/george-lucas-thumb.jpg" url="http://www.themoviedb.org/person/1" department="Production"/>
      <person name="Gary Kurtz" job="Producer" url="http://www.themoviedb.org/person/12401" department="Production"/>
      <person name="Rick McCallum" job="Producer" url="http://www.themoviedb.org/person/19801" department="Production"/>
      <person name="Alec Guinness" job="Actor" character="Obi-Wan Kenobi" url="http://www.themoviedb.org/person/12248" department="Actors"/>
      <image type="coverart" thumb="http://i1.themoviedb.org/posters/0a9/4bc90144017a3c57fe0000a9/star-wars-episode-iv-a-new-hope-cover.jpg" url="http://i3.themoviedb.org/posters/0a9/4bc90144017a3c57fe0000a9/star-wars-episode-iv-a-new-hope-original.jpg"/>
      <image type="coverart" thumb="http://i3.themoviedb.org/posters/08b/4bc90140017a3c57fe00008b/star-wars-episode-iv-a-new-hope-cover.jpg" url="http://i2.themoviedb.org/posters/08b/4bc90140017a3c57fe00008b/star-wars-episode-iv-a-new-hope-original.jpg"/>
      <image type="coverart" thumb="http://i3.themoviedb.org/posters/0a4/4bc90144017a3c57fe0000a4/star-wars-episode-iv-a-new-hope-cover.jpg" url="http://i1.themoviedb.org/posters/0a4/4bc90144017a3c57fe0000a4/star-wars-episode-iv-a-new-hope-original.jpg"/>
      <image type="fanart" thumb="http://i3.themoviedb.org/backdrops/06e/4bc9013a017a3c57fe00006e/star-wars-episode-iv-a-new-hope-thumb.jpg" url="http://i2.themoviedb.org/backdrops/06e/4bc9013a017a3c57fe00006e/star-wars-episode-iv-a-new-hope-original.jpg"/>
      <image type="fanart" thumb="http://i1.themoviedb.org/backdrops/062/4bc90139017a3c57fe000062/star-wars-episode-iv-a-new-hope-thumb.jpg" url="http://i3.themoviedb.org/backdrops/062/4bc90139017a3c57fe000062/star-wars-episode-iv-a-new-hope-original.jpg"/>

Music Example

    <title>Break Your Heart</title>
    <description>Now I might not be the worst of the best but you gotta respect my honesty so let me break your heart but I dont think theres anybody as bomb as me so you can take this chance and everybodys gonna be wonderin how you feel you might say this is Ludacris but Taio Cruz tell her how you feel.</description>
        <category type="genre" name="Hip-hop" />
        <category type="genre" name="Pop" />
        <studio name="Island" /> 
        <country name="United Kingdom" /> 
        <country name="United States of America" /> 
    <lastupdated>Tue, 01 Jul 2008 11:37:47 GMT</lastupdated>
        <person name="Taio Cruz" job="Artist" character="" thumb="" url="" />
        <person name="Ludacris" job="Artist" character="" thumb="" url="" />
        <person name="Taio Cruz" job="Album Artist" character="" thumb="" url="" />
        <image type="coverart" thumb="" url="http://upload.wikimedia.org/wikipedia/en/f/fa/Taio_Cruz_Rokstarr.jpg" />

Game Example

    <title>The Secret of Monkey Island</title>
    <description>Aspiring pirate Guybrush Threepwood goes on the adventure of a lifetime.</description>
        <category type="genre" name="Adventure" /> 
        <studio name="Lucasfilm Games" /> 
        <country name="United States of America" /> 
        <image type="coverart" thumb="http://www.mobygames.com/images/covers/small/1080415346-00.jpg" url="http://www.mobygames.com/images/covers/large/1080415346-00.jpg" />
        <image type="fanart" url="http://img528.imageshack.us/img528/8982/14786890je6.jpg" />

Supported jobs

These are the strings to insert for the various jobs/professions. More can be added, but these are the currently supported jobs:

Movie/Video Jobs

  • "Actor"
  • "Guest Star"
  • "Author"
  • "Producer"
  • "Executive Producer"
  • "Director"
  • "Cinematographer"
  • "Composer"
  • "Editor"
  • "Casting"

Music Jobs

  • "Artist"
  • "Album Artist"

Supported image types

General Image Types

  • "Coverart"
  • "Fanart"
  • "Banner"
  • "Screenshot"

Music Image Types

  • "Poster"
  • "Back Cover"
  • "Inside Cover"
  • "CD Image"