fixed: browse for path is rule with video xsp's should show video sources
authorspiff_ <spiff_@svn>
Sun, 12 Dec 2010 13:59:18 +0000 (13:59 +0000)
committerspiff_ <spiff_@svn>
Sun, 12 Dec 2010 13:59:18 +0000 (13:59 +0000)
(cherry picked from commit 34eb767374efde11b531d8d1d1893e1481431e6e)

git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@35620 568bbfeb-2a22-0410-94d2-cc84cf5bfa90

xbmc/GUIDialogSmartPlaylistRule.cpp

index 991cdc5..c0a5cfe 100644 (file)
@@ -30,6 +30,7 @@
 #include "GUIEditControl.h"
 #include "LocalizeStrings.h"
 #include "Settings.h"
+#include "MediaManager.h"
 
 #define CONTROL_FIELD           15
 #define CONTROL_OPERATOR        16
@@ -189,7 +190,17 @@ void CGUIDialogSmartPlaylistRule::OnBrowse()
   }
   else if (m_rule.m_field == CSmartPlaylistRule::FIELD_PATH)
   {
-    CGUIDialogFileBrowser::ShowAndGetDirectory(g_settings.m_musicSources,g_localizeStrings.Get(657),m_rule.m_parameter,false);
+    VECSOURCES sources;
+    if (m_type == "songs" || m_type == "mixed")
+      sources = *g_settings.GetSourcesFromType("music");
+    if (m_type != "songs")
+    {
+      VECSOURCES sources2 = *g_settings.GetSourcesFromType("video");
+      sources.insert(sources.end(),sources2.begin(),sources2.end());
+    }
+    g_mediaManager.GetLocalDrives(sources);
+    
+    CGUIDialogFileBrowser::ShowAndGetDirectory(sources,g_localizeStrings.Get(657),m_rule.m_parameter,false);
     UpdateButtons();
     return;
   }