commit d1544a17e1f951c71c8ec4a431d13c5bffd0178d
Author: Christophe Fergeau <[email protected]>
Date:   Sun Dec 20 23:14:43 2009 +0100

    [sqlite] add new nano5g fields to db_info table

 src/itdb_sqlite.c         |    5 ++++-
 src/itdb_sqlite_queries.h |    2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.c
index b755a38..f9f345a 100644
--- a/src/itdb_sqlite.c
+++ b/src/itdb_sqlite.c
@@ -477,7 +477,7 @@ static int mk_Library(Itdb_iTunesDB *itdb,
        fprintf(stderr, "[%s] sqlite3_prepare error: %s\n", __func__, 
sqlite3_errmsg(db));
        goto leave;
     }
-    if (SQLITE_OK != sqlite3_prepare_v2(db, "INSERT INTO \"db_info\" 
VALUES(?,?,?,?,?,?,?);", -1, &stmt_db_info, NULL)) {
+    if (SQLITE_OK != sqlite3_prepare_v2(db, "INSERT INTO \"db_info\" 
VALUES(?,?,?,?,?,?,?,?);", -1, &stmt_db_info, NULL)) {
        fprintf(stderr, "[%s] sqlite3_prepare error: %s\n", __func__, 
sqlite3_errmsg(db));
        goto leave;
     }
@@ -704,6 +704,9 @@ static int mk_Library(Itdb_iTunesDB *itdb,
     /* subtitle_language */
     /*  this is +0xA2 */
     sqlite3_bind_int(stmt_db_info, ++idx, itdb->priv->subtitle_language);
+    /* genius cuid */
+    /* TODO: unkown meaning, set to NULL */
+    sqlite3_bind_null(stmt_db_info, ++idx);
     /* bib */
     /* TODO: unkown meaning, set to NULL */
     sqlite3_bind_null(stmt_db_info, ++idx);
diff --git a/src/itdb_sqlite_queries.h b/src/itdb_sqlite_queries.h
index 4e059a3..f2470c4 100644
--- a/src/itdb_sqlite_queries.h
+++ b/src/itdb_sqlite_queries.h
@@ -49,7 +49,7 @@ static const char Genius_create[] =
 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, 
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 db_info (pid INTEGER NOT NULL, primary_container_pid 
INTEGER, media_folder_url TEXT, audio_language INTEGER, subtitle_language 
INTEGER, genius_cuid TEXT, 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_itunes_u 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, part_of_gapless_album 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));" \
        "CREATE TABLE video_info (item_pid INTEGER NOT NULL, 
has_alternate_audio INTEGER, has_subtitles INTEGER, characteristics_valid 
INTEGER, has_closed_captions INTEGER, is_self_contained INTEGER, is_compressed 
INTEGER, is_anamorphic INTEGER, season_number INTEGER, audio_language INTEGER, 
audio_track_index INTEGER, audio_track_id INTEGER, subtitle_language INTEGER, 
subtitle_track_index INTEGER, subtitle_track_id INTEGER, series_name TEXT, 
sort_series_name TEXT, episode_id TEXT, episode_sort_id INTEGER, network_name 
TEXT, extended_content_rating TEXT, movie_info TEXT, PRIMARY KEY (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