aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/cue/CueParser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/playlist/cue/CueParser.cxx')
-rw-r--r--src/playlist/cue/CueParser.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/playlist/cue/CueParser.cxx b/src/playlist/cue/CueParser.cxx
index 372c90b78..81797fe28 100644
--- a/src/playlist/cue/CueParser.cxx
+++ b/src/playlist/cue/CueParser.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -250,7 +250,6 @@ CueParser::Feed2(char *p)
song_tag = header_tag;
song_tag.AddItem(TAG_TRACK, nr);
- last_updated = false;
} else if (state == IGNORE_TRACK) {
return;
} else if (state == TRACK && strcmp(command, "INDEX") == 0) {
@@ -266,13 +265,12 @@ CueParser::Feed2(char *p)
if (position_ms < 0)
return;
- if (!last_updated && previous != nullptr &&
- previous->GetStartTime().ToMS() < (unsigned)position_ms) {
- last_updated = true;
+ if (previous != nullptr && previous->GetStartTime().ToMS() < (unsigned)position_ms)
previous->SetEndTime(SongTime::FromMS(position_ms));
- }
current->SetStartTime(SongTime::FromMS(position_ms));
+ if(strcmp(nr, "00") != 0 || previous == nullptr)
+ state = IGNORE_TRACK;
}
}