From 2591973166d87ce6f34da5c20090cd3b18050b86 Mon Sep 17 00:00:00 2001 From: Dinesh Solanki <15937452+dineshsolanki@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:39:03 +0530 Subject: [PATCH] check saved IconOverlay config for null, fix a typo in readme that left table tag open --- FoliCon/Models/Constants/GlobalVariables.cs | 10 ++++++++-- README.md | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/FoliCon/Models/Constants/GlobalVariables.cs b/FoliCon/Models/Constants/GlobalVariables.cs index cc3cdf53..4cdfab3d 100644 --- a/FoliCon/Models/Constants/GlobalVariables.cs +++ b/FoliCon/Models/Constants/GlobalVariables.cs @@ -19,6 +19,12 @@ public static IconOverlay IconOverlayType() public const string MediaInfoFile = "info.folicon"; - private static string IconOverlayTypeString => - Services.Tracker.Store.GetData("PosterIconConfigViewModel")?["p.IconOverlay"]?.ToString() ?? IconOverlay.Liaher.ToString(); + private static string IconOverlayTypeString + { + get + { + var data = Services.Tracker.Store.GetData("PosterIconConfigViewModel"); + return data.TryGetValue("p.IconOverlay", out var value) ? value.ToString() : IconOverlay.Liaher.ToString(); + } + } } \ No newline at end of file diff --git a/README.md b/README.md index 81e91dcd..74fe8542 100644 --- a/README.md +++ b/README.md @@ -100,5 +100,5 @@ Thank you to the following individuals who have provided invaluable inputs throu MasoudRahmani
@MasoudRahmani
PoetaGA
@PoetaGA
- +
... and many more who have interacted with us through issues and discussions.