4 //TODO wait for lister to finish, if there are no files shown, but there are
5 // media files in that directory show a longMessage (preferably one that disappears when given a signal)
7 #include "enginecontroller.h"
8 #include "playlistloader.h"
10 #include <kdirlister.h>
11 #include <kfileitem.h>
13 class MyDirLister
: public KDirLister
{
15 MyDirLister( bool delayedMimeTypes
) : KDirLister() { setDelayedMimeTypes( delayedMimeTypes
); }
18 virtual bool matchesMimeFilter( const KFileItem
*item
) const {
21 EngineController::canDecode( item
->url() ) ||
22 item
->url().protocol() == "audiocd" ||
23 PlaylistFile::isPlaylistFile( item
->name() ) ||
24 item
->name().endsWith( ".mp3", Qt::CaseInsensitive
) || //for now this is less confusing for the user
25 item
->name().endsWith( ".aa", Qt::CaseInsensitive
) || //for adding to iPod
26 item
->name().endsWith( ".mp4", Qt::CaseInsensitive
) || //for adding to iPod
27 item
->name().endsWith( ".m4v", Qt::CaseInsensitive
) || //for adding to iPod
28 item
->name().endsWith( ".m4b", Qt::CaseInsensitive
) || //for adding to iPod
29 item
->name().endsWith( ".ogg", Qt::CaseInsensitive
) ||
30 item
->name().endsWith( ".flac", Qt::CaseInsensitive
) ||
31 item
->name().endsWith( ".wma", Qt::CaseInsensitive
);