Merge tag 'v0.20.18'
release v0.20.18
This commit is contained in:
@@ -229,6 +229,7 @@ CueParser::Feed2(char *p) noexcept
|
||||
}
|
||||
|
||||
state = TRACK;
|
||||
ignore_index = false;
|
||||
current = std::make_unique<DetachedSong>(filename);
|
||||
assert(!current->GetTag().IsDefined());
|
||||
|
||||
@@ -238,6 +239,9 @@ CueParser::Feed2(char *p) noexcept
|
||||
} else if (state == IGNORE_TRACK) {
|
||||
return;
|
||||
} else if (state == TRACK && strcmp(command, "INDEX") == 0) {
|
||||
if (ignore_index)
|
||||
return;
|
||||
|
||||
const char *nr = cue_next_token(&p);
|
||||
if (nr == nullptr)
|
||||
return;
|
||||
@@ -255,7 +259,7 @@ CueParser::Feed2(char *p) noexcept
|
||||
|
||||
current->SetStartTime(SongTime::FromMS(position_ms));
|
||||
if(strcmp(nr, "00") != 0 || previous == nullptr)
|
||||
state = IGNORE_TRACK;
|
||||
ignore_index = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -87,6 +87,13 @@ class CueParser {
|
||||
*/
|
||||
std::unique_ptr<DetachedSong> finished;
|
||||
|
||||
/**
|
||||
* Ignore "INDEX" lines? Only up the first one after "00" is
|
||||
* used. If there is a pregap (INDEX 00..01), it is assigned
|
||||
* to the previous song.
|
||||
*/
|
||||
bool ignore_index;
|
||||
|
||||
/**
|
||||
* Tracks whether Finish() has been called. If true, then all
|
||||
* remaining (partial) results will be delivered by Get().
|
||||
|
Reference in New Issue
Block a user