CueParser: rename "tag" to "header_tag"
This commit is contained in:
parent
69867015e9
commit
68fc3704e9
@ -31,7 +31,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
CueParser::CueParser()
|
CueParser::CueParser()
|
||||||
:state(HEADER), tag(new Tag()),
|
:state(HEADER), header_tag(new Tag()),
|
||||||
current(nullptr),
|
current(nullptr),
|
||||||
previous(nullptr),
|
previous(nullptr),
|
||||||
finished(nullptr),
|
finished(nullptr),
|
||||||
@ -39,7 +39,7 @@ CueParser::CueParser()
|
|||||||
|
|
||||||
CueParser::~CueParser()
|
CueParser::~CueParser()
|
||||||
{
|
{
|
||||||
delete tag;
|
delete header_tag;
|
||||||
|
|
||||||
if (current != nullptr)
|
if (current != nullptr)
|
||||||
current->Free();
|
current->Free();
|
||||||
@ -133,7 +133,7 @@ Tag *
|
|||||||
CueParser::GetCurrentTag()
|
CueParser::GetCurrentTag()
|
||||||
{
|
{
|
||||||
if (state == HEADER)
|
if (state == HEADER)
|
||||||
return tag;
|
return header_tag;
|
||||||
else if (state == TRACK)
|
else if (state == TRACK)
|
||||||
return current->tag;
|
return current->tag;
|
||||||
else
|
else
|
||||||
@ -207,7 +207,7 @@ CueParser::Feed2(char *p)
|
|||||||
cue_add_tag(*current_tag, type, p);
|
cue_add_tag(*current_tag, type, p);
|
||||||
} else if (strcmp(command, "TITLE") == 0) {
|
} else if (strcmp(command, "TITLE") == 0) {
|
||||||
if (state == HEADER)
|
if (state == HEADER)
|
||||||
cue_add_tag(*tag, TAG_ALBUM, p);
|
cue_add_tag(*header_tag, TAG_ALBUM, p);
|
||||||
else if (state == TRACK)
|
else if (state == TRACK)
|
||||||
cue_add_tag(*current->tag, TAG_TITLE, p);
|
cue_add_tag(*current->tag, TAG_TITLE, p);
|
||||||
} else if (strcmp(command, "FILE") == 0) {
|
} else if (strcmp(command, "FILE") == 0) {
|
||||||
@ -251,7 +251,7 @@ CueParser::Feed2(char *p)
|
|||||||
state = TRACK;
|
state = TRACK;
|
||||||
current = Song::NewRemote(filename.c_str());
|
current = Song::NewRemote(filename.c_str());
|
||||||
assert(current->tag == nullptr);
|
assert(current->tag == nullptr);
|
||||||
current->tag = new Tag(*tag);
|
current->tag = new Tag(*header_tag);
|
||||||
current->tag->AddItem(TAG_TRACK, nr);
|
current->tag->AddItem(TAG_TRACK, nr);
|
||||||
last_updated = false;
|
last_updated = false;
|
||||||
} else if (state == IGNORE_TRACK) {
|
} else if (state == IGNORE_TRACK) {
|
||||||
|
@ -56,7 +56,10 @@ class CueParser {
|
|||||||
IGNORE_TRACK,
|
IGNORE_TRACK,
|
||||||
} state;
|
} state;
|
||||||
|
|
||||||
Tag *tag;
|
/**
|
||||||
|
* Tags read from the CUE header.
|
||||||
|
*/
|
||||||
|
Tag *header_tag;
|
||||||
|
|
||||||
std::string filename;
|
std::string filename;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user