Difference between revisions of "MythVideo Grabber Script Format"
Iamlindoro (talk | contribs) |
Iamlindoro (talk | contribs) (→Valid Key:Data Pairs) |
||
Line 97: | Line 97: | ||
|- | |- | ||
| style="background:silver" | '''Subtitle''' | | style="background:silver" | '''Subtitle''' | ||
− | + | | The subtitle of the film or program. | |
| Text | | Text | ||
|- | |- | ||
| style="background:silver" | '''Year''' | | style="background:silver" | '''Year''' | ||
− | + | | The release or transmission date of the film or program. | |
| Integer Value | | Integer Value | ||
|- | |- | ||
| style="background:silver" | '''Director''' | | style="background:silver" | '''Director''' | ||
− | + | | The Director of the queried item. | |
| Text | | Text | ||
|- | |- | ||
| style="background:silver" | '''Plot''' | | style="background:silver" | '''Plot''' | ||
− | + | | The Plot/Description of the queried item. | |
| Text | | Text | ||
|- | |- | ||
| style="background:silver" | '''UserRating''' | | style="background:silver" | '''UserRating''' | ||
− | + | | The rating of the item by the data source's users. | |
| Floating Point number 0-10.0 | | Floating Point number 0-10.0 | ||
|- | |- | ||
| style="background:silver" | '''MovieRating''' | | style="background:silver" | '''MovieRating''' | ||
− | + | | The classification/Film Rating of the item (eg G, PG, PG-13, R) | |
| Text | | Text | ||
|- | |- | ||
| style="background:silver" | '''Runtime''' | | style="background:silver" | '''Runtime''' | ||
− | + | | The playing time of the item. | |
| Integer | | Integer | ||
|- | |- | ||
| style="background:silver" | '''Season''' | | style="background:silver" | '''Season''' | ||
− | + | | The Season of the item. | |
| Integer | | Integer | ||
|- | |- | ||
| style="background:silver" | '''Episode''' | | style="background:silver" | '''Episode''' | ||
− | + | | The episode number of the item. | |
| Integer | | Integer | ||
|- | |- | ||
| style="background:silver" | '''Coverart''' | | style="background:silver" | '''Coverart''' | ||
− | + | | The Coverart/Poster download URLs for the item. Multiple values can be returned, and should be separated by commas. | |
| comma-separated URLs | | comma-separated URLs | ||
|- | |- | ||
| style="background:silver" | '''Fanart''' | | style="background:silver" | '''Fanart''' | ||
− | + | | The Fanart download URLs for the item. Multiple values can be returned, and should be separated by commas. | |
| comma-separated URLs | | comma-separated URLs | ||
|- | |- | ||
| style="background:silver" | '''Banner''' | | style="background:silver" | '''Banner''' | ||
− | + | | The Banner download URLs for the item. Multiple values can be returned, and should be separated by commas. | |
| comma-separated URLs | | comma-separated URLs | ||
|- | |- | ||
| style="background:silver" | '''Screenshot''' | | style="background:silver" | '''Screenshot''' | ||
− | + | | The Screenshot download URLs for the item. Multiple values can be returned, and should be separated by commas. | |
| comma-separated URLs | | comma-separated URLs | ||
+ | |- | ||
+ | | style="background:silver" | '''Cast''' | ||
+ | | The Cast for the item. Multiple values can be returned, and should be separated by commas. | ||
+ | | comma-separated text | ||
+ | |- | ||
+ | | style="background:silver" | '''Genres''' | ||
+ | | The Genres for the item. Multiple values can be returned, and should be separated by commas. | ||
+ | | comma-separated text | ||
+ | |- | ||
+ | | style="background:silver" | '''Countries''' | ||
+ | | The production countries for the item. Multiple values can be returned, and should be separated by commas. | ||
+ | | comma-separated text | ||
|} | |} |
Revision as of 17:46, 28 October 2009
MythVideo grabber scripts are small executable perl, python, or binary applications which query online sources of metadata and return it in a format parseable by MythVideo. This page documents the current format required of the grabber scripts to function.
The Search Command
All scripts must provide a search command, which takes a title as an argument and return a list of possible results. The results must be one per line, in the format:
Command Format | SCRIPTNAME -ARGS TITLE |
Command Example | ./tmdb.pl -M "Harry" |
Response Format | INETREF:TITLE |
Response Example | 0241527:Harry Potter And The Philosopher's Stone (2001) 0304141:Harry Potter And The Prisoner Of Azkaban (2004) 0373889:Harry Potter and the Order of the Phoenix (2007) 0295297:Harry Potter And The Chamber Of Secrets (2002) 0330373:Harry Potter And The Goblet Of Fire (2005) 0216800:Harry, un ami qui vous veut du bien (2000) 0329028:Dumb and Dumberer: When Harry Met Lloyd (2003) 0118954:Deconstructing Harry (1997) 0066999:Dirty Harry (1971) 0098645:Who's Harry Crumb? (1989) 0098635:When Harry Met Sally... (1989) 0093148:Harry and the Hendersons (1987) 1201607:Harry Potter and the Deathly Hallows: Part II (2011) 0926084:Harry Potter and the Deathly Hallows: Part I (2010) 0417741:Harry Potter and the Half-Blood Prince (2009) 0048750:The Trouble with Harry (1955) |
Inetref is a number like an IMDB, TMDB, or TVDB number. It is a unique serial ID that identifies that film to the data source's API.
The Data Command
Each grabber must also provide a data command. The data returned includes items such as title, subtitle, year of release, and other textual metadata. Grabbers written for MythTV .23 or greater should also return image results for coverart, fanart, banners, and screenshots (where available). This command varies slightly depending on whether the script is for TV or Film material. For Television Material, the season and episode numbers are added to the arguments.
Command Format (FILM) | SCRIPTNAME -ARGS INETREF |
Command Example (FILM) | ./tmdb.pl -D 0241527 |
Command Format (TELEVISION) | SCRIPTNAME -ARGS TITLE SEASONNUM EPISODENUM |
Command Example (TELEVISION) | ./ttvdb.py -D 73739 5 1 |
Response Format | KEY:DATA |
Response Example | Title:Lost Subtitle:Because You Left Season:5 Episode:1 Year:2009 Director:Stephen Williams Plot:The remaining island survivors start to feel the effects of the aftermath of moving the island, and Jack and Ben begin their quest to reunite the Oceanic 6 in order to return to the island with Locke's body in an attempt to save their former fellow castaways. UserRating:7.9 Screenshot:http://www.thetvdb.com/banners/episodes/73739/382841.jpg InetRef:73739 Cast:Matthew Fox, Evangeline Lilly, Naveen Andrews, Elizabeth Mitchell, Michael Emerson, Terry O'Quinn, Daniel Dae Kim, Yunjin Kim, Josh Holloway, John Terry, Andrew Divoff, Sam Anderson, L. Scott Caldwell, Nestor Carbonell, Kevin Durand, Jeff Fahey, Tania Raymonde, Mira Furlan, Alan Dale, Sonya Walger, Rebecca Mader, Ken Leung, Jeremy Davies, Kiele Sanchez, Rodrigo Santoro Genres:Action and Adventure, Drama, Science-Fiction Runtime:45 |
Valid Key:Data Pairs
The following table illustrates valid values that can be returned by the grabber script, and explains the necessary formatting. None of the values are required.
Title | The title of the film or program. | Text |
Subtitle | The subtitle of the film or program. | Text |
Year | The release or transmission date of the film or program. | Integer Value |
Director | The Director of the queried item. | Text |
Plot | The Plot/Description of the queried item. | Text |
UserRating | The rating of the item by the data source's users. | Floating Point number 0-10.0 |
MovieRating | The classification/Film Rating of the item (eg G, PG, PG-13, R) | Text |
Runtime | The playing time of the item. | Integer |
Season | The Season of the item. | Integer |
Episode | The episode number of the item. | Integer |
Coverart | The Coverart/Poster download URLs for the item. Multiple values can be returned, and should be separated by commas. | comma-separated URLs |
Fanart | The Fanart download URLs for the item. Multiple values can be returned, and should be separated by commas. | comma-separated URLs |
Banner | The Banner download URLs for the item. Multiple values can be returned, and should be separated by commas. | comma-separated URLs |
Screenshot | The Screenshot download URLs for the item. Multiple values can be returned, and should be separated by commas. | comma-separated URLs |
Cast | The Cast for the item. Multiple values can be returned, and should be separated by commas. | comma-separated text |
Genres | The Genres for the item. Multiple values can be returned, and should be separated by commas. | comma-separated text |
Countries | The production countries for the item. Multiple values can be returned, and should be separated by commas. | comma-separated text |