Opened 18 years ago
Closed 18 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)
Change History (5)
by , 18 years ago
Attachment: | mythweb_handler_patch.txt added |
---|
comment:1 by , 18 years ago
Owner: | changed from | to
---|
Example patch to fix mythweb video module handler.php