Updated Logger. Local plugin database has now only executable dependencies stored in the database
This commit is contained in:
@@ -8,12 +8,14 @@ public class OnlineDependencyInfo
|
||||
public string DependencyName { get; private set; }
|
||||
public string DownloadLink { get; private set; }
|
||||
public string DownloadLocation { get; private set; }
|
||||
public bool IsExecutable { get; private set; }
|
||||
|
||||
[JsonConstructor]
|
||||
public OnlineDependencyInfo(string dependencyName, string downloadLink, string downloadLocation)
|
||||
public OnlineDependencyInfo(string dependencyName, string downloadLink, string downloadLocation, bool isExecutable)
|
||||
{
|
||||
DependencyName = dependencyName;
|
||||
DownloadLink = downloadLink;
|
||||
DownloadLocation = downloadLocation;
|
||||
IsExecutable = isExecutable;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
@@ -37,6 +36,11 @@ public class PluginInfo
|
||||
|
||||
public static PluginInfo FromOnlineInfo(PluginOnlineInfo onlineInfo)
|
||||
{
|
||||
return new PluginInfo(onlineInfo.Name, onlineInfo.Version, onlineInfo.Dependencies.Select(dep => new KeyValuePair<string, string>(dep.DependencyName, dep.DownloadLocation)).ToDictionary());
|
||||
return new PluginInfo(onlineInfo.Name,
|
||||
onlineInfo.Version,
|
||||
onlineInfo.Dependencies
|
||||
.Where(dep => dep.IsExecutable)
|
||||
.Select(dep => new KeyValuePair<string, string>(dep.DependencyName, dep.DownloadLocation))
|
||||
.ToDictionary());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user