Browse Source

Add SharedFolders field to BasePackage

pull/5/head
Ionite 1 year ago
parent
commit
459958c509
No known key found for this signature in database
  1. 6
      StabilityMatrix/Models/Packages/BasePackage.cs
  2. 17
      StabilityMatrix/Models/SharedFolderType.cs

6
StabilityMatrix/Models/Packages/BasePackage.cs

@ -24,6 +24,12 @@ public abstract class BasePackage
public abstract List<LaunchOptionDefinition> LaunchOptions { get; }
public virtual string? ExtraLaunchArguments { get; set; } = null;
/// <summary>
/// The shared folders that this package supports.
/// Mapping of <see cref="SharedFolderType"/> to the relative path from the package root.
/// </summary>
public virtual Dictionary<SharedFolderType, string>? SharedFolders { get; }
public abstract Task<string> GetLatestVersion();
public abstract Task<IEnumerable<PackageVersion>> GetAllVersions(bool isReleaseMode = true);
public abstract Task<IEnumerable<GithubCommit>> GetAllCommits(string branch, int page = 1, int perPage = 10);

17
StabilityMatrix/Models/SharedFolderType.cs

@ -0,0 +1,17 @@
using System.Diagnostics.CodeAnalysis;
namespace StabilityMatrix.Models;
[SuppressMessage("ReSharper", "InconsistentNaming")]
[SuppressMessage("ReSharper", "IdentifierTypo")]
public enum SharedFolderType
{
StableDiffusion,
Lora,
LyCORIS,
ESRGAN,
RealESRGAN,
SwinIR,
VAE,
ApproxVAE,
}
Loading…
Cancel
Save