Skip to content

Commit

Permalink
misc: fix complaints from the IDE for the file model
Browse files Browse the repository at this point in the history
  • Loading branch information
revam committed Apr 7, 2024
1 parent 2b743b7 commit 0cb2bbe
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Shokofin/API/Models/File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public class Location
/// The id of the <see cref="ImportFolder"/> this <see cref="File"/>
/// resides in.
/// </summary>
/// <value></value>
[JsonPropertyName("ImportFolderID")]
public int ImportFolderId { get; set; }

Expand All @@ -83,18 +82,14 @@ public class Location
/// the start.
/// </summary>
public string Path =>
__path != null ? (
__path
) : (
__path = System.IO.Path.DirectorySeparatorChar + RelativePath
.Replace('/', System.IO.Path.DirectorySeparatorChar)
.Replace('\\', System.IO.Path.DirectorySeparatorChar)
);
CachedPath ??= System.IO.Path.DirectorySeparatorChar + RelativePath
.Replace('/', System.IO.Path.DirectorySeparatorChar)
.Replace('\\', System.IO.Path.DirectorySeparatorChar);

/// <summary>
/// Cached path for later re-use.
/// </summary>
private string? __path { get; set; }
private string? CachedPath { get; set; }

/// <summary>
/// True if the server can access the the <see cref="Location.Path"/> at
Expand Down

0 comments on commit 0cb2bbe

Please sign in to comment.