aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJP Dillingham <jpdillingham@gmail.com>2022-05-25 23:28:55 -0500
committerJP Dillingham <jpdillingham@gmail.com>2022-05-25 23:28:55 -0500
commitc04b3aa5243213161ed20a9d65b434de37fdab4e (patch)
tree627850f0fef2039b7f119580615466f10df160e8 /src
parentcc85c944e7206608105a46c6fd8bcfaa6d00228f (diff)
downloadslskd-c04b3aa5243213161ed20a9d65b434de37fdab4e.tar.gz
add Id to Share
Diffstat (limited to 'src')
-rw-r--r--src/slskd/Shares/Domain/Share.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/slskd/Shares/Domain/Share.cs b/src/slskd/Shares/Domain/Share.cs
index 890c8565..464ab074 100644
--- a/src/slskd/Shares/Domain/Share.cs
+++ b/src/slskd/Shares/Domain/Share.cs
@@ -63,8 +63,11 @@ namespace slskd.Shares
var aliasedSegment = LocalPath[(parent.Length + 1)..];
RemotePath = maskedPath.ReplaceFirst(aliasedSegment, Alias);
+
+ Id = Compute.Sha1Hash(RemotePath);
}
+ public string Id { get; init; }
public string Alias { get; init; }
public bool IsExcluded { get; init; }
public string LocalPath { get; init; }