0e5f56a
From ed82695ebbc47de9f66e3cf7e78a71b16b32d58e Mon Sep 17 00:00:00 2001
0e5f56a
From: Christophe Fergeau <teuf@gnome.org>
0e5f56a
Date: Sat, 4 Sep 2010 17:59:37 +0200
0e5f56a
Subject: [PATCH 2/2] Revert "Fix for creation of blank playlist on 80GB ipod video"
0e5f56a
0e5f56a
This reverts commit 1252bc0e18c396b2cb5e1bd5369f17403ca181aa.
0e5f56a
0e5f56a
On an iPod Video with 1.2.1 firmware:
0e5f56a
-  With 1252bc0, no songs, no videos, no playlists at
0e5f56a
all (except the On-the-go playlist)
0e5f56a
-  Before 1252bc0, songs/videos/playlists are visible, but
0e5f56a
there is an additional unnamed blank music playlist.
0e5f56a
0e5f56a
With latest firmware, none of these issues show up. The blank playlist
0e5f56a
bug is better than the empty ipod bug, so let's revert to the earlier
0e5f56a
behaviour and if someone encounters the blank playlist issue, we just
0e5f56a
have to remember to tell him to update his firmware. For the record,
0e5f56a
it seems only writing 4 mhsds on an iPod Video with firmware 1.2.1
0e5f56a
avoids these 2 issues too.
0e5f56a
---
0e5f56a
 src/itdb_itunesdb.c |   17 ++++++++---------
0e5f56a
 1 files changed, 8 insertions(+), 9 deletions(-)
0e5f56a
0e5f56a
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c
0e5f56a
index e473fb2..5041676 100644
0e5f56a
--- a/src/itdb_itunesdb.c
0e5f56a
+++ b/src/itdb_itunesdb.c
0e5f56a
@@ -5761,15 +5761,6 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb,
0e5f56a
 	goto err;
0e5f56a
     }
0e5f56a
 
0e5f56a
-    /* write albums (mhsd type 4) */
0e5f56a
-    if (!write_mhsd_albums (fexp)) {
0e5f56a
-        g_set_error (&fexp->error,
0e5f56a
-                    ITDB_FILE_ERROR,
0e5f56a
-                    ITDB_FILE_ERROR_ITDB_CORRUPT,
0e5f56a
-                    _("Error writing list of albums (mhsd type 4)"));
0e5f56a
-        goto err;
0e5f56a
-    }
0e5f56a
-
0e5f56a
     /* write special podcast version mhsd (mhsd type 3) */
0e5f56a
     if (!fexp->error && !write_mhsd_playlists (fexp, 3)) {
0e5f56a
 	g_set_error (&fexp->error,
0e5f56a
@@ -5787,6 +5778,14 @@ static gboolean itdb_write_file_internal (Itdb_iTunesDB *itdb,
0e5f56a
 	goto err;
0e5f56a
     }
0e5f56a
 
0e5f56a
+    /* write albums (mhsd type 4) */
0e5f56a
+    if (!write_mhsd_albums (fexp)) {
0e5f56a
+	g_set_error (&fexp->error,
0e5f56a
+		     ITDB_FILE_ERROR,
0e5f56a
+		     ITDB_FILE_ERROR_ITDB_CORRUPT,
0e5f56a
+		     _("Error writing list of albums (mhsd type 4)"));
0e5f56a
+	goto err;
0e5f56a
+    }
0e5f56a
     /* write artists (mhsd type 8) */
0e5f56a
     if (!fexp->error && !write_mhsd_artists (fexp)) {
0e5f56a
 	g_set_error (&fexp->error,
0e5f56a
-- 
0e5f56a
1.7.2.2
0e5f56a