class CueParser Process composer metadata in cue files
Use composer as an alternative to songwriter ..and move a misplaced comment
This commit is contained in:
parent
97e6b17f96
commit
f2f63a703e
@ -48,6 +48,8 @@ const char *CueParser::kIndexRegExp = "(\\d{1,3}):(\\d{2}):(\\d{2})";
|
||||
const char *CueParser::kPerformer = "performer";
|
||||
const char *CueParser::kTitle = "title";
|
||||
const char *CueParser::kSongWriter = "songwriter";
|
||||
// composer may be in cue file and is synonym for songwriter
|
||||
const char *CueParser::kComposer = "composer";
|
||||
const char *CueParser::kFile = "file";
|
||||
const char *CueParser::kTrack = "track";
|
||||
const char *CueParser::kIndex = "index";
|
||||
@ -112,6 +114,9 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
else if (line_name.compare(kSongWriter, Qt::CaseInsensitive) == 0) {
|
||||
album_composer = line_value;
|
||||
}
|
||||
else if (line_name.compare(kComposer, Qt::CaseInsensitive) == 0) {
|
||||
album_composer = line_value;
|
||||
}
|
||||
else if (line_name.compare(kFile, Qt::CaseInsensitive) == 0) {
|
||||
file = QDir::isAbsolutePath(line_value) ? line_value : dir.absoluteFilePath(line_value);
|
||||
if (splitted.size() > 2) {
|
||||
@ -208,8 +213,11 @@ SongList CueParser::Load(QIODevice *device, const QString &playlist_path, const
|
||||
}
|
||||
else if (line_name.compare(kSongWriter, Qt::CaseInsensitive) == 0) {
|
||||
composer = line_value;
|
||||
// End of track's for the current file -> parse next one
|
||||
}
|
||||
else if (line_name.compare(kComposer, Qt::CaseInsensitive) == 0) {
|
||||
composer = line_value;
|
||||
}
|
||||
// End of tracks for the current file -> parse next one
|
||||
else if (line_name.compare(kRem, Qt::CaseInsensitive) == 0 && splitted.size() >= 3) {
|
||||
if (line_value.compare(kGenre, Qt::CaseInsensitive) == 0) {
|
||||
genre = splitted[2];
|
||||
|
@ -50,6 +50,7 @@ class CueParser : public ParserBase {
|
||||
static const char *kPerformer;
|
||||
static const char *kTitle;
|
||||
static const char *kSongWriter;
|
||||
static const char *kComposer;
|
||||
static const char *kFile;
|
||||
static const char *kTrack;
|
||||
static const char *kIndex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user