From c04b3aa5243213161ed20a9d65b434de37fdab4e Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Wed, 25 May 2022 23:28:55 -0500 Subject: add Id to Share --- src/slskd/Shares/Domain/Share.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; } -- cgit v1.2.3