MythVideo File Parsing

From MythTV Official Wiki
Revision as of 22:44, 19 July 2011 by Skd5aner (talk | contribs) (Added section detailing how to handle Special Episodes/Season 0)

Jump to: navigation, search

Synopsis

MythVideo (in MythTV .22 and newer) uses a complex series of regular expressions to parse all the metadata it can find from a filename when importing the file into the database. Using most common naming schemes, MythVideo can parse Title, Subtitle, Season, and Episode where that data is relevant. Below are some examples of acceptable naming conventions. Additionally, MythVideo can parse most/all of the below formats w/ any number of underscores, dashes, spaces, and periods replacing spaces below.

Filenames

  • A Movie Title.mpg
  • Title s01e01 Subtitle.mpg
  • Title 1x01 Subtitle.mpg
  • Title Season 1 Episode 1 Subtitle.mpg

Note that the video browser does not sort by episode order numerically, rather it sorts by filename, therefore while it will understand and correctly download the episode data for "Title Season 1 Episode 1 Subtitle.mpg" It's best to use a leading zero so that episode 11 & 12 doesn't appear before episode 2. "Title Season 1 Episode 01 Subtitle.mpg"

Filename/Path combinations

  • Title/Season 1/01 Subtitle.mpg
  • Title/Season 1/s01e01 Subtitle.mpg
  • Title/Season 1/1x01 Subtitle.mpg
  • Title/Season 1/Title s01e01 Subtitle.mpg
  • Title/Season 1/Title 1x01 Subtitle.mpg
  • Title/Season 1/Episode 1 Subtitle.mpg
  • Title/Season 1/Season 1 Episode 1 Subtitle.mpg
  • Title Season 1/01 Subtitle.mpg
  • Title Season 1/s01e01 Subtitle.mpg
  • Title Season 1/1x01 Subtitle.mpg
  • Title Season 1/Title s01e01 Subtitle.mpg
  • Title Season 1/Title 1x01 Subtitle.mpg
  • Title Season 1/Episode 1 Subtitle.mpg
  • Title Season 1/Season 1 Episode 1 Subtitle.mpg

TV Specials (Non-Season Episodes)

Sometimes a show will air that is not part of a standard season for a television series. TheTVDB classifies these episodes under "Specials" on their site. In order to retrieve the information for a special episode, the episode can be referenced as occurring in Season 0.

For example, here is a special episode of The Simpsons: http://www.thetvdb.com/?tab=episode&seriesid=71663&seasonid=19130&id=1466291&lid=7

This episode is listed as a "Special" episode on TheTVDB, and as episode 10 within the Special Season. To retrieve metadata properly, you would simply utilize "Season 0" leveraging any of the formats listed above.

A Note on Translations

If your language has an up to date (as of .22) translation file, you can replace the local values of "Season" and "Episode" in the above examples, ie:

  • Title/Staffel 1/Teil 1 Subtitle.mpg

Note that your MythVideo translation *must* have been completed after [21509] for this to work!