aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/ExtM3uPlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-03 12:21:22 +0100
committerMax Kellermann <max@duempel.org>2013-12-03 12:21:22 +0100
commitd91f6dc1b566e78a2f957f855b11b806ba9e3857 (patch)
tree76d7d099c256c480a4b6db1204a29a93583981d1 /src/playlist/ExtM3uPlaylistPlugin.cxx
parent78c0d8cc886e1989650248f2727f50f249e3ef0e (diff)
downloadmpd-d91f6dc1b566e78a2f957f855b11b806ba9e3857.tar.gz
mpd-d91f6dc1b566e78a2f957f855b11b806ba9e3857.tar.xz
mpd-d91f6dc1b566e78a2f957f855b11b806ba9e3857.zip
playlist/extm3u: use class TagBuilder
Diffstat (limited to 'src/playlist/ExtM3uPlaylistPlugin.cxx')
-rw-r--r--src/playlist/ExtM3uPlaylistPlugin.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/playlist/ExtM3uPlaylistPlugin.cxx b/src/playlist/ExtM3uPlaylistPlugin.cxx
index a9c22a933..d48db1ed2 100644
--- a/src/playlist/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/ExtM3uPlaylistPlugin.cxx
@@ -23,6 +23,7 @@
#include "SongEnumerator.hxx"
#include "Song.hxx"
#include "tag/Tag.hxx"
+#include "tag/TagBuilder.hxx"
#include "util/StringUtil.hxx"
#include "TextInputStream.hxx"
@@ -72,7 +73,6 @@ extm3u_parse_tag(const char *line)
long duration;
char *endptr;
const char *name;
- Tag *tag;
duration = strtol(line, &endptr, 10);
if (endptr[0] != ',')
@@ -89,16 +89,16 @@ extm3u_parse_tag(const char *line)
object */
return NULL;
- tag = new Tag();
- tag->time = duration;
+ TagBuilder tag;
+ tag.SetTime(duration);
/* unfortunately, there is no real specification for the
EXTM3U format, so we must assume that the string after the
comma is opaque, and is just the song name*/
if (*name != 0)
- tag->AddItem(TAG_NAME, name);
+ tag.AddItem(TAG_NAME, name);
- return tag;
+ return tag.Commit();
}
Song *