* Add DLNA.ORG_FLAGS support, and clean up transferMode support.

This commit is contained in:
Justin Maggard
2012-02-14 18:43:35 +00:00
parent ba7e33a062
commit 6b5e121f13
8 changed files with 221 additions and 157 deletions

12
sql.c
View File

@ -210,12 +210,15 @@ db_upgrade(sqlite3 *db)
if (db_vers == DB_VERSION)
return 0;
if (db_vers > DB_VERSION)
return -2;
if (db_vers < 1)
return -1;
if (db_vers < 5)
return 5;
if (db_vers < 6)
{
DPRINTF(E_WARN, L_DB_SQL, "Updating DB version to v%d.\n", 6);
ret = sql_exec(db, "CREATE TABLE BOOKMARKS ("
"ID INTEGER PRIMARY KEY, "
"SEC INTEGER)");
@ -224,11 +227,18 @@ db_upgrade(sqlite3 *db)
}
if (db_vers < 7)
{
DPRINTF(E_WARN, L_DB_SQL, "Updating DB version to v%d.\n", DB_VERSION);
DPRINTF(E_WARN, L_DB_SQL, "Updating DB version to v%d.\n", 7);
ret = sql_exec(db, "ALTER TABLE DETAILS ADD rotation INTEGER");
if( ret != SQLITE_OK )
return 7;
}
if (db_vers < 8)
{
DPRINTF(E_WARN, L_DB_SQL, "Updating DB version to v%d.\n", 8);
ret = sql_exec(db, "UPDATE DETAILS set DLNA_PN = replace(DLNA_PN, ';DLNA.ORG_OP=01;DLNA.ORG_CI=0', '')");
if( ret != SQLITE_OK )
return 8;
}
sql_exec(db, "PRAGMA user_version = %d", DB_VERSION);
return 0;