Index: mythvideo/videofilter.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videofilter.cpp,v
retrieving revision 1.10
diff -u -r1.10 videofilter.cpp
--- mythvideo/videofilter.cpp	23 Feb 2005 20:41:16 -0000	1.10
+++ mythvideo/videofilter.cpp	10 Apr 2005 22:08:54 -0000
@@ -214,6 +214,8 @@
             return " ORDER BY userrating DESC";
         case 3 : 
             return " ORDER BY length";
+        case 4 : 
+            return " ORDER BY filename";
         default:
             return "";        
     }
@@ -406,6 +408,7 @@
         orderby_select->addItem(1,"year");
         orderby_select->addItem(2,"userrating");
         orderby_select->addItem(3,"runtime");
+        orderby_select->addItem(4,"filename");
         orderby_select->setToItem(currentSettings->getOrderby());
     }
 }
Index: mythvideo/videotree.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videotree.cpp,v
retrieving revision 1.41
diff -u -r1.41 videotree.cpp
--- mythvideo/videotree.cpp	9 Apr 2005 00:50:46 -0000	1.41
+++ mythvideo/videotree.cpp	10 Apr 2005 22:08:55 -0000
@@ -650,8 +650,8 @@
             }
         }
 
-        
-        video_player->SetText(player); 
+
+	 video_player->SetText(player);
     }
     else
     {
@@ -662,8 +662,13 @@
         
         video_title->SetText("");
         video_file->SetText("");
-        video_player->SetText(""); 
+        video_player->SetText("");
         
+        video_poster->ResetImage();        
+        video_plot->SetText("");
+        if (curitem)
+             delete curitem;
+        curitem = NULL;
     }
     
 }
@@ -819,7 +824,11 @@
         QButton *focusButton = NULL;
         if(info)
         {
-            focusButton = popup->addButton(tr("Watch This Video"), this, SLOT(slotWatchVideo())); 
+     	    int node_int = video_tree_list->getCurrentNode()->getInt();
+	    if (node_int >= 0)
+	      focusButton = popup->addButton(tr("Watch This Video"), this, SLOT(slotWatchVideo())); 
+	    else
+	      focusButton = popup->addButton(tr("Watch This Directory"), this, SLOT(slotWatchVideoList())); 
             popup->addButton(tr("View Full Plot"), this, SLOT(slotViewPlot()));
         }
         else
@@ -910,9 +919,62 @@
     
     if (curitem)
         playVideo(curitem);
-    else
-        cerr << "no Item to watch" << endl;
+    else 
+      cerr << "No item to play";
+}
+
 
+QString VideoTree::getVideoList(GenericTree *node) {
+  if (node == NULL)
+    return "";
+  int item = node->getInt();
+  cerr << "Entering Node : << " << item << "\n";
+  if (item < 0) { // Recurse through subdir
+    QString list = "";
+    QPtrList<GenericTree>* children = node->getAllChildren();
+    GenericTree *child;
+    for (child = children->first(); child; child = children->next()) {
+      list.append(getVideoList(child));
+    }
+    return list;
+  } else { // Item
+    QString infile;
+    if (file_browser) {
+      infile = *(browser_mode_files.at(item));
+    } else {
+      Metadata *myData = new Metadata();
+      myData->setID(item);
+      myData->fillDataFromID();
+      infile = myData->Filename();
+
+    }
+    QString file;
+    file.sprintf("\"%s\" ",
+		 infile.replace(QRegExp("\""), "\\\"").utf8().data());
+    cerr << "Found file : " << file << "\n";
+    return file;
+  }
+}
+
+void VideoTree::slotWatchVideoList() {
+      cancelPopup();
+      GenericTree *node = video_tree_list->getCurrentNode();
+      // We use the default handlre
+      QString handler = gContext->GetSetting("VideoDefaultPlayer");
+      QString list = getVideoList(node);
+      QString command;
+      if (handler.contains("%s"))
+        command = handler.replace(QRegExp("%s"), list);
+      else
+        command = handler + " " + list;
+      cerr << "command : " << command;
+      myth_system((QString("%1 ").arg(command)).local8Bit());
+      gContext->GetMainWindow()->raise();
+      gContext->GetMainWindow()->setActiveWindow();
+      gContext->GetMainWindow()->currentWidget()->setFocus();
+      
+      updateForeground();
+      
 }
 
 
Index: mythvideo/videotree.h
===================================================================
RCS file: /var/lib/mythcvs/mythvideo/mythvideo/videotree.h,v
retrieving revision 1.12
diff -u -r1.12 videotree.h
--- mythvideo/videotree.h	28 Mar 2005 19:49:07 -0000	1.12
+++ mythvideo/videotree.h	10 Apr 2005 22:08:55 -0000
@@ -31,6 +31,7 @@
     virtual void playVideo(Metadata *someItem);
     QString getHandler(Metadata *someItem);
     QString getCommand(Metadata *someItem);
+    QString getVideoList(GenericTree *node);
         
   public slots:
     void slotDoCancel();
@@ -39,6 +40,7 @@
     void slotViewPlot();
     void slotDoFilter();
     virtual void slotWatchVideo();
+    virtual void slotWatchVideoList();
     
     void handleTreeListSelection(int, IntVector*);
     void handleTreeListEntry(int, IntVector*);
