From 37523681564f6bf38148177e7b656f148909e2a3 Mon Sep 17 00:00:00 2001 From: Diamond Creeper Date: Sat, 30 Nov 2024 23:55:30 +1300 Subject: [PATCH] Added stuff - Now displays "Jellyfin Discord RPC - Your Jellyfin Servers URL" in the title - Now only shows "Rich Presence updated!" once --- .editorconfig | 4 ++ ...7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx | Bin 19825 -> 0 bytes ...94a53a54-1f49-4d32-ab2b-3f3feb9118c6.vsidx | Bin 0 -> 20403 bytes ...e0abf749-404d-4324-b860-80672677e6e3.vsidx | Bin 0 -> 1015 bytes .../v17/DocumentLayout.backup.json | 2 +- .../v17/DocumentLayout.json | 2 +- JellyfinDiscordRPC.sln | 5 ++ JellyfinDiscordRPC/Program.cs | 43 ++++++++++++++---- 8 files changed, 44 insertions(+), 12 deletions(-) create mode 100644 .editorconfig delete mode 100644 .vs/JellyfinDiscordRPC/FileContentIndex/7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx create mode 100644 .vs/JellyfinDiscordRPC/FileContentIndex/94a53a54-1f49-4d32-ab2b-3f3feb9118c6.vsidx create mode 100644 .vs/JellyfinDiscordRPC/FileContentIndex/e0abf749-404d-4324-b860-80672677e6e3.vsidx diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..8e8cbad --- /dev/null +++ b/.editorconfig @@ -0,0 +1,4 @@ +[*.cs] + +# Default severity for all analyzer diagnostics +dotnet_analyzer_diagnostic.severity = silent diff --git a/.vs/JellyfinDiscordRPC/FileContentIndex/7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx b/.vs/JellyfinDiscordRPC/FileContentIndex/7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx deleted file mode 100644 index b5daebf71a18c9238842e171a8859ff380fd75ae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19825 zcmb`OcVL#)*~ZVKxN(nG>xhV&D29NDNH8QMAqixeAw)oG;{vKS$i#9Fmw7O3LA1+S7-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6mG= zR_PY&72>;WR*%~EORK%|s_;r`mQ_d6Pcom8e(UpZMOMFgT0L&>GQSgh#C|XEQ`{ce zkNo!I8?i0;eZ}e-Xw*zu-8P>o?$zmhgU&Z!pAf!bS#8siw0hsULc5jMhfhJz zj`y0?J(f-&_ggv%Y}>oaYMb6qR>#Ua$vQ1`y3{tTuIUwGbzlC?$LcxqsppmC-`V}! zqtCwl+lgnxPd96e)O*c3PU^d!)fRm_vzC7MarzLI_;!$=;eJlkC|&wh!oNv*L{{7J z{lMyxd0$xlt#_oyn%6~+M~}_}uOh3{{%s(iFMjGYD(z>lf7{C16VIW1`nbdq^fS#R zepdJwWS4s${KnfR_3x}x<&x&WnZyM#H<3hXQPE!}!651M?@1Xg{(-|eX zrq_bkhqYJg->v<->hL%h8kO_E*YI!IJyQQ-Gb8HyF596w^t}5$r%~#A!_rs}OO>Ch zv~K|ZH!iJG`|RI&>%;Gg&}ymgz`ntE$G@Ah=wDaG|D)}+|DQJhQ?Y60O(Qe^7eJ+` AlmGw# diff --git a/.vs/JellyfinDiscordRPC/FileContentIndex/94a53a54-1f49-4d32-ab2b-3f3feb9118c6.vsidx b/.vs/JellyfinDiscordRPC/FileContentIndex/94a53a54-1f49-4d32-ab2b-3f3feb9118c6.vsidx new file mode 100644 index 0000000000000000000000000000000000000000..6d66554f0046a378541719913e2515cd6c02779e GIT binary patch literal 20403 zcmb`OcVL#)*~ZVKxcA-)5j9Z=LsTRf2uTQmEHi`%2nsk*M8S<{R8*|9?k(;;>cqYG z!cpsJ)mm4zT34&B>$`sUx!(5sW=5JR z)()H0HFw6Gxsztjp1b$KyHBc{J?-FGGxk4d?xco&4jOat9+PIy*l)kX_uOay{?qrF zJ8kxy>HX&%Fm2LUC)VY(_O{ypBdK!Q+ymy!p1I)AQ{U)S`%dxy)>7M?*?Y~|eU_?s zKT6no(T<#od3#_=nuqeLbh(szQW_Oi>52Hy@-_Fp+rk5 zIo&Baz4TOxD*m6$%K6`H(U$s7Vwf=|Y0sq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| zu+aHZb~XB(=PA8lCT1_7ScR8RMwM|uNvAj2>YS@|KW1(argc1t(rfOoD7G;xm`P)l z4^MLDv1{_?$v0Ri@4zU%XWj93K01`%*QgFoeXQfe<;G17yc?m6K)pr^rEK0`Xq9lj zq34@5dj|J1l-lqo%DTz398YqRQ|Gv-lM|jW_2koly`Q~@w(>s2-jH_%l=CmIMP@ql zj+8tH*$JtsUnoyYHnPi>ez1Y>mr-)&Zz9+av#(L|c51g{_oNq$8Q)gW7rsO2(E1-J zounDt5xXKaR;dg#8Rfm2cVjf)+DWO@3_(lZJ`(2MllNuzDZ;FoO0|e$2j7R~@3gRW zn8KWKD7A6NLb(U9Mo`Mqf0Uaq-!!1?UcBqm+p^H|P;9Q3H&E*5y%wePf8R<8(-yZ4 zl(zCI!h9f1i>xm+zbDOCn7tJx5BGYMwz%D+l*l(oZtKkT(%qaeKIE=|Vn1^Ur7f%} zz2k8faFTUPIUi8$EbZBpVqUT@GE%HTlom^S6780D2$8+KQOR!O-zbNlazzh^`AS8wtE?+O1M O(Vx>-%iL&4=Klc6TFbTo literal 0 HcmV?d00001 diff --git a/.vs/JellyfinDiscordRPC/FileContentIndex/e0abf749-404d-4324-b860-80672677e6e3.vsidx b/.vs/JellyfinDiscordRPC/FileContentIndex/e0abf749-404d-4324-b860-80672677e6e3.vsidx new file mode 100644 index 0000000000000000000000000000000000000000..f0f3912c6a21a4c740a210fd6e33d8fed99d163d GIT binary patch literal 1015 zcmZ9K-A)rx5XYw?3L;?nP*FgU??S8B-ZkA?8%djVw=7 zy!0V_0WbW|oIefW?4JK`&di)SvnN~dO6e()-xFe^>L6dh!pE?lbOuRy6(^UYv(SrM zqw7w8n1rQh_<3|5UUhoCZ{4V$ZAVEf9<;NAn^u_Xw4-4>XvO_*bn)xo=x@64C-sA6 z-6<&%yg2o#$U{?SzyrVYz=q*+pw572oPRF?74W*WvEi0?oo<&)hPpPUzJodtwV}(~ z`GB^zu0AwioFpHSk4deedDG+*a)!jI7M~^O$a(S^nI;#=MRJK;CZCfp$d}{_`HFl^ zu99oyI{AitOKy1yCo|*$c}Ql-9QmI7KxXt3G4y^jl9Pf>AL>g{ z@=}rt^azh?1FGx1)UncBAL`4gc*y<)EhFYhRRUY*p%t@hh!mwJO=w_x%#1qrRT0sX zs}r@*u|7`NSHk8}~f{ ovb4vBoPauO^3`soY2V$n@3ZTI=pU+ola8)~O!78=>hFy4ALEl$>;M1& literal 0 HcmV?d00001 diff --git a/.vs/JellyfinDiscordRPC/v17/DocumentLayout.backup.json b/.vs/JellyfinDiscordRPC/v17/DocumentLayout.backup.json index 7bd1f1e..6996ba6 100644 --- a/.vs/JellyfinDiscordRPC/v17/DocumentLayout.backup.json +++ b/.vs/JellyfinDiscordRPC/v17/DocumentLayout.backup.json @@ -24,7 +24,7 @@ "RelativeDocumentMoniker": "JellyfinDiscordRPC\\Program.cs", "ToolTip": "C:\\Users\\joshua\\Documents\\GitHub\\jellyfin-discord-rpc\\JellyfinDiscordRPC\\Program.cs", "RelativeToolTip": "JellyfinDiscordRPC\\Program.cs", - "ViewState": "AgIAAEEAAAAAAAAAAAAswGQAAAAFAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-11-30T05:30:39.706Z", "EditorCaption": "" diff --git a/.vs/JellyfinDiscordRPC/v17/DocumentLayout.json b/.vs/JellyfinDiscordRPC/v17/DocumentLayout.json index a2d9884..6996ba6 100644 --- a/.vs/JellyfinDiscordRPC/v17/DocumentLayout.json +++ b/.vs/JellyfinDiscordRPC/v17/DocumentLayout.json @@ -24,7 +24,7 @@ "RelativeDocumentMoniker": "JellyfinDiscordRPC\\Program.cs", "ToolTip": "C:\\Users\\joshua\\Documents\\GitHub\\jellyfin-discord-rpc\\JellyfinDiscordRPC\\Program.cs", "RelativeToolTip": "JellyfinDiscordRPC\\Program.cs", - "ViewState": "AgIAADUAAAAAAAAAAAAswGQAAAAFAAAAAAAAAA==", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAgAAAANAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-11-30T05:30:39.706Z", "EditorCaption": "" diff --git a/JellyfinDiscordRPC.sln b/JellyfinDiscordRPC.sln index 08422f4..686a7a5 100644 --- a/JellyfinDiscordRPC.sln +++ b/JellyfinDiscordRPC.sln @@ -5,6 +5,11 @@ VisualStudioVersion = 17.12.35514.174 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JellyfinDiscordRPC", "JellyfinDiscordRPC\JellyfinDiscordRPC.csproj", "{06FF6B5D-B070-4DB7-9A87-9B6E280A794D}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B615520C-ED8E-4BBE-A88B-96812A61C61F}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/JellyfinDiscordRPC/Program.cs b/JellyfinDiscordRPC/Program.cs index f13da8a..a74bda3 100644 --- a/JellyfinDiscordRPC/Program.cs +++ b/JellyfinDiscordRPC/Program.cs @@ -11,31 +11,54 @@ class Program private const string ConfigFilePath = "config.json"; private static DiscordRpcClient _discordClient; private static Config _config; - private static bool isScreenSharing = false; // Track screen sharing status - // Hard-code the Discord Client ID here - private const string DiscordClientId = "1312264302601834578"; // Discord client ID + // Hard-coded the Discord Client ID + private const string DiscordClientId = "1312264302601834578"; + + static bool presenceUpdated = false; // Flag to track initial rich presence update static async Task Main(string[] args) { - Console.WriteLine("Starting Jellyfin Discord Rich Presence..."); + // Load or create configuration first + LoadOrCreateConfig(); // Initialize _config first - // Load or create configuration - LoadOrCreateConfig(); + // Now we can safely access _config for the console title + Console.WriteLine("Starting Jellyfin Discord Rich Presence..."); + Console.Title = $"Jellyfin Discord RPC - {_config.JellyfinBaseUrl}"; // Initialize Discord Rich Presence _discordClient = new DiscordRpcClient(DiscordClientId); - _discordClient.OnReady += (sender, e) => Console.WriteLine("Connected to Discord RPC!"); - _discordClient.OnPresenceUpdate += (sender, e) => Console.WriteLine("Rich Presence updated!"); + _discordClient.OnReady += (sender, e) => + { + Console.WriteLine("Connected to Discord RPC!"); + + // Log message when connection to Discord is established + if (!presenceUpdated) + { + Console.WriteLine("Rich Presence updated!"); // This will only show once + presenceUpdated = true; // Set the flag to true to avoid logging it again + } + }; + + // Handle presence updates only once at the start + _discordClient.OnPresenceUpdate += (sender, e) => + { + if (!presenceUpdated) + { + Console.WriteLine("Rich Presence updated!"); + presenceUpdated = true; // Set the flag to true so it doesn't display again + } + }; + _discordClient.Initialize(); // Poll Jellyfin API for currently playing media var updateTask = UpdateRichPresence(); // Start the rich presence update task - await updateTask; // Wait for the rich presence update task to finish } + private static async Task UpdateRichPresence() { while (true) @@ -140,7 +163,7 @@ class Program var configJson = JsonSerializer.Serialize(_config, new JsonSerializerOptions { WriteIndented = true }); File.WriteAllText(ConfigFilePath, configJson); - Console.WriteLine("Configuration saved to config.json."); + Console.WriteLine("Configuration saved to config.json."); } }