--- mythweb/modules/video/handler.php	2010-01-21 14:38:26.469926117 +0100
+++ mythweb/modules/video/handler.php	2010-02-19 14:01:04.248618322 +0100
@@ -167,7 +167,7 @@
                 if (!isset($PATH['subs'][$path])) {
                     $p = '';
                     for ($i=0; $i<=$key;$i++) {
-                        $p .=$paths[$i];
+                        $p .='/'.$paths[$i];
                     }
                     $PATH['subs'][$path] = array('display' => $path,
                                                  'path'    => "/$dir/$p",
@@ -264,6 +264,7 @@
     if (isset($_SESSION['video']['path'])) {
         $where .= ' AND CONCAT("/", IF(INSTR(filename,"/"), LEFT(filename, LENGTH(filename) - LOCATE("/", REVERSE(filename))), "")) = '.$db->escape($_SESSION['video']['path']);
     }
+
 // Deal with the parental locks
     if (isset($_REQUEST['VideoAdminPassword']))
         $_SESSION['video']['VideoAdminPassword'] = $_REQUEST['VideoAdminPassword'];
@@ -272,7 +273,8 @@
         $where .= ' AND videometadata.showlevel <= '.$db->escape(setting('VideoDefaultParentalLevel', hostname));
 
     if ($where)
-        $where = 'WHERE '.substr($where, 4);
+        //$where = 'WHERE '.substr($where, 4);
+        $where = 'WHERE filename LIKE '.$db->escape('%'.$_SESSION['video']['path'].'%');
 
     $sh = $db->query('
         SELECT      videometadata.intid
