Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/mpc-hc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksoid <aleksoid@users.sourceforge.net>2008-08-22 06:00:31 +0400
committerAleksoid <aleksoid@users.sourceforge.net>2008-08-22 06:00:31 +0400
commit7526cad91172306628a2030f9dbf3370064c7189 (patch)
tree188c695dc98390c9c7c30abb3913719442f52502 /src/apps/mplayerc/PlayerPlaylistBar.cpp
parent8982c186a3d1624c68e9218477557fe45cda3634 (diff)
CHANGE : Open directory(shell context menu or MPC-HC menu) - load only enqueue audio/video files, those with file extensions from the Formats page in MPC options
git-svn-id: https://mpc-hc.svn.sourceforge.net/svnroot/mpc-hc/trunk@740 10f7b99b-c216-0410-bff0-8a66a9350fd8
Diffstat (limited to 'src/apps/mplayerc/PlayerPlaylistBar.cpp')
-rw-r--r--src/apps/mplayerc/PlayerPlaylistBar.cpp16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/apps/mplayerc/PlayerPlaylistBar.cpp b/src/apps/mplayerc/PlayerPlaylistBar.cpp
index 49ba82789..a880fa966 100644
--- a/src/apps/mplayerc/PlayerPlaylistBar.cpp
+++ b/src/apps/mplayerc/PlayerPlaylistBar.cpp
@@ -225,11 +225,23 @@ static bool SearchFiles(CString mask, CAtlList<CString>& sl)
if(fd.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) continue;
CString fn = fd.cFileName;
- CString ext = fn.Mid(fn.ReverseFind('.')+1).MakeLower();
+ //CString ext = fn.Mid(fn.ReverseFind('.')+1).MakeLower();
+ CString ext = fn.Mid(fn.ReverseFind('.')).MakeLower();
CString path = dir + fd.cFileName;
if(!fFilterKnownExts || mf.FindExt(ext))
- sl.AddTail(path);
+ {
+ for(int i = 0; i < mf.GetCount(); i++)
+ {
+ CMediaFormatCategory& mfc = mf.GetAt(i);
+ if(CPPageFormats::IsRegistered(ext, mfc.GetProgId()))
+ {
+ sl.AddTail(path);
+ break;
+ }
+ }
+ }
+
}
while(FindNextFile(h, &fd));