PlaylistParser: Refactor code and exclude CUE from save playlist filters
Fixes #953
This commit is contained in:
@@ -21,15 +21,16 @@
|
||||
#ifndef WPLPARSER_H
|
||||
#define WPLPARSER_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QDir>
|
||||
#include <QByteArray>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
|
||||
#include "config.h"
|
||||
#include "core/song.h"
|
||||
#include "playlist/playlist.h"
|
||||
#include "settings/playlistsettingspage.h"
|
||||
#include "xmlparser.h"
|
||||
|
||||
class QIODevice;
|
||||
@@ -47,11 +48,13 @@ class WplParser : public XMLParser {
|
||||
QString name() const override { return "WPL"; }
|
||||
QStringList file_extensions() const override { return QStringList() << "wpl"; }
|
||||
QString mime_type() const override { return "application/vnd.ms-wpl"; }
|
||||
bool load_supported() const override { return true; }
|
||||
bool save_supported() const override { return true; }
|
||||
|
||||
bool TryMagic(const QByteArray &data) const override;
|
||||
|
||||
SongList Load(QIODevice *device, const QString &playlist_path, const QDir &dir, const bool collection_search = true) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir, Playlist::Path path_type = Playlist::Path_Automatic) const override;
|
||||
void Save(const SongList &songs, QIODevice *device, const QDir &dir, const PlaylistSettingsPage::PathType path_type = PlaylistSettingsPage::PathType_Automatic) const override;
|
||||
|
||||
private:
|
||||
void ParseSeq(const QDir &dir, QXmlStreamReader *reader, SongList *songs, const bool collection_search = true) const;
|
||||
|
||||
Reference in New Issue
Block a user