Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
ebed7e21
Commit
ebed7e21
authored
Feb 24, 2018
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
playlist/cue/Parser: parse tags after "INDEX 01"
Instead of setting state=IGNORE_TRACK, ignore only the following "INDEX" lines. Correction for commit
8461d71b
. Closes #227
parent
53f5d4c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
CueParser.cxx
src/playlist/cue/CueParser.cxx
+6
-1
CueParser.hxx
src/playlist/cue/CueParser.hxx
+7
-0
No files found.
src/playlist/cue/CueParser.cxx
View file @
ebed7e21
...
...
@@ -229,6 +229,8 @@ CueParser::Feed2(char *p) noexcept
}
state
=
TRACK
;
ignore_index
=
false
;
current
.
reset
(
new
DetachedSong
(
filename
));
assert
(
!
current
->
GetTag
().
IsDefined
());
...
...
@@ -238,6 +240,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 +260,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
;
}
}
...
...
src/playlist/cue/CueParser.hxx
View file @
ebed7e21
...
...
@@ -88,6 +88,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().
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment