aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Common/Compute.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-06-07 18:46:25 -0500
committerJP Dillingham <jp@dillingham.me>2026-06-07 18:46:25 -0500
commit294fcabd3928b420a4dfbd7ddd0dc38ada523165 (patch)
treebcc92e42c71f2a9b67f7750c5ecd0a396b5897e5 /src/slskd/Common/Compute.cs
parent60bc0c0c2ea6d9c80a7f091f022567b1d5e3240a (diff)
parent8e152ed6eccd5650179f2875eef4aa21243c8c15 (diff)
downloadslskd-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.cs11
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