[mythtv-users] myth video file naming issues
Raymond Wagner
raymond at wagnerrp.com
Mon Mar 14 17:19:30 UTC 2011
On 3/14/2011 12:58, Dan Armbrust wrote:
>>> Alternatively, what are the formats that it expects, what can it parse?
>> http://www.mythtv.org/wiki/MythVideo_File_Parsing
>>
> Thanks.
>
> Hmm. Must be the brackets that many of my files have which is hosing
> the parser.
>
> Title [01x05] - Subtitle
>
> I don't suppose I can modify the parser without recompiling things?
Nope. It will require a recompile of libmythmetadata. The relevant
code can be found here...
https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythmetadata/videometadata.cpp#L974
The problem is that use of parentheses, brackets, and braces in the
title and subtitle are assumed to be release years or dates or other
unwanted information. Those are carried through and handled after the
primary regular expression, with the entire contents being removed. As
such, they could not be handled like the other spacer characters which
are outright removed.
Proper handling of season and episode in brackets would require that the
regular expression match opening and closing of those characters, which
will involve back references and other more complex capabilities of
regular expressions. If you are good with regular expressions, feel
free to try to make this work and submit a patch.
More information about the mythtv-users
mailing list