--- a/scanner.c
+++ b/scanner.c
@@ -567,7 +567,7 @@
 	ret = sql_exec(db, create_settingsTable_sqlite);
 	if( ret != SQLITE_OK )
 		goto sql_failed;
-	ret = sql_exec(db, "INSERT into SETTINGS values (0, 0)");
+	ret = sql_exec(db, "INSERT into SETTINGS values ('UPDATE_ID', '0')");
 	if( ret != SQLITE_OK )
 		goto sql_failed;
 	for( i=0; containers[i]; i=i+3 )
@@ -790,6 +790,7 @@
 		strncpyt(name, media_path->path, sizeof(name));
 		GetFolderMetadata(basename(name), media_path->path, NULL, NULL, 0);
 		ScanDirectory(media_path->path, NULL, media_path->types);
+		sql_exec(db, "INSERT into SETTINGS values (%Q, %Q)", "media_dir", media_path->path);
 		media_path = media_path->next;
 	}
 #ifdef READYNAS