[mythtv] Brackets in filenames in Mythweb Videos

Joe Ripley vitaminjoe at gmail.com
Tue Jul 31 18:10:58 UTC 2007


Not sure if this has been reported or not.  Using brackets (i.e. '('
or ')') in file or directory names for video files breaks mythweb's
video component.  I am using the SVN 14091.  I am also using the MySQL
driver for mythweb.

For example, I have a directory of episodes of 'The Office (US)'.  The
path of the directories are:

/myth/video/The Office (US)/Season 1
/myth/video/The Office (US)/Season 2
/myth/video/The Office (US)/Season 3

When I click on 'Season 1' under 'Directory Structure' in mythweb, I
get no video listings.  The query being generated by
modules/video/handler.php is:

SELECT videometadata.intid FROM videometadata LEFT JOIN
videometadatagenre ON videometadata.intid = videometadatagenre.idvideo
WHERE videometadata.filename RLIKE '/myth/video/The Office (US)/Season
1/[/]*[^/]*$' GROUP BY intid ORDER BY title;

This query fails due to the "(" and ")" characters.  The query works
if these characters are properly escaped (i.e "\\(" instead of "(").

The correct query would be:

SELECT videometadata.intid FROM videometadata LEFT JOIN
videometadatagenre ON videometadata.intid = videometadatagenre.idvideo
WHERE videometadata.filename RLIKE '/myth/video/The Office
\\(US\\)/Season 1/[/]*[^/]*$' GROUP BY intid ORDER BY title;

I'm not sure where the best place to escape these characters would be.

-- 
Joe Ripley
vitaminjoe at gmail.com


More information about the mythtv-dev mailing list