commit ae59138ba9c89e523065386e3e5e67efb2676d3c
Author: Christophe Fergeau <[email protected]>
Date:   Sun Dec 20 23:11:20 2009 +0100

    [sqlite] add new nano5g fields to container table

 src/itdb_sqlite.c         |    4 +++-
 src/itdb_sqlite_queries.h |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index 393799e..b755a38 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -482,7 +482,7 @@ static int mk_Library(Itdb_iTunesDB *itdb,
        goto leave;
     }
     if (SQLITE_OK != sqlite3_prepare_v2(db, "INSERT INTO \"container\" "
-           
"VALUES(?,?,?,:name,?,?,?,?,?,?,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);",
 -1, &stmt_container, NULL)) {
+           
"VALUES(?,?,?,?,:name,?,?,?,?,?,?,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);",
 -1, &stmt_container, NULL)) {
        fprintf(stderr, "[%s] sqlite3_prepare error: %s\n", __func__, 
sqlite3_errmsg(db));
        goto leave;
     }
@@ -643,6 +643,8 @@ static int mk_Library(Itdb_iTunesDB *itdb,
        }
        /* date_created */
        sqlite3_bind_int(stmt_container, ++idx, timeconv(pl->timestamp));
+       /* date_modified */
+       sqlite3_bind_int(stmt_container, ++idx, timeconv(pl->timestamp));
        /* name */
        sqlite3_bind_text(stmt_container, ++idx, pl->name, -1, SQLITE_STATIC);
        /* name order */
diff --git a/src/itdb_sqlite_queries.h b/src/itdb_sqlite_queries.h
index 616ad64..4100c61 100644
--- a/src/itdb_sqlite_queries.h
+++ b/src/itdb_sqlite_queries.h
@@ -57,7 +57,7 @@ static const char Library_create[] =
        "CREATE TABLE store_info (item_pid INTEGER NOT NULL, store_kind 
INTEGER, date_purchased INTEGER DEFAULT 0, date_released INTEGER DEFAULT 0, 
account_id INTEGER, key_versions INTEGER, key_platform_id INTEGER, key_id 
INTEGER, key_id2 INTEGER, store_item_id INTEGER, artist_id INTEGER, composer_id 
INTEGER, genre_id INTEGER, playlist_id INTEGER, storefront_id INTEGER, 
store_link_id INTEGER, relevance REAL, popularity REAL, PRIMARY KEY 
(item_pid));" \
        "CREATE TABLE store_link (id INTEGER NOT NULL, url TEXT, PRIMARY KEY 
(id));" \
        "CREATE TABLE podcast_info (item_pid INTEGER NOT NULL, date_released 
INTEGER DEFAULT 0, external_guid TEXT, feed_url TEXT, feed_keywords TEXT, 
PRIMARY KEY (item_pid));" \
-       "CREATE TABLE container (pid INTEGER NOT NULL, distinguished_kind 
INTEGER, date_created INTEGER, name TEXT, name_order INTEGER, parent_pid 
INTEGER, media_kinds INTEGER, workout_template_id INTEGER, is_hidden INTEGER, 
smart_is_folder INTEGER, smart_is_dynamic INTEGER, smart_is_filtered INTEGER, 
smart_is_genius INTEGER, smart_enabled_only INTEGER, smart_is_limited INTEGER, 
smart_limit_kind INTEGER, smart_limit_order INTEGER, smart_limit_value INTEGER, 
smart_reverse_limit_order INTEGER, smart_criteria BLOB, PRIMARY KEY (pid));" \
+       "CREATE TABLE container (pid INTEGER NOT NULL, distinguished_kind 
INTEGER, date_created INTEGER, date_modified INTEGER, name TEXT, name_order 
INTEGER, parent_pid INTEGER, media_kinds INTEGER, workout_template_id INTEGER, 
is_hidden INTEGER, smart_is_folder INTEGER, smart_is_dynamic INTEGER, 
smart_is_filtered INTEGER, smart_is_genius INTEGER, smart_enabled_only INTEGER, 
smart_is_limited INTEGER, smart_limit_kind INTEGER, smart_limit_order INTEGER, 
smart_limit_value INTEGER, smart_reverse_limit_order INTEGER, smart_criteria 
BLOB, description TEXT, PRIMARY KEY (pid));" \
        "CREATE TABLE item_to_container (item_pid INTEGER, container_pid 
INTEGER, physical_order INTEGER, shuffle_order INTEGER);" \
        "CREATE TABLE container_seed (container_pid INTEGER NOT NULL, item_pid 
INTEGER NOT NULL, seed_order INTEGER DEFAULT 0, UNIQUE 
(container_pid,item_pid));" \
        "CREATE TABLE album (pid INTEGER NOT NULL, kind INTEGER, artwork_status 
INTEGER, artwork_item_pid INTEGER, artist_pid INTEGER, user_rating INTEGER, 
name TEXT, name_order INTEGER, all_compilations INTEGER, feed_url TEXT, 
season_number INTEGER, PRIMARY KEY (pid));" \

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
gtkpod-cvs2 mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gtkpod-cvs2

Reply via email to