aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/General/library/library.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/General/library/library.cpp b/src/plugins/General/library/library.cpp
index f9ac5d9ed..83ff8c0ed 100644
--- a/src/plugins/General/library/library.cpp
+++ b/src/plugins/General/library/library.cpp
@@ -84,11 +84,13 @@ Library::Library(QPointer<LibraryWidget> *libraryWidget, QObject *parent) :
if(settings.value("Library/recreate_db", false).toBool())
{
settings.setValue("Library/recreate_db", false);
-
{
QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE", CONNECTION_NAME);
+ db.setDatabaseName(Qmmp::configDir() + "/" + "library.sqlite");
db.open();
db.exec("DELETE FROM track_library");
+ db.exec("REINDEX track_library");
+ db.exec("VACUUM");
db.close();
}
QSqlDatabase::removeDatabase(CONNECTION_NAME);