aboutsummaryrefslogtreecommitdiffstats
path: root/src/DespotifyUtils.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/DespotifyUtils.cxx')
-rw-r--r--src/DespotifyUtils.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/DespotifyUtils.cxx b/src/DespotifyUtils.cxx
index c9a1edf0c..c45722379 100644
--- a/src/DespotifyUtils.cxx
+++ b/src/DespotifyUtils.cxx
@@ -18,7 +18,7 @@
*/
#include "DespotifyUtils.hxx"
-#include "tag.h"
+#include "Tag.hxx"
#include "conf.h"
#include <glib.h>
@@ -77,14 +77,14 @@ void mpd_despotify_unregister_callback(void (*cb)(struct despotify_session *, in
}
-struct tag *mpd_despotify_tag_from_track(struct ds_track *track)
+Tag *
+mpd_despotify_tag_from_track(struct ds_track *track)
{
char tracknum[20];
char comment[80];
char date[20];
- struct tag *tag;
- tag = tag_new();
+ Tag *tag = new Tag();
if (!track->has_meta_data)
return tag;
@@ -93,12 +93,12 @@ struct tag *mpd_despotify_tag_from_track(struct ds_track *track)
g_snprintf(date, sizeof(date), "%d", track->year);
g_snprintf(comment, sizeof(comment), "Bitrate %d Kbps, %sgeo restricted",
track->file_bitrate / 1000, track->geo_restricted ? "" : "not ");
- tag_add_item(tag, TAG_TITLE, track->title);
- tag_add_item(tag, TAG_ARTIST, track->artist->name);
- tag_add_item(tag, TAG_TRACK, tracknum);
- tag_add_item(tag, TAG_ALBUM, track->album);
- tag_add_item(tag, TAG_DATE, date);
- tag_add_item(tag, TAG_COMMENT, comment);
+ tag->AddItem(TAG_TITLE, track->title);
+ tag->AddItem(TAG_ARTIST, track->artist->name);
+ tag->AddItem(TAG_TRACK, tracknum);
+ tag->AddItem(TAG_ALBUM, track->album);
+ tag->AddItem(TAG_DATE, date);
+ tag->AddItem(TAG_COMMENT, comment);
tag->time = track->length / 1000;
return tag;