diff --git a/.vs/JellyfinDiscordRPC/FileContentIndex/5c63eb47-878c-4bec-9310-d060b026e5f3.vsidx b/.vs/JellyfinDiscordRPC/FileContentIndex/5c63eb47-878c-4bec-9310-d060b026e5f3.vsidx deleted file mode 100644 index fa64053..0000000 Binary files a/.vs/JellyfinDiscordRPC/FileContentIndex/5c63eb47-878c-4bec-9310-d060b026e5f3.vsidx and /dev/null differ diff --git a/.vs/JellyfinDiscordRPC/FileContentIndex/7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx b/.vs/JellyfinDiscordRPC/FileContentIndex/7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx new file mode 100644 index 0000000..b5daebf Binary files /dev/null and b/.vs/JellyfinDiscordRPC/FileContentIndex/7446f8db-1993-4f61-8cd6-bbe9de0002d2.vsidx differ diff --git a/.vs/JellyfinDiscordRPC/v17/.futdcache.v2 b/.vs/JellyfinDiscordRPC/v17/.futdcache.v2 index 4a8e466..60e35d4 100644 Binary files a/.vs/JellyfinDiscordRPC/v17/.futdcache.v2 and b/.vs/JellyfinDiscordRPC/v17/.futdcache.v2 differ diff --git a/.vs/JellyfinDiscordRPC/v17/DocumentLayout.backup.json b/.vs/JellyfinDiscordRPC/v17/DocumentLayout.backup.json index f7a4958..7bd1f1e 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": "AgIAACcAAAAAAAAAAADwv0UAAAAnAAAAAAAAAA==", + "ViewState": "AgIAAEEAAAAAAAAAAAAswGQAAAAFAAAAAAAAAA==", "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 5c195c1..a2d9884 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": "AgIAADkAAAAAAAAAAADwv0IAAAA/AAAAAAAAAA==", + "ViewState": "AgIAADUAAAAAAAAAAAAswGQAAAAFAAAAAAAAAA==", "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", "WhenOpened": "2024-11-30T05:30:39.706Z", "EditorCaption": "" diff --git a/JellyfinDiscordRPC/Program.cs b/JellyfinDiscordRPC/Program.cs index 13d2b02..f13da8a 100644 --- a/JellyfinDiscordRPC/Program.cs +++ b/JellyfinDiscordRPC/Program.cs @@ -56,18 +56,22 @@ class Program string details = playingInfo.IsMusic ? $"{playingInfo.Title}" // Show song name - : $"Watching: {nowPlaying["SeriesName"]?.ToString() ?? "Unknown Series"} - {playingInfo.Title}"; // Show series and episode name + : nowPlaying["SeriesName"] != null + ? $"Watching: {nowPlaying["SeriesName"]} - {playingInfo.Title}" // Show series and episode name + : $"Watching: {playingInfo.Title}"; // For movies, show only the title string state = playingInfo.IsMusic ? $"{playingInfo.Artist}" // Show artist name - : $"Season {playingInfo.Season}, Episode {playingInfo.Episode}"; + : nowPlaying["SeriesName"] != null + ? $"Season {playingInfo.Season}, Episode {playingInfo.Episode}" // Show season and episode for series + : ""; // Leave state empty for movies Console.WriteLine($"Updating presence with details: {details}, state: {state}"); _discordClient.SetPresence(new RichPresence { Details = details, - State = state, + State = string.IsNullOrWhiteSpace(state) ? null : state, // Avoid sending empty state to Discord Timestamps = new Timestamps { Start = DateTime.UtcNow - playingInfo.Progress,