diff options
author | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2007-08-18 06:31:24 +0000 |
---|---|---|
committer | Jorg Schuler <jcsjcs@users.sourceforge.net> | 2007-08-18 06:31:24 +0000 |
commit | a7431ec30f884f67db894b9dfbd1c55b139a1b65 (patch) | |
tree | 3258a7e74b01bcea09db99c8b0e5fa774e207dc4 /src | |
parent | eaafd565eaf3e88ebef99362820d2d88647ed331 (diff) | |
download | libgpod-a7431ec30f884f67db894b9dfbd1c55b139a1b65.tar.gz libgpod-a7431ec30f884f67db894b9dfbd1c55b139a1b65.tar.xz libgpod-a7431ec30f884f67db894b9dfbd1c55b139a1b65.zip |
* src/itdb_itunesdb (itdb_parse): don't call
ipod_parse_artwork_db() if iTunesDB was not read successfully.
git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1682 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src')
-rw-r--r-- | src/itdb_itunesdb.c | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/src/itdb_itunesdb.c b/src/itdb_itunesdb.c index b6b0cab..e6160e1 100644 --- a/src/itdb_itunesdb.c +++ b/src/itdb_itunesdb.c @@ -2937,33 +2937,36 @@ Itdb_iTunesDB *itdb_parse (const gchar *mp, GError **error) itdb_set_mountpoint (itdb, mp); itdb->filename = filename; success = itdb_parse_internal (itdb, error); - if (!success) { + if (success) + { + /* We don't test the return value of ipod_parse_artwork_db + * since the database content will be consistent even if + * we fail to get the various thumbnails, we ignore the + * error since older ipods don't have thumbnails. + + * FIXME: this probably should go into itdb_parse_file, + * but I don't understand its purpose, and + * ipod_parse_artwork_db needs the mountpoint field from + * the itdb, which may not be available in the other + * function + + * JCS: itdb_parse_file is used to read local repositories + * (usually repositories stored in + * ~/.gtkpod). ipod_parse_artwork_db (and the + * corresponding artbook write function) should probably + * be expanded to look for (write) the required files into + * the same directory as itdb->filename in case + * itdb->mountpoint does not exist. Because several local + * repositories may exist in the same directory, the names + * should be modified by the repository name. + */ + ipod_parse_artwork_db (itdb); + } + else + { itdb_free (itdb); itdb = NULL; } - /* We don't test the return value of ipod_parse_artwork_db - * since the database content will be consistent even if - * we fail to get the various thumbnails, we ignore the - * error since older ipods don't have thumbnails. - - * FIXME: this probably should go into itdb_parse_file, - * but I don't understand its purpose, and - * ipod_parse_artwork_db needs the mountpoint field from - * the itdb, which may not be available in the other - * function - - * JCS: itdb_parse_file is used to read local repositories - * (usually repositories stored in - * ~/.gtkpod). ipod_parse_artwork_db (and the - * corresponding artbook write function) should probably - * be expanded to look for (write) the required files into - * the same directory as itdb->filename in case - * itdb->mountpoint does not exist. Because several local - * repositories may exist in the same directory, the names - * should be modified by the repository name. - */ - ipod_parse_artwork_db (itdb); - } } else |