aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBart Nagel <bart@tremby.net>2009-07-09 13:28:08 +0100
committerMax Kellermann <max@duempel.org>2009-07-09 19:00:41 +0200
commit8ae9b45da06fc48a54e90a7394dbe7592deb36a2 (patch)
treeeb87b2b97872dcfcc2a9699a0d29da3c91000443 /src
parent1eebbc746f715e32f165ed62fdc57447a5903b21 (diff)
downloadmpd-8ae9b45da06fc48a54e90a7394dbe7592deb36a2.tar.gz
mpd-8ae9b45da06fc48a54e90a7394dbe7592deb36a2.tar.xz
mpd-8ae9b45da06fc48a54e90a7394dbe7592deb36a2.zip
Implement ArtistSort tag
Diffstat (limited to '')
-rw-r--r--src/tag.c1
-rw-r--r--src/tag.h1
-rw-r--r--src/tag_id3.c8
3 files changed, 9 insertions, 1 deletions
diff --git a/src/tag.c b/src/tag.c
index 8648c0f77..5d473322e 100644
--- a/src/tag.c
+++ b/src/tag.c
@@ -43,6 +43,7 @@ static struct {
const char *tag_item_names[TAG_NUM_OF_ITEM_TYPES] = {
"Artist",
+ [TAG_ARTIST_SORT] = "ArtistSort",
"Album",
"AlbumArtist",
[TAG_ALBUM_ARTIST_SORT] = "AlbumArtistSort",
diff --git a/src/tag.h b/src/tag.h
index d68753004..451e13112 100644
--- a/src/tag.h
+++ b/src/tag.h
@@ -32,6 +32,7 @@
*/
enum tag_type {
TAG_ITEM_ARTIST,
+ TAG_ARTIST_SORT,
TAG_ITEM_ALBUM,
TAG_ITEM_ALBUM_ARTIST,
TAG_ALBUM_ARTIST_SORT,
diff --git a/src/tag_id3.c b/src/tag_id3.c
index 8f48e980b..d8e96d1c2 100644
--- a/src/tag_id3.c
+++ b/src/tag_id3.c
@@ -42,8 +42,12 @@
# define ID3_FRAME_DISC "TPOS"
# endif
+#ifndef ID3_FRAME_ARTIST_SORT
+#define ID3_FRAME_ARTIST_SORT "TSOP"
+#endif
+
#ifndef ID3_FRAME_ALBUM_ARTIST_SORT
-#define ID3_FRAME_ALBUM_ARTIST_SORT "TSO2"
+#define ID3_FRAME_ALBUM_ARTIST_SORT "TSO2" /* this one is unofficial, introduced by Itunes */
#endif
#ifndef ID3_FRAME_ALBUM_ARTIST
@@ -329,6 +333,8 @@ struct tag *tag_id3_import(struct id3_tag * tag)
getID3Info(tag, ID3_FRAME_ARTIST, TAG_ITEM_ARTIST, ret);
getID3Info(tag, ID3_FRAME_ALBUM_ARTIST,
TAG_ITEM_ALBUM_ARTIST, ret);
+ getID3Info(tag, ID3_FRAME_ARTIST_SORT,
+ TAG_ARTIST_SORT, ret);
getID3Info(tag, ID3_FRAME_ALBUM_ARTIST_SORT,
TAG_ALBUM_ARTIST_SORT, ret);
getID3Info(tag, ID3_FRAME_TITLE, TAG_ITEM_TITLE, ret);