* Some SQL optimizations. Noticeable mostly on very slow systems with very large media libraries.

* Add basic DLNA/UPnP-AV SortCriteria support.
This commit is contained in:
Justin Maggard
2009-04-30 10:03:45 +00:00
parent 11b208a6e6
commit 226cf8bb66
4 changed files with 162 additions and 27 deletions

View File

@ -461,7 +461,7 @@ insert_directory(const char * name, const char * path, const char * base, const
{
if( strcmp(id_buf, last_found) == 0 )
break;
sql = sqlite3_mprintf("SELECT count(OBJECT_ID) from OBJECTS where OBJECT_ID = '%s'", id_buf);
sql = sqlite3_mprintf("SELECT count(*) from OBJECTS where OBJECT_ID = '%s'", id_buf);
if( (sql_get_table(db, sql, &result, NULL, NULL) == SQLITE_OK) && atoi(result[1]) )
{
sqlite3_free_table(result);