Browse Source

Add some BsonIgnores

pull/341/head
Ionite 11 months ago
parent
commit
6be1f479d8
No known key found for this signature in database
  1. 5
      StabilityMatrix.Core/Models/Database/LocalModelFile.cs

5
StabilityMatrix.Core/Models/Database/LocalModelFile.cs

@ -32,16 +32,19 @@ public class LocalModelFile
/// <summary>
/// File name of the relative path.
/// </summary>
[BsonIgnore]
public string FileName => Path.GetFileName(RelativePath);
/// <summary>
/// File name of the relative path without extension.
/// </summary>
[BsonIgnore]
public string FileNameWithoutExtension => Path.GetFileNameWithoutExtension(RelativePath);
/// <summary>
/// Relative file path from the shared folder type model directory.
/// </summary>
[BsonIgnore]
public string RelativePathFromSharedFolder => Path.GetRelativePath(SharedFolderType.GetStringValue(), RelativePath);
public string GetFullPath(string rootModelDirectory)
@ -54,8 +57,10 @@ public class LocalModelFile
return PreviewImageRelativePath == null ? null : Path.Combine(rootModelDirectory, PreviewImageRelativePath);
}
[BsonIgnore]
public string FullPathGlobal => GetFullPath(GlobalConfig.LibraryDir.JoinDir("Models"));
[BsonIgnore]
public string? PreviewImageFullPathGlobal => GetPreviewImageFullPath(GlobalConfig.LibraryDir.JoinDir("Models"));
protected bool Equals(LocalModelFile other)

Loading…
Cancel
Save