[mythtv-commits] Ticket #3783: Parentheses in file path breaks Video module of Mythweb

MythTV mythtv at cvs.mythtv.org
Wed Aug 1 03:58:06 UTC 2007


#3783: Parentheses in file path breaks Video module of Mythweb
-----------------------+----------------------------------------------------
 Reporter:  anonymous  |       Owner:  xris   
     Type:  defect     |      Status:  new    
 Priority:  minor      |   Milestone:  0.21   
Component:  mythweb    |     Version:  unknown
 Severity:  medium     |     Mlocked:  0      
-----------------------+----------------------------------------------------
 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;
 }}}


 See attached patch for an example fix.

 --
 Joe Ripley
 vitaminjoe at gmail.com

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/3783>
MythTV <http://svn.mythtv.org/trac>
MythTV


More information about the mythtv-commits mailing list