diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2021-05-10 08:02:06 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2021-05-10 08:02:06 +0000 |
| commit | b4d8a8b7f7b59c281bcaabfadb69ed37f1c827e3 (patch) | |
| tree | edcab1276fa9c2b344dba6aee6f018b3aba8ccb8 /src | |
| parent | a66fcc5749595738575338da19c432f7602f8581 (diff) | |
| download | qmmp-b4d8a8b7f7b59c281bcaabfadb69ed37f1c827e3.tar.gz qmmp-b4d8a8b7f7b59c281bcaabfadb69ed37f1c827e3.tar.bz2 qmmp-b4d8a8b7f7b59c281bcaabfadb69ed37f1c827e3.zip | |
library: fixed table cleanup
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@10000 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/General/library/library.cpp | 4 |
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); |
