Table of Contents

Class DownloadOptions

Namespace
CivitaiSharp.Tools.Downloads.Options
Assembly
CivitaiSharp.Tools.dll

Root configuration options container for Civitai download operations.

public sealed class DownloadOptions
Inheritance
DownloadOptions
Inherited Members

Remarks

Bind this class from configuration using the section path "CivitaiDownloads".

Example appsettings.json:

{
  "CivitaiDownloads": {
    "Images": {
      "BaseDirectory": "C:\\Downloads\\Images",
      "PathPattern": "{BaseModel}/{Username}/{Id}.{Extension}",
      "OverwriteExisting": false
    },
    "Models": {
      "BaseDirectory": "C:\\Models",
      "PathPattern": "{ModelType}/{BaseModel}/{Creator}/{ModelName}/{VersionName}/{FileName}",
      "OverwriteExisting": true,
      "VerifyHash": true,
      "HashAlgorithm": "Sha256"
    }
  }
}

Fields

SectionName

Gets or sets the configuration section name for binding.

public const string SectionName = "CivitaiDownloads"

Field Value

string

Properties

Images

Gets or sets the image download options.

public ImageDownloadOptions Images { get; set; }

Property Value

ImageDownloadOptions

Models

Gets or sets the model download options.

public ModelDownloadOptions Models { get; set; }

Property Value

ModelDownloadOptions