diff --git a/Flow.Launcher.Core/Plugin/PluginsLoader.cs b/Flow.Launcher.Core/Plugin/PluginsLoader.cs index 7973c66ba..e35f2a097 100644 --- a/Flow.Launcher.Core/Plugin/PluginsLoader.cs +++ b/Flow.Launcher.Core/Plugin/PluginsLoader.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Reflection; using System.Threading.Tasks; @@ -73,6 +74,11 @@ namespace Flow.Launcher.Core.Plugin typeof(IAsyncPlugin)); plugin = Activator.CreateInstance(type) as IAsyncPlugin; + + var assemblyName = assembly.GetName().Name; + metadata.AssemblyName = assemblyName; + metadata.PluginSettingsDirectoryPath = Path.Combine(DataLocation.PluginSettingsDirectory, assemblyName); + metadata.PluginCacheDirectoryPath = Path.Combine(DataLocation.PluginCacheDirectory, assemblyName); } #if DEBUG catch (Exception e) diff --git a/Flow.Launcher.Plugin/PluginMetadata.cs b/Flow.Launcher.Plugin/PluginMetadata.cs index b4e06913e..15ba2deaa 100644 --- a/Flow.Launcher.Plugin/PluginMetadata.cs +++ b/Flow.Launcher.Plugin/PluginMetadata.cs @@ -16,12 +16,14 @@ namespace Flow.Launcher.Plugin public string Website { get; set; } public bool Disabled { get; set; } public string ExecuteFilePath { get; private set;} - public string ExecuteFileName { get; set; } + [JsonIgnore] + public string AssemblyName { get; internal set; } + public string PluginDirectory { - get { return _pluginDirectory; } + get => _pluginDirectory; internal set { _pluginDirectory = value; @@ -49,9 +51,17 @@ namespace Flow.Launcher.Plugin /// [JsonIgnore] public long InitTime { get; set; } + [JsonIgnore] public long AvgQueryTime { get; set; } + [JsonIgnore] public int QueryCount { get; set; } + + [JsonIgnore] + public string PluginSettingsDirectoryPath { get; internal set; } + + [JsonIgnore] + public string PluginCacheDirectoryPath { get; internal set; } } }