diff options
| author | JP Dillingham <jp@dillingham.me> | 2026-06-07 18:46:25 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2026-06-07 18:46:25 -0500 |
| commit | 294fcabd3928b420a4dfbd7ddd0dc38ada523165 (patch) | |
| tree | bcc92e42c71f2a9b67f7750c5ecd0a396b5897e5 /src/slskd/Common/Compute.cs | |
| parent | 60bc0c0c2ea6d9c80a7f091f022567b1d5e3240a (diff) | |
| parent | 8e152ed6eccd5650179f2875eef4aa21243c8c15 (diff) | |
| download | slskd-294fcabd3928b420a4dfbd7ddd0dc38ada523165.tar.gz | |
Merge remote-tracking branch 'origin/master' into reports
Diffstat (limited to 'src/slskd/Common/Compute.cs')
| -rw-r--r-- | src/slskd/Common/Compute.cs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/slskd/Common/Compute.cs b/src/slskd/Common/Compute.cs index 8d7c1ceb..d235a87c 100644 --- a/src/slskd/Common/Compute.cs +++ b/src/slskd/Common/Compute.cs @@ -33,6 +33,7 @@ namespace slskd { using System; + using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; @@ -64,5 +65,15 @@ namespace slskd using var sha256 = SHA256.Create(); return BitConverter.ToString(sha256.ComputeHash(Encoding.UTF8.GetBytes(str))).Replace("-", string.Empty); } + + public static OperatingSystem OperatingSystem() + { + if (System.OperatingSystem.IsWindows()) + { + return slskd.OperatingSystem.Windows; + } + + return slskd.OperatingSystem.Linux; + } } }
\ No newline at end of file |
