[Musicpd-dev-team] [PATCH] Implement ArtistSort tag
--- src/tag.c |1 + src/tag.h |1 + src/tag_id3.c |8 +++- 3 files changed, 9 insertions(+), 1 deletions(-) diff --git a/src/tag.c b/src/tag.c index 8648c0f..5d47332 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 d687530..451e131 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 8f48e98..d8e96d1 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); -- 1.6.0.4 signature.asc Description: Digital signature -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
[Musicpd-dev-team] [PATCH] flac: load external cue sheet when no internal one
External cue sheet file for file.flac should be named as file.flac.cue. --- src/decoder/flac_plugin.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/decoder/flac_plugin.c b/src/decoder/flac_plugin.c index 965a8b4..41e0f3a 100644 --- a/src/decoder/flac_plugin.c +++ b/src/decoder/flac_plugin.c @@ -300,6 +300,8 @@ flac_cue_tag_load(const char *file) FLAC__uint64 track_time = 0; #ifdef HAVE_CUE /* libcue */ FLAC__StreamMetadata* vc = FLAC__metadata_object_new(FLAC__METADATA_TYPE_VORBIS_COMMENT); +char* cs_filename; +FILE* cs_file; #endif /* libcue */ FLAC__StreamMetadata* si = FLAC__metadata_object_new(FLAC__METADATA_TYPE_STREAMINFO); FLAC__StreamMetadata* cs = FLAC__metadata_object_new(FLAC__METADATA_TYPE_CUESHEET); @@ -328,6 +330,23 @@ flac_cue_tag_load(const char *file) } FLAC__metadata_object_delete(vc); } + +if (tag == NULL) +{ +cs_filename = g_strconcat(file, .cue, NULL); + +if (cs_filename != NULL) +{ +cs_file = fopen(cs_filename, rt); +g_free(cs_filename); + +if (cs_file != NULL) +{ +tag = cue_tag_file(cs_file, tnum); +fclose(cs_file); +} +} +} #endif /* libcue */ if (tag == NULL) -- 1.6.3.2 -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Implement ArtistSort tag
On 2009/07/09 14:28, Bart Nagel b...@tremby.net wrote: --- src/tag.c |1 + src/tag.h |1 + src/tag_id3.c |8 +++- 3 files changed, 9 insertions(+), 1 deletions(-) Merged, thanks. -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Implement ArtistSort tag
I see that ArtistSort is some itunes intrudeced tag. There also appears to be an AlbumArtistSort. What are these used for and how are they different from the non-Sort versions? Just curious, not a criticism. :-) Thanks, -warren On Thu, Jul 9, 2009 at 1:02 PM, Max Kellermann m...@duempel.org wrote: On 2009/07/09 14:28, Bart Nagel b...@tremby.net wrote: --- src/tag.c |1 + src/tag.h |1 + src/tag_id3.c |8 +++- 3 files changed, 9 insertions(+), 1 deletions(-) Merged, thanks. -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge ___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team
Re: [Musicpd-dev-team] [PATCH] Implement ArtistSort tag
A simple use would be turning The Rolling Stones into Rolling Stones, The for the purposes of sorting but not display. Some of this can be done automatically, of course, but not all - there will always be special cases or other languages it doesn't know about. An example for AlbumArtist(Sort) would be the Blues Brothers soundtrack, where it's reasonable to access the entire album by browsing through artist The Blues Brothers (sorted as Blues Brothers, The), but there are tracks with artists like The Blues Brothers and Ray Charles. Jeffrey On Thu, Jul 9, 2009 at 12:48 PM, Warren Dukes warren.du...@gmail.comwrote: I see that ArtistSort is some itunes intrudeced tag. There also appears to be an AlbumArtistSort. What are these used for and how are they different from the non-Sort versions? Just curious, not a criticism. :-) Thanks, -warren -- Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge___ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team