1 #ifndef PLAYLISTLOADER_H 2 #define PLAYLISTLOADER_H 3 4 #include "track.h" 5 6 #include <QStringList> 7 #include <QDir> 8 #include <QVector> 9 10 namespace Playlist { 11 class Loader { 12 public: 13 explicit Loader(const QDir &path); 14 15 static QStringList supportedFileFormats(); 16 static QStringList supportedPlaylistFileFormats(); 17 static bool is_supported_file(const QString &name); 18 19 QVector<Track> tracks() const; 20 bool is_playlist_file() const; 21 22 private: 23 QDir path; 24 25 bool is_dir_empty() const; 26 bool is_single_file() const; 27 QStringList files_filter() const; 28 bool is_cue(const QString ¤t_path) const; 29 void remove_tracks_added_from_cue(const QStringList &cues, QVector<Track> &tracks) const; 30 }; 31 } 32 33 #endif // PLAYLISTLOADER_H 34