2021-01-27 22:24:25 +01:00
|
|
|
using System;
|
2021-01-24 04:04:16 +01:00
|
|
|
using LinqToDB.Data;
|
|
|
|
using Microsoft.AspNetCore.Hosting;
|
|
|
|
using Microsoft.Extensions.Hosting;
|
|
|
|
using RTMPDash.DataModels;
|
2021-01-29 22:38:20 +01:00
|
|
|
using System.Threading;
|
2021-01-24 04:04:16 +01:00
|
|
|
|
|
|
|
namespace RTMPDash {
|
|
|
|
public class Program {
|
2021-01-31 17:57:20 +01:00
|
|
|
public const string SiteName = "chaos.stream";
|
|
|
|
public const string IngressDomain = "rtmp://chaos.stream";
|
|
|
|
public const string RootDomain = "https://chaos.stream";
|
|
|
|
public const string PlayerDomain = "https://live.on.chaos.stream";
|
|
|
|
public const string FragmentDomain = "https://cdn.chaos.stream";
|
|
|
|
public const string StatsDomain = "https://stats.chaos.stream";
|
|
|
|
public const string PrivacyEmail = "chaosstream-privacy@zotan.email";
|
|
|
|
public const string CopyrightEmail = "chaosstream-copyright@zotan.email";
|
|
|
|
public const string AbuseEmail = "chaosstream-abuse@zotan.email";
|
2021-01-24 04:04:16 +01:00
|
|
|
|
|
|
|
public static void Main(string[] args) {
|
|
|
|
DataConnection.DefaultSettings = new AppDb.Settings();
|
2021-01-29 22:38:20 +01:00
|
|
|
ThreadPool.SetMinThreads(100,100);
|
2021-01-24 04:04:16 +01:00
|
|
|
CreateHostBuilder(args).Build().Run();
|
|
|
|
}
|
|
|
|
|
|
|
|
public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args)
|
|
|
|
.ConfigureWebHostDefaults(webBuilder => {
|
|
|
|
webBuilder.UseStartup<Startup>();
|
|
|
|
});
|
|
|
|
}
|
2021-01-27 22:24:25 +01:00
|
|
|
|
|
|
|
public static class TimeExtensions {
|
|
|
|
public static TimeSpan StripMilliseconds(this TimeSpan time) =>
|
|
|
|
new(time.Days, time.Hours, time.Minutes, time.Seconds);
|
|
|
|
}
|
2021-01-31 17:57:20 +01:00
|
|
|
}
|