Commit 3e970581 authored by Max Kellermann's avatar Max Kellermann

playlist/xspf: move location.empty() check to _start_element()

parent 51b1dd86
...@@ -107,7 +107,7 @@ xspf_start_element(void *user_data, const XML_Char *element_name, ...@@ -107,7 +107,7 @@ xspf_start_element(void *user_data, const XML_Char *element_name,
case XspfParser::TRACK: case XspfParser::TRACK:
if (strcmp(element_name, "location") == 0) if (strcmp(element_name, "location") == 0)
parser->state = XspfParser::LOCATION; parser->state = XspfParser::LOCATION;
else else if (!parser->location.empty())
parser->tag_type = tag_table_lookup(xspf_tag_elements, parser->tag_type = tag_table_lookup(xspf_tag_elements,
element_name); element_name);
...@@ -169,8 +169,7 @@ xspf_char_data(void *user_data, const XML_Char *s, int len) ...@@ -169,8 +169,7 @@ xspf_char_data(void *user_data, const XML_Char *s, int len)
break; break;
case XspfParser::TRACK: case XspfParser::TRACK:
if (!parser->location.empty() && if (parser->tag_type != TAG_NUM_OF_ITEM_TYPES)
parser->tag_type != TAG_NUM_OF_ITEM_TYPES)
parser->tag_builder.AddItem(parser->tag_type, parser->tag_builder.AddItem(parser->tag_type,
StringView(s, len)); StringView(s, len));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment