Commit 51761a02 authored by W. Michael Petullo's avatar W. Michael Petullo
Browse files

Fix issues related to sort names and iTunes '09

Protect against NULL artist or album sort names. Start adding support for
iTunes '09. See also https://bugzilla.gnome.org/show_bug.cgi?id=616669,
Move DAAP code to use common libdmapsharing for more information on
the former.
parent cbaa1805
18 May 2010 W. Michael Petullo <mike@flyn.org>
* Add another case to dpap-share.c:build_filter() in an attempt
to support iTunes '09.
16 May 2010 W. Michael Petullo <mike@flyn.org>
* Documentation work.
......
iTunes '09, segfault:
dmap_container_record_get_entry_count:86
_dmap_share_add_playlist_to_mlcl:1016
Combine daap- and dpap-share.c filter parser (see filterstr). USE DPAP's
BECUASE IT IS NEWER!
Ensure client test catches newly shared files?
Do transcode based on client?
......
......@@ -698,12 +698,18 @@ add_entry_to_mlcl (gpointer id, DMAPRecord *record, gpointer _mb)
if (_dmap_share_client_requested (mb->bits, SONG_SORT_ARTIST)) {
gchar *sort_artist;
g_object_get (record, "sort-artist", &sort_artist, NULL);
dmap_structure_add (mlit, DMAP_CC_ASSA, sort_artist);
if (sort_artist)
dmap_structure_add (mlit, DMAP_CC_ASSA, sort_artist);
else
g_warning ("Sort artist requested but not available");
}
if (_dmap_share_client_requested (mb->bits, SONG_SORT_ALBUM)) {
gchar *sort_album;
g_object_get (record, "sort-album", &sort_album, NULL);
dmap_structure_add (mlit, DMAP_CC_ASSU, sort_album);
if (sort_album)
dmap_structure_add (mlit, DMAP_CC_ASSU, sort_album);
else
g_warning ("Sort album requested but not available");
}
......
......@@ -481,12 +481,20 @@ build_filter (gchar *filterstr)
* 'dmap.itemid:1000','dmap:itemid:1001'
* or
* 'daap.songgenre:Foo'+'daap.songartist:Bar'+'daap.songalbum:Baz'
* or (iPhoto '09)
* ('daap.idemid:1000','dmap:itemid:1001')
*/
size_t len;
GSList *list = NULL;
g_debug ("Filter string is %s.", filterstr);
len = strlen (filterstr);
filterstr = *filterstr == '(' ? filterstr + 1 : filterstr;
/* FIXME: I thought this should be -1, but there is a trailing ' ' in iTunes '09: */
filterstr[len - 2] = filterstr[len - 2] == ')' ? 0x00 : filterstr[len - 2];
if (filterstr != NULL) {
int i;
gchar **t1 = g_strsplit (filterstr, ",", 0);
......
EXTRA_DIST = \
test.jpeg \
another-test.png \
test.mp3
test.mp3 \
another-test.mp3
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment