diff options
| author | JP Dillingham <jpdillingham@gmail.com> | 2022-05-25 23:28:55 -0500 |
|---|---|---|
| committer | JP Dillingham <jpdillingham@gmail.com> | 2022-05-25 23:28:55 -0500 |
| commit | c04b3aa5243213161ed20a9d65b434de37fdab4e (patch) | |
| tree | 627850f0fef2039b7f119580615466f10df160e8 | |
| parent | cc85c944e7206608105a46c6fd8bcfaa6d00228f (diff) | |
| download | slskd-c04b3aa5243213161ed20a9d65b434de37fdab4e.tar.gz | |
add Id to Share
| -rw-r--r-- | src/slskd/Shares/Domain/Share.cs | 3 |
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; } |
