summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskidoo23 <18039569+skidoo23@users.noreply.github.com>2018-10-17 20:33:03 +0200
committerskidoo23 <18039569+skidoo23@users.noreply.github.com>2018-10-17 20:33:03 +0200
commitfbea965c70df39fbf649db71d3d37a0e0b108e25 (patch)
tree268b20f885f0d5c95c16dbb5060475b76983410a /src
parenta2cd66ed6fb908b55fd9f86e2b0b4f624490af22 (diff)
tag: new tag Label
Diffstat (limited to 'src')
-rw-r--r--src/tag/Id3Scan.cxx21
-rw-r--r--src/tag/Names.c3
-rw-r--r--src/tag/Type.h3
3 files changed, 18 insertions, 9 deletions
diff --git a/src/tag/Id3Scan.cxx b/src/tag/Id3Scan.cxx
index aa1caba69..7b8df9299 100644
--- a/src/tag/Id3Scan.cxx
+++ b/src/tag/Id3Scan.cxx
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2017 The Music Player Daemon Project
+ * Copyright 2003-2018 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -38,12 +38,13 @@
#include <string.h>
#include <stdlib.h>
-# ifndef ID3_FRAME_COMPOSER
-# define ID3_FRAME_COMPOSER "TCOM"
-# endif
-# ifndef ID3_FRAME_DISC
-# define ID3_FRAME_DISC "TPOS"
-# endif
+#ifndef ID3_FRAME_COMPOSER
+#define ID3_FRAME_COMPOSER "TCOM"
+#endif
+
+#ifndef ID3_FRAME_DISC
+#define ID3_FRAME_DISC "TPOS"
+#endif
#ifndef ID3_FRAME_ARTIST_SORT
#define ID3_FRAME_ARTIST_SORT "TSOP"
@@ -61,6 +62,10 @@
#define ID3_FRAME_ORIGINAL_RELEASE_DATE "TDOR"
#endif
+#ifndef ID3_FRAME_LABEL
+#define ID3_FRAME_LABEL "TPUB"
+#endif
+
gcc_pure
static id3_utf8_t *
tag_id3_getstring(const struct id3_frame *frame, unsigned i) noexcept
@@ -317,6 +322,8 @@ scan_id3_tag(struct id3_tag *tag, TagHandler &handler) noexcept
handler);
tag_id3_import_text(tag, ID3_FRAME_DISC, TAG_DISC,
handler);
+ tag_id3_import_text(tag, ID3_FRAME_LABEL, TAG_LABEL,
+ handler);
tag_id3_import_musicbrainz(tag, handler);
tag_id3_import_ufid(tag, handler);
diff --git a/src/tag/Names.c b/src/tag/Names.c
index 5657e5f80..5a4de3b4a 100644
--- a/src/tag/Names.c
+++ b/src/tag/Names.c
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2017 The Music Player Daemon Project
+ * Copyright 2003-2018 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -37,6 +37,7 @@ const char *const tag_item_names[TAG_NUM_OF_ITEM_TYPES] = {
[TAG_PERFORMER] = "Performer",
[TAG_COMMENT] = "Comment",
[TAG_DISC] = "Disc",
+ [TAG_LABEL] = "Label",
/* MusicBrainz tags from http://musicbrainz.org/doc/MusicBrainzTag */
[TAG_MUSICBRAINZ_ARTISTID] = "MUSICBRAINZ_ARTISTID",
diff --git a/src/tag/Type.h b/src/tag/Type.h
index 8e9d603b5..07429688e 100644
--- a/src/tag/Type.h
+++ b/src/tag/Type.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2003-2017 The Music Player Daemon Project
+ * Copyright 2003-2018 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -51,6 +51,7 @@ enum TagType
TAG_PERFORMER,
TAG_COMMENT,
TAG_DISC,
+ TAG_LABEL,
TAG_MUSICBRAINZ_ARTISTID,
TAG_MUSICBRAINZ_ALBUMID,