commit 7311a51596a5bdbf704167bea117cf603193c043
Author: Adam Broschinski <[email protected]>
Date: Wed Apr 14 21:10:01 2010 +0200
Update playlist->num before writing.
This patch makes prepare_itdb_for_write update the number of tracks
in each playlist. If those numbers are 0 the shuffle will not
acknowledge the playlist.
src/itdb_itunesdb.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
index 7a8a2e8..e6e92f5 100644
--- a/src/itdb_itunesdb.c
+++ b/src/itdb_itunesdb.c
@@ -5525,8 +5525,10 @@ static gboolean itdb_composer_equal (gconstpointer v1,
gconstpointer v2)
static void prepare_itdb_for_write (FExport *fexp)
{
GList *gl;
+ GList *pl;
Itdb_iTunesDB *itdb;
Itdb_Playlist *mpl;
+ Itdb_Playlist *playlist;
guint album_id = 1;
guint artist_id = 1;
guint composer_id = 1;
@@ -5614,6 +5616,13 @@ static void prepare_itdb_for_write (FExport *fexp)
}
}
}
+
+ /* Make sure playlist->num is correct */
+ for (pl = itdb->playlists; pl; pl = pl->next) {
+ playlist = pl->data;
+ g_return_if_fail (playlist);
+ playlist->num = itdb_playlist_tracks_number (playlist);
+ }
}
static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb,
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2