From c6169ec4a176b27acce068417e3c7e89b2c2663c Mon Sep 17 00:00:00 2001 From: jrl Date: Tue, 12 Dec 2006 05:37:07 +0000 Subject: [PATCH] 2006-12-12 James Livingston * sources/rb-ipod-source.c: (rb_ipod_load_songs): hopefully fix some corrupt-ipod-db issues. from #358855 --- ChangeLog | 5 +++++ sources/rb-ipod-source.c | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0789a4f8..e708badd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-12-12 James Livingston + * sources/rb-ipod-source.c: (rb_ipod_load_songs): hopefully fix + some corrupt-ipod-db issues. from #358855 + +2006-12-12 James Livingston + * widgets/rb-entry-view.c: (rb_entry_view_set_model_internal): don't try to re-sort the model if it's NULL. Fixes #367646 diff --git a/sources/rb-ipod-source.c b/sources/rb-ipod-source.c index aa52161e..7436a5cb 100644 --- a/sources/rb-ipod-source.c +++ b/sources/rb-ipod-source.c @@ -562,12 +562,17 @@ rb_ipod_load_songs (RBiPodSource *source) priv->ipod_db = itdb_parse (priv->ipod_mount_path, NULL); priv->entry_map = g_hash_table_new (g_direct_hash, g_direct_equal); if ((priv->ipod_db != NULL) && (priv->entry_map != NULL)) { + Itdb_Playlist *mpl; + /* FIXME: we could set a different icon depending on the iPod * model */ - g_object_set (RB_SOURCE (source), - "name", itdb_playlist_mpl (priv->ipod_db)->name, - NULL); + mpl = itdb_playlist_mpl (priv->ipod_db); + if (mpl && mpl->name) { + g_object_set (RB_SOURCE (source), + "name", mpl->name, + NULL); + } priv->load_idle_id = g_idle_add ((GSourceFunc)load_ipod_db_idle_cb, source); } -- 2.11.4.GIT