aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Program.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2025-12-08 18:19:27 -0600
committerGitHub <noreply@github.com>2025-12-08 18:19:27 -0600
commit0c3757f0e5ba0a309575b78f7f2f4ea214dd1373 (patch)
tree45c91fe822e348a95b0fdec25645fd39ea64feb4 /src/slskd/Program.cs
parent6a1e3ada4224d9abb8d987eb5db022e01601c92a (diff)
parentf80fbac5eeda5901a106975446d0a11b7cbc38d6 (diff)
downloadslskd-0c3757f0e5ba0a309575b78f7f2f4ea214dd1373.tar.gz
Merge branch 'master' into copilot/add-upload-datetime-feature
Diffstat (limited to 'src/slskd/Program.cs')
-rw-r--r--src/slskd/Program.cs14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/slskd/Program.cs b/src/slskd/Program.cs
index 6b50aedb..aa320961 100644
--- a/src/slskd/Program.cs
+++ b/src/slskd/Program.cs
@@ -23,8 +23,6 @@ namespace slskd
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
- using System.Diagnostics;
-
using System.IO;
using System.Linq;
using System.Net;
@@ -70,6 +68,7 @@ namespace slskd
using slskd.Search;
using slskd.Search.API;
using slskd.Shares;
+ using slskd.Telemetry;
using slskd.Transfers;
using slskd.Transfers.Downloads;
using slskd.Transfers.Uploads;
@@ -91,6 +90,11 @@ namespace slskd
public static readonly string AppName = "slskd";
/// <summary>
+ /// The DateTime of the 'genesis' of the application (the initial commit).
+ /// </summary>
+ public static readonly DateTime GenesisDateTime = new(2020, 12, 30, 6, 22, 0, DateTimeKind.Utc);
+
+ /// <summary>
/// The name of the local share host.
/// </summary>
public static readonly string LocalHostName = "local";
@@ -639,8 +643,9 @@ namespace slskd
services.AddSingleton<EventService>();
services.AddSingleton<EventBus>();
- services.AddSingleton<TelemetryService>();
services.AddSingleton<PrometheusService>();
+ services.AddSingleton<ReportsService>();
+ services.AddSingleton<TelemetryService>();
services.AddSingleton<ScriptService>();
services.AddSingleton<WebhookService>();
@@ -903,6 +908,9 @@ namespace slskd
},
});
+ // allow endpoints marked with multiple content types in [Produces] to generate properly
+ options.OperationFilter<ContentNegotiationOperationFilter>();
+
if (IOFile.Exists(XmlDocumentationFile))
{
options.IncludeXmlComments(XmlDocumentationFile);