[mythtv-commits] mythtv commit: r21509 by robertm

mythtv at cvs.mythtv.org mythtv at cvs.mythtv.org
Tue Aug 25 05:05:43 UTC 2009


      Author: robertm
        Date: 2009-08-25 05:05:42 +0000 (Tue, 25 Aug 2009)
New Revision: 21509
   Changeset: http://cvs.mythtv.org/trac/changeset/21509

Modified:

   trunk/mythplugins/mythvideo/mythvideo/metadata.cpp

Log:

Rewrite of MythVideo's filename parsing.  Basically preserves existing functionality but adds a ton of parsing information from path.  Though this is by no means encyclopedic, the following formats are known (tested) to work:

Filenames:

Title s01e01 Subtitle.mpg
Title 1x01 Subtitle.mpg
Title Season 1 Episode 1 Subtitle.mpg
Title 1.01 Subtitle.mpg
A Movie Title.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

This new parsing is brought to you by a tiny bit of work on my part and the regexp mastery of Mike Dean.  Note that the strings for "Season" and "Episode" are translatable, and thus (when translated) can use local values as well.  Moreover, spaces, underscores, and dashes can occupy any sensible place above and the parse should still work.





More information about the mythtv-commits mailing list