Ticket #4212: mythweb_video.patch
| File mythweb_video.patch, 1.6 KB (added by , 17 years ago) |
|---|
-
objects/Video.php
old new class Video { 65 65 } 66 66 $this->childid = $video['childid']; 67 67 // Figure out the URL 68 68 $this->url = '#'; 69 69 if (file_exists('data/video/')) 70 { 71 $mythvideo_dir_ar = split(":", $mythvideo_dir); 72 $i = 1; 73 foreach ($mythvideo_dir_ar as &$path) { 74 $path = '#^' . $path . '/?#'; 75 $video_path[$i - 1] = "video$i/"; 76 $i++; 77 } 78 unset($path); 79 $video_path[0] = 'video/'; 80 70 81 $this->url = root . implode('/', array_map('rawurlencode', 71 82 array_map('utf8tolocal', 72 explode('/', 73 'data/video/' . preg_replace('#^'.$mythvideo_dir.'/?#', '', $this->filename) 74 )))); 83 explode('/', 'data/' . 84 preg_replace($mythvideo_dir_ar, $video_path, $this->filename) )))); 85 // preg_replace('#^'.$mythvideo_dir.'/?#', 'video/', $this->filename) )))); 86 } 75 87 $genre = $db->query('SELECT videometadatagenre.idgenre 76 88 FROM videometadatagenre 77 89 WHERE videometadatagenre.idvideo = ?', 78 90 $this->intid 79 91 );
