VST3: update scanner API, distinguish new and updated plugins

This commit is contained in:
Robin Gareus 2021-06-18 16:51:24 +02:00
parent fce374fd41
commit f28ea675ee
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 9 additions and 2 deletions

View File

@ -72,7 +72,7 @@ LIBARDOUR_API extern std::string
vst3_cache_file (std::string const& module_path);
LIBARDOUR_API extern std::string
vst3_valid_cache_file (std::string const& module_path, bool verbose = false);
vst3_valid_cache_file (std::string const& module_path, bool verbose = false, bool* is_new = NULL);
LIBARDOUR_API extern bool
vst3_scan_and_cache (std::string const& module_path, std::string const& bundle_path, boost::function<void (std::string const&, VST3Info const&)> cb, bool verbose = false);

View File

@ -373,13 +373,20 @@ ARDOUR::vst3_cache_file (std::string const& module_path)
}
string
ARDOUR::vst3_valid_cache_file (std::string const& module_path, bool verbose)
ARDOUR::vst3_valid_cache_file (std::string const& module_path, bool verbose, bool* is_new)
{
string const cache_file = ARDOUR::vst3_cache_file (module_path);
if (!Glib::file_test (cache_file, Glib::FileTest (Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_REGULAR))) {
if (is_new) {
*is_new = true;
}
return "";
}
if (is_new) {
*is_new = false;
}
if (verbose) {
PBD::info << "Found cache file: '" << cache_file <<"'" << endmsg;
}