Browse Source

Fix CivitAI error when parsing CivitModelType of "Other"

pull/55/head
JT 1 year ago
parent
commit
adfa529613
  1. 2
      StabilityMatrix.Avalonia/Views/CheckpointBrowserPage.axaml
  2. 4
      StabilityMatrix.Core/Models/Api/CivitModel.cs
  3. 1
      StabilityMatrix.Core/Models/Api/CivitModelType.cs

2
StabilityMatrix.Avalonia/Views/CheckpointBrowserPage.axaml

@ -31,7 +31,7 @@
FontSize="11"
Foreground="{DynamicResource TextControlForeground}"
Margin="0,2,0,0"
Text="{Binding CivitModel.Name, FallbackValue=''}"
Text="{Binding CivitModel.LatestModelVersion, FallbackValue=''}"
VerticalAlignment="Center" />
<Grid>
<controls:BetterAdvancedImage

4
StabilityMatrix.Core/Models/Api/CivitModel.cs

@ -55,4 +55,8 @@ public class CivitModel
return fullFilesSize;
}
}
public string LatestModelVersion => ModelVersions != null && ModelVersions.Any()
? ModelVersions[0].Name
: string.Empty;
}

1
StabilityMatrix.Core/Models/Api/CivitModelType.cs

@ -26,5 +26,6 @@ public enum CivitModelType
Model,
[ConvertTo<SharedFolderType>(SharedFolderType.LyCORIS)]
LoCon,
Other,
All,
}

Loading…
Cancel
Save