add mp3 and ogg torrent url info to JamendoAlbum
[amarok.git] / src / mydirlister.h
blob563115b5d55d42c88603baac0e36f1a6845c72fe
1 #ifndef MYDIRLISTER_H
2 #define MYDIRLISTER_H
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 "PlaylistHandler.h"
10 #include <kdirlister.h>
11 #include <kfileitem.h>
13 class MyDirLister : public KDirLister {
14 public:
15 MyDirLister( bool delayedMimeTypes ) : KDirLister() { setDelayedMimeTypes( delayedMimeTypes ); setAutoUpdate( true ); }
17 protected:
18 virtual bool matchesFilter( const KFileItem &item ) const {
19 PlaylistHandler ph;
20 return
21 ( item.isDir() && !item.isHidden() ) ||
22 EngineController::canDecode( item.url() ) ||
23 item.url().protocol() == "audiocd" ||
24 ph.isPlaylist( item.url() ) ||
25 item.name().endsWith( ".mp3", Qt::CaseInsensitive ) || //for now this is less confusing for the user
26 item.name().endsWith( ".aa", Qt::CaseInsensitive ) || //for adding to iPod
27 item.name().endsWith( ".mp4", Qt::CaseInsensitive ) || //for adding to iPod
28 item.name().endsWith( ".m4v", Qt::CaseInsensitive ) || //for adding to iPod
29 item.name().endsWith( ".m4b", Qt::CaseInsensitive ) || //for adding to iPod
30 item.name().endsWith( ".ogg", Qt::CaseInsensitive ) ||
31 item.name().endsWith( ".flac", Qt::CaseInsensitive ) ||
32 item.name().endsWith( ".wma", Qt::CaseInsensitive );
36 #endif