mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 11:10:52 +00:00
Run the Indexer immediately after paths are modified. This was disabled
previously due to some annoying bugs that have since been fixed.
This commit is contained in:
parent
a5a5cfa956
commit
bd7b54d79e
@ -1,3 +1,12 @@
|
||||
0.19.2
|
||||
|
||||
* start the metadata indexer immediately after adding or removing paths from
|
||||
the settings view. this functionality was previously disabled due to
|
||||
performance issues and a bug with the indexer. these problems have all been
|
||||
addressed.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
0.19.1
|
||||
|
||||
* re-introduced the multi-threaded indexer! this makes metadata scanning quite
|
||||
|
@ -8,7 +8,7 @@ cmake_minimum_required(VERSION 3.0)
|
||||
project(musikbox)
|
||||
set (musikbox_VERSION_MAJOR 0)
|
||||
set (musikbox_VERSION_MINOR 19)
|
||||
set (musikbox_VERSION_PATCH 1)
|
||||
set (musikbox_VERSION_PATCH 2)
|
||||
set (musikbox_VERSION "${musikbox_VERSION_MAJOR}.${musikbox_VERSION_MINOR}.${musikbox_VERSION_PATCH}")
|
||||
|
||||
include(CMakeToolsHelpers OPTIONAL)
|
||||
|
@ -71,8 +71,8 @@ namespace musik { namespace core {
|
||||
virtual ~Indexer();
|
||||
|
||||
/* IIndexer */
|
||||
virtual void AddPath(const std::string& paths);
|
||||
virtual void RemovePath(const std::string& paths);
|
||||
virtual void AddPath(const std::string& path);
|
||||
virtual void RemovePath(const std::string& path);
|
||||
virtual void GetPaths(std::vector<std::string>& paths);
|
||||
virtual void Schedule(SyncType type);
|
||||
virtual State GetState() { return this->state; }
|
||||
|
@ -108,8 +108,7 @@ SettingsLayout::SettingsLayout(
|
||||
, library(library)
|
||||
, indexer(library->Indexer())
|
||||
, transport(transport)
|
||||
, playback(playback)
|
||||
, pathsUpdated(false) {
|
||||
, playback(playback) {
|
||||
this->prefs = Preferences::ForComponent(core::prefs::components::Settings);
|
||||
this->browseAdapter.reset(new DirectoryAdapter());
|
||||
this->addedPathsAdapter.reset(new SimpleScrollAdapter());
|
||||
@ -424,7 +423,7 @@ void SettingsLayout::InitializeWindows() {
|
||||
#endif
|
||||
this->AddWindow(this->hotkeyDropdown);
|
||||
this->AddWindow(this->pluginsDropdown);
|
||||
|
||||
|
||||
this->AddWindow(this->dotfileCheckbox);
|
||||
this->AddWindow(this->syncOnStartupCheckbox);
|
||||
this->AddWindow(this->removeCheckbox);
|
||||
@ -455,12 +454,6 @@ void SettingsLayout::OnVisibilityChanged(bool visible) {
|
||||
this->LoadPreferences();
|
||||
this->CheckShowFirstRunDialog();
|
||||
}
|
||||
else {
|
||||
if (this->pathsUpdated) {
|
||||
this->library->Indexer()->Schedule(IIndexer::SyncType::Local);
|
||||
this->pathsUpdated = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SettingsLayout::CheckShowFirstRunDialog() {
|
||||
@ -550,7 +543,7 @@ void SettingsLayout::AddSelectedDirectory() {
|
||||
if (path.size()) {
|
||||
this->indexer->AddPath(path);
|
||||
this->RefreshAddedPaths();
|
||||
this->pathsUpdated = true;
|
||||
this->library->Indexer()->Schedule(IIndexer::SyncType::Local);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -563,7 +556,7 @@ void SettingsLayout::RemoveSelectedDirectory() {
|
||||
if (index != ListWindow::NO_SELECTION) {
|
||||
this->indexer->RemovePath(paths.at(index));
|
||||
this->RefreshAddedPaths();
|
||||
this->pathsUpdated = true;
|
||||
this->library->Indexer()->Schedule(IIndexer::SyncType::Local);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,6 @@ namespace musik {
|
||||
std::shared_ptr<cursespp::SimpleScrollAdapter> addedPathsAdapter;
|
||||
std::shared_ptr<DirectoryAdapter> browseAdapter;
|
||||
|
||||
bool pathsUpdated = false;
|
||||
bool serverAvailable = false;
|
||||
};
|
||||
}
|
||||
|
@ -2,5 +2,5 @@
|
||||
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 19
|
||||
#define VERSION_PATCH 1
|
||||
#define VERSION "0.19.1"
|
||||
#define VERSION_PATCH 2
|
||||
#define VERSION "0.19.2"
|
||||
|
Loading…
Reference in New Issue
Block a user