Opened 12 years ago

Closed 12 years ago

#3783 closed defect (fixed)

Parentheses in file path breaks Video module of Mythweb

Reported by: anonymous Owned by: Rob Smith
Priority: minor Milestone: 0.21
Component: mythweb Version: unknown
Severity: medium Keywords: mythweb video brackets parentheses
Cc: Ticket locked: no

Description

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@…

Attachments (2)

mythweb_handler_patch.txt (908 bytes) - added by vitaminjoe@… 12 years ago.
Example patch to fix mythweb video module handler.php
3783_patch.diff (992 bytes) - added by Joe Ripley <vitaminjoe@…> 12 years ago.
Proper patch generated by 'svn diff'

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by vitaminjoe@…

Attachment: mythweb_handler_patch.txt added

Example patch to fix mythweb video module handler.php

Changed 12 years ago by Joe Ripley <vitaminjoe@…>

Attachment: 3783_patch.diff added

Proper patch generated by 'svn diff'

comment:1 Changed 12 years ago by xris

Owner: changed from xris to Rob Smith

comment:2 Changed 12 years ago by Joe Ripley <vitaminjoe@…>

This issue was fixed in [14537], was it not?

comment:3 Changed 12 years ago by Rob Smith

Resolution: fixed
Status: newclosed

Yes, it was

Note: See TracTickets for help on using tickets.