[mythtv-users] what do do about wrong data in myth video?

Raymond Wagner raymond at wagnerrp.com
Thu Dec 15 08:25:06 UTC 2011


On 12/15/2011 01:33, Dan Armbrust wrote:
> I don't like the supported naming schemes.  Previously, I was using []
> - and I know those choke it.  For some reasons I thought () were ok.
> Guess not.

The regular expression is used for TV episodes.  If the expression fails 
to match, the title is taken from the filename in whole, and anything 
within parentheses, brackets, or braces gets deleted.

>> Use the Reset Metadata/Reset Details menu option, or move the file out,
>> scan, move the file in, scan.
> Won't this just cause it to get it wrong again, the next time it goes
> out to pick up data?

The implication is that you would have renamed the file in the mean time 
so it would have something it understood instead.

> I know there is a pretty evil regular expression involved in trying to
> pick these out... wouldn't it be easier if the users could just
> specify their own pattern(s)?

If there is a legitimate naming format, for which the regular expression 
can be adapted without disrupting the other existing formats, then by 
all means submit a patch.  By legitimate, I mean no additions to filter 
out things like group names and sources (which yours does not have).  In 
order to support parentheses around the season/episode, one would know 
how to do regular expression back references, so a closing would only be 
filtered out if there were a preceding opening.  Back references are 
beyond my capability for regular expressions, but the code in question 
can be found here:

https://github.com/MythTV/mythtv/blob/master/mythtv/libs/libmythmetadata/videometadata.cpp#L974

Back to your filename (Rescue Me (03x02) - title.mkv), I don't actually 
see any problem with it.  Since the parentheses do not fit the separator 
definition, the spaces and dashes will not get filtered out, resulting 
in a nearly correct processing.  That title gets broken into four groups:

"Rescue Me ("
"03"
"02"
") - title"

Since season and episode are given, subtitle is ignored during lookups.  
That leaves an incorrect title.  The command:

share/mythtv/metadata/Television/ttvdb.py -M "Rescue Me ("

turns up three results, with the top one being the correct match to 
inetref 73741, and within distance than the bulk updater would select 
it.  Your titles as they are should work, meaning your symptoms are 
caused somewhere other than filename parsing.  I can't actually find 
this similarly titled Italian movie on TMDB or TVDB.  Could you give a 
link to it?


More information about the mythtv-users mailing list