Formatting
This commit is contained in:
@@ -129,10 +129,9 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
break;
|
||||
}
|
||||
// just ignore the rest of possible field types for now...
|
||||
}
|
||||
while (!(line = text_stream.readLine()).isNull());
|
||||
} while (!(line = text_stream.readLine()).isNull());
|
||||
|
||||
if(line.isNull()) {
|
||||
if (line.isNull()) {
|
||||
qLog(Warning) << "the .cue file from " << dir_path << " defines no tracks!";
|
||||
return ret;
|
||||
}
|
||||
@@ -215,8 +214,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
}
|
||||
|
||||
// Just ignore the rest of possible field types for now...
|
||||
}
|
||||
while (!(line = text_stream.readLine()).isNull());
|
||||
} while (!(line = text_stream.readLine()).isNull());
|
||||
|
||||
// We didn't add the last song yet...
|
||||
if (valid_file && !index.isEmpty() && (track_type.isEmpty() || track_type == kAudioTrackType)) {
|
||||
@@ -246,7 +244,7 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
}
|
||||
|
||||
// The last TRACK for every FILE gets it's 'end' marker from the media file's length
|
||||
if(i + 1 < entries.size() && entries.at(i).file == entries.at(i + 1).file) {
|
||||
if (i + 1 < entries.size() && entries.at(i).file == entries.at(i + 1).file) {
|
||||
// incorrect indices?
|
||||
if (!UpdateSong(entry, entries.at(i + 1).index, &song)) {
|
||||
continue;
|
||||
|
||||
@@ -96,8 +96,8 @@ class CueParser : public ParserBase {
|
||||
file(_file), index(_index), title(_title), artist(_artist), album_artist(_album_artist), album(_album), composer(_composer), album_composer(_album_composer), genre(_genre), date(_date), disc(_disc) {}
|
||||
};
|
||||
|
||||
static bool UpdateSong(const CueEntry &entry, const QString &next_index, Song *song) ;
|
||||
static bool UpdateLastSong(const CueEntry &entry, Song *song) ;
|
||||
static bool UpdateSong(const CueEntry &entry, const QString &next_index, Song *song);
|
||||
static bool UpdateLastSong(const CueEntry &entry, Song *song);
|
||||
|
||||
static QStringList SplitCueLine(const QString &line);
|
||||
static qint64 IndexToMarker(const QString &index);
|
||||
|
||||
@@ -66,7 +66,7 @@ class M3UParser : public ParserBase {
|
||||
qint64 length;
|
||||
};
|
||||
|
||||
static bool ParseMetadata(const QString &line, Metadata *metadata) ;
|
||||
static bool ParseMetadata(const QString &line, Metadata *metadata);
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ class ParserBase : public QObject {
|
||||
|
||||
// If the URL is a file:// URL then returns its path, absolute or relative to the directory depending on the path_type option.
|
||||
// Otherwise returns the URL as is. This function should always be used when saving a playlist.
|
||||
static QString URLOrFilename(const QUrl &url, const QDir &dir, Playlist::Path path_type) ;
|
||||
static QString URLOrFilename(const QUrl &url, const QDir &dir, Playlist::Path path_type);
|
||||
|
||||
private:
|
||||
CollectionBackendInterface *collection_;
|
||||
|
||||
@@ -61,7 +61,7 @@ class PlaylistParser : public QObject {
|
||||
void Save(const SongList &songs, const QString &filename, const Playlist::Path) const;
|
||||
|
||||
private:
|
||||
static QString FilterForParser(const ParserBase *parser, QStringList *all_extensions = nullptr) ;
|
||||
static QString FilterForParser(const ParserBase *parser, QStringList *all_extensions = nullptr);
|
||||
|
||||
private:
|
||||
QList<ParserBase*> parsers_;
|
||||
|
||||
@@ -39,7 +39,7 @@ class QXmlStreamWriter;
|
||||
class CollectionBackendInterface;
|
||||
|
||||
class WplParser : public XMLParser {
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit WplParser(CollectionBackendInterface *collection, QObject *parent = nullptr);
|
||||
@@ -55,7 +55,7 @@ class WplParser : public XMLParser {
|
||||
|
||||
private:
|
||||
void ParseSeq(const QDir &dir, QXmlStreamReader *reader, SongList *songs, const bool collection_search = true) const;
|
||||
static void WriteMeta(const QString &name, const QString &content, QXmlStreamWriter *writer) ;
|
||||
static void WriteMeta(const QString &name, const QString &content, QXmlStreamWriter *writer);
|
||||
};
|
||||
|
||||
#endif // WPLPARSER_H
|
||||
|
||||
Reference in New Issue
Block a user