commit 9904fcf1bf7b673ffc3b8392064bcdd0ff8c466f
Author: Nikias Bassen <[email protected]>
Date:   Sun Dec 6 17:49:27 2009 +0100

    Library.itdb: support for fw 3.1 changes

 src/itdb_sqlite.c         |    6 ++++--
 src/itdb_sqlite_queries.h |    4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index e2bba10..12261fa 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -427,7 +427,7 @@ static int mk_Library(Itdb_iTunesDB *itdb,
     sqlite3_exec(db, "BEGIN;", NULL, NULL, NULL);
 
     fprintf(stderr, "[%s] compiling SQL statements\n", __func__);
-    if (SQLITE_OK != sqlite3_prepare_v2(db, "INSERT INTO \"version_info\" 
VALUES(?,?,?,?,?,?);", -1, &stmt_version_info, NULL)) {
+    if (SQLITE_OK != sqlite3_prepare_v2(db, "INSERT INTO \"version_info\" 
VALUES(?,?,?,?,?,?,?);", -1, &stmt_version_info, NULL)) {
        fprintf(stderr, "[%s] sqlite3_prepare error: %s\n", __func__, 
sqlite3_errmsg(db));
        goto leave;
     }
@@ -477,7 +477,7 @@ static int mk_Library(Itdb_iTunesDB *itdb,
     }
 
     printf("[%s] - inserting into \"version_info\"\n", __func__);
-    /* INSERT INTO "version_info" VALUES(1,2,40,0,0,2); */
+    /* INSERT INTO "version_info" VALUES(1,2,40,0,0,0,2); */
     idx = 0;
     /* id */
     sqlite3_bind_int(stmt_version_info, ++idx, 1);
@@ -493,6 +493,8 @@ static int mk_Library(Itdb_iTunesDB *itdb,
     /* update_level */
     /* This has an unknown meaning. use 0. */
     sqlite3_bind_int(stmt_version_info, ++idx, 0);
+    /* device_update_level, default is 0 */
+    sqlite3_bind_int(stmt_version_info, ++idx, 0);
     /* platform */
     /* TODO: this is a guess: 2 = Windows, 1 = MacOS */
     /* FIXME: needs autoselection based on the itdb library (how to check?) */
diff --git a/src/itdb_sqlite_queries.h b/src/itdb_sqlite_queries.h
index c5f6741..fc26029 100644
--- a/src/itdb_sqlite_queries.h
+++ b/src/itdb_sqlite_queries.h
@@ -48,7 +48,7 @@ static const char Genius_create[] =
 /** creation statement for 'Library.itdb' */
 static const char Library_create[] =
        "BEGIN TRANSACTION;" \
-       "CREATE TABLE version_info (id INTEGER PRIMARY KEY, major INTEGER, 
minor INTEGER, compatibility INTEGER DEFAULT 0, update_level INTEGER DEFAULT 0, 
platform INTEGER DEFAULT 0);" \
+       "CREATE TABLE version_info (id INTEGER PRIMARY KEY, major INTEGER, 
minor INTEGER, compatibility INTEGER DEFAULT 0, update_level INTEGER DEFAULT 0, 
device_update_level INTEGER DEFAULT 0, platform INTEGER DEFAULT 0);" \
        "CREATE TABLE db_info (pid INTEGER NOT NULL, primary_container_pid 
INTEGER, media_folder_url TEXT, audio_language INTEGER, subtitle_language 
INTEGER, bib BLOB, rib BLOB, PRIMARY KEY (pid));" \
        "CREATE TABLE item (pid INTEGER NOT NULL, revision_level INTEGER, 
media_kind INTEGER DEFAULT 0, is_song INTEGER DEFAULT 0, is_audio_book INTEGER 
DEFAULT 0, is_music_video INTEGER DEFAULT 0, is_movie INTEGER DEFAULT 0, 
is_tv_show INTEGER DEFAULT 0, is_ringtone INTEGER DEFAULT 0, is_voice_memo 
INTEGER DEFAULT 0, is_rental INTEGER DEFAULT 0, is_podcast INTEGER DEFAULT 0, 
date_modified INTEGER DEFAULT 0, date_backed_up INTEGER DEFAULT 0, year INTEGER 
DEFAULT 0, content_rating INTEGER DEFAULT 0, content_rating_level INTEGER 
DEFAULT 0, is_compilation INTEGER, is_user_disabled INTEGER DEFAULT 0, 
remember_bookmark INTEGER DEFAULT 0, exclude_from_shuffle INTEGER DEFAULT 0, 
artwork_status INTEGER, artwork_cache_id INTEGER DEFAULT 0, start_time_ms REAL 
DEFAULT 0, stop_time_ms REAL DEFAULT 0, total_time_ms REAL DEFAULT 0, 
total_burn_time_ms REAL, track_number INTEGER DEFAULT 0, track_count INTEGER 
DEFAULT 0, disc_number INTEGER DEFAULT 0, disc_count INTEGER DEFAULT 0, bpm 
INTEGER DEFAULT 0, relative_volume INTEGER, eq_preset TEXT, radio_stream_status 
TEXT, genius_id INTEGER DEFAULT 0, genre_id INTEGER DEFAULT 0, category_id 
INTEGER DEFAULT 0, album_pid INTEGER DEFAULT 0, artist_pid INTEGER DEFAULT 0, 
composer_pid INTEGER DEFAULT 0, title TEXT, artist TEXT, album TEXT, 
album_artist TEXT, composer TEXT, sort_title TEXT, sort_artist TEXT, sort_album 
TEXT, sort_album_artist TEXT, sort_composer TEXT, title_order INTEGER, 
artist_order INTEGER, album_order INTEGER, genre_order INTEGER, composer_order 
INTEGER, album_artist_order INTEGER, album_by_artist_order INTEGER, 
series_name_order INTEGER, comment TEXT, grouping TEXT, description TEXT, 
description_long TEXT, PRIMARY KEY (pid));" \
        "CREATE TABLE avformat_info (item_pid INTEGER NOT NULL, sub_id INTEGER 
NOT NULL DEFAULT 0, audio_format INTEGER, bit_rate INTEGER DEFAULT 0, 
sample_rate REAL DEFAULT 0, duration INTEGER, gapless_heuristic_info INTEGER, 
gapless_encoding_delay INTEGER, gapless_encoding_drain INTEGER, 
gapless_last_frame_resynch INTEGER, analysis_inhibit_flags INTEGER, 
audio_fingerprint INTEGER, volume_normalization_energy INTEGER, PRIMARY KEY 
(item_pid,sub_id));" \
@@ -56,7 +56,7 @@ static const char Library_create[] =
        "CREATE TABLE video_characteristics (item_pid INTEGER, sub_id INTEGER 
DEFAULT 0, track_id INTEGER, height INTEGER, width INTEGER, depth INTEGER, 
codec INTEGER, frame_rate REAL, percentage_encrypted REAL, bit_rate INTEGER, 
peak_bit_rate INTEGER, buffer_size INTEGER, profile INTEGER, level INTEGER, 
complexity_level INTEGER, UNIQUE (item_pid,sub_id,track_id));" \
        "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, external_guid 
TEXT, feed_url TEXT, feed_keywords TEXT, PRIMARY KEY (item_pid));" \
+       "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 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));" \

------------------------------------------------------------------------------
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