MCPcopy Create free account
hub / github.com/apohl79/audiogridder / processScanResults

Method processScanResults

Server/Source/Server.cpp:989–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987}
988
989void Server::processScanResults(int id, std::set<String>& newBlacklistedPlugins) {
990 File cacheFile(Defaults::getConfigFileName(Defaults::ConfigPluginCache, {{"id", String(id)}}));
991 File layoutsFile(Defaults::getConfigFileName(Defaults::PluginLayouts, {{"id", String(id)}}));
992 File deadmanFile(Defaults::getConfigFileName(Defaults::ConfigDeadMan, {{"id", String(id)}}));
993
994 if (cacheFile.existsAsFile()) {
995 KnownPluginList plist;
996 json playouts;
997 loadKnownPluginList(plist, playouts, id);
998
999 for (auto& p : plist.getBlacklistedFiles()) {
1000 if (!m_pluginList.getBlacklistedFiles().contains(p)) {
1001 m_pluginList.addToBlacklist(p);
1002 newBlacklistedPlugins.insert(getPluginName(p));
1003 }
1004 }
1005
1006 for (auto p : plist.getTypes()) {
1007 m_pluginList.addType(p);
1008 }
1009
1010 for (auto it = playouts.begin(); it != playouts.end(); it++) {
1011 m_jpluginLayouts[it.key()] = it.value();
1012 }
1013
1014 cacheFile.deleteFile();
1015 layoutsFile.deleteFile();
1016 }
1017
1018 if (deadmanFile.existsAsFile()) {
1019 logln("reading scan crash file " << deadmanFile.getFullPathName());
1020
1021 StringArray lines;
1022 deadmanFile.readLines(lines);
1023
1024 for (auto& line : lines) {
1025 newBlacklistedPlugins.insert(getPluginName(line));
1026 }
1027
1028 deadmanFile.deleteFile();
1029 }
1030}
1031
1032void Server::run() {
1033 switch (m_sandboxModeRuntime) {

Callers

nothing calls this directly

Calls 8

getConfigFileNameFunction · 0.85
getPluginNameFunction · 0.85
containsMethod · 0.80
deleteFileMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
keyMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected