commit af1ea631dab4c4b30100fb0615d66f23f360a60a
Author: Christophe Fergeau <[email protected]>
Date:   Sat Oct 24 11:52:09 2009 +0200

    test-cp: parse existing database instead of creating a new one

 tests/test-cp.cc |   23 ++++-------------------
 1 files changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/tests/test-cp.cc b/tests/test-cp.cc
index 9ff4fed..d2f2337 100644
--- a/tests/test-cp.cc
+++ b/tests/test-cp.cc
@@ -101,24 +101,6 @@ copy_file (Itdb_iTunesDB *db, const char *filename, GError 
**error)
        }
 }
 
-static Itdb_iTunesDB *
-itdb_create (const char *mountpoint)
-{
-       Itdb_Playlist *mpl;
-       Itdb_iTunesDB *db;
-
-       db = itdb_new ();
-       if (db == NULL) {
-               return NULL;
-       }
-       itdb_set_mountpoint (db, mountpoint);
-       mpl = itdb_playlist_new ("iPod", FALSE);
-       itdb_playlist_set_mpl (mpl);
-       itdb_playlist_add (db, mpl, -1);
-
-       return db;
-}
-
 int main (int argc, char **argv)
 {
        Itdb_iTunesDB *db;
@@ -130,7 +112,10 @@ int main (int argc, char **argv)
                exit (1);
        }
 
-       db = itdb_create (argv[1]);
+       db = itdb_parse (argv[1], NULL);
+       if (db == NULL) {
+               return NULL;
+       }
 
        if (db == NULL) {
                g_print ("Error creating iPod database\n");

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to