ear9mrn / MythRokuPlayer

mythtv front end for Roku player
tbd
Other
26 stars 23 forks source link

Videos won't stream with some characters in file path #10

Closed zane131 closed 12 years ago

zane131 commented 12 years ago

This issue was found while investigating issue #9. The problem is the URL in the XML generated from mythtv_movies_xml.php must match the path of the files exactly. mythtv_tv_xml.php uses rawurlencode() to clean up the filenames but this replaces all non-alphanumeric characters with %21, %2A, etc.

rshendershot commented 12 years ago

please try this change at line 56 of mythtv_movies_xml.php where streamUrl is set.

" . $WebServer . "/data/video/" . implode("/", array_map("rawurlencode", explode("/", $db_field['filename']))) ."
zane131 commented 12 years ago

@rshendershot sigh I have to admit that your suggestion was actually my original solution, however, it seems i had over thought the situation, thinking that the solution would only fix the '/' and that I needed to account for all other non-alphanumeric characters. I tested your suggestion and it works even better because it also allows for spaces in the filename. I will try to upload the better solution sometime this weekend.