Commit 01de768f authored by Max Kellermann's avatar Max Kellermann

playlist/soundcloud: use class TagBuilder

parent 73a861ab
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "ConfigData.hxx" #include "ConfigData.hxx"
#include "InputStream.hxx" #include "InputStream.hxx"
#include "Song.hxx" #include "Song.hxx"
#include "tag/Tag.hxx" #include "tag/TagBuilder.hxx"
#include "util/StringUtil.hxx" #include "util/StringUtil.hxx"
#include "util/Error.hxx" #include "util/Error.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
...@@ -215,11 +215,11 @@ static int handle_end_map(void *ctx) ...@@ -215,11 +215,11 @@ static int handle_end_map(void *ctx)
s = Song::NewRemote(u); s = Song::NewRemote(u);
g_free(u); g_free(u);
Tag *t = new Tag(); TagBuilder tag;
t->time = data->duration / 1000; tag.SetTime(data->duration / 1000);
if (data->title != nullptr) if (data->title != nullptr)
t->AddItem(TAG_NAME, data->title); tag.AddItem(TAG_NAME, data->title);
s->tag = t; s->tag = tag.Commit();
data->songs.emplace_front(s); data->songs.emplace_front(s);
......
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