|
|
@ -48,9 +48,7 @@ public class CivitModel |
|
|
|
var latestVersion = ModelVersions?.FirstOrDefault(); |
|
|
|
var latestVersion = ModelVersions?.FirstOrDefault(); |
|
|
|
if (latestVersion?.Files != null && latestVersion.Files.Any()) |
|
|
|
if (latestVersion?.Files != null && latestVersion.Files.Any()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var latestModelFile = latestVersion.Files.FirstOrDefault( |
|
|
|
var latestModelFile = latestVersion.Files.FirstOrDefault(x => x.Type == CivitFileType.Model); |
|
|
|
x => x.Type == CivitFileType.Model |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
kbs = latestModelFile?.SizeKb ?? 0; |
|
|
|
kbs = latestModelFile?.SizeKb ?? 0; |
|
|
|
} |
|
|
|
} |
|
|
|
fullFilesSize = new FileSizeType(kbs); |
|
|
|
fullFilesSize = new FileSizeType(kbs); |
|
|
@ -65,4 +63,7 @@ public class CivitModel |
|
|
|
ModelVersions != null && ModelVersions.Any() |
|
|
|
ModelVersions != null && ModelVersions.Any() |
|
|
|
? ModelVersions[0].BaseModel?.Replace("SD", "").Trim() |
|
|
|
? ModelVersions[0].BaseModel?.Replace("SD", "").Trim() |
|
|
|
: string.Empty; |
|
|
|
: string.Empty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public CivitModelStats ModelVersionStats => |
|
|
|
|
|
|
|
ModelVersions != null && ModelVersions.Any() ? ModelVersions[0].Stats : new CivitModelStats(); |
|
|
|
} |
|
|
|
} |
|
|
|