jellyfin-rich-presence/WindowsFormsApplication2/Program.cs
2025-04-29 11:52:21 -06:00

44 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace JellyfinRPC
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
if (ConfigManager.GetEntry("DiscordClientID") != "")
{
var discord = new Discord.Discord(DiscordRPC.discordAppID, (UInt64)Discord.CreateFlags.Default);
#if DEBUG
discord.SetLogHook(Discord.LogLevel.Debug, (level, message) =>
{
ConsoleManager.WriteToConsole($"DiscordLog: {level} {message}");
});
#else
discord.SetLogHook(Discord.LogLevel.Warn, (level, message) =>
{
ConsoleManager.WriteToCOnsole($"DiscordLog: {level} {message}");
});
#endif
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
FileChecker.FolderCheck();
FileChecker.FileCheck();
Application.Run(new Form1());
ConsoleManager.WriteToConsole("Starting Jellyfin Rich Presence...");
}
}
}