From b938c865d8605e87a2b5b6ff1a277a8de0494695 Mon Sep 17 00:00:00 2001 From: Lacro59 Date: Fri, 4 Mar 2022 10:09:38 +0100 Subject: [PATCH] added missing store in plugin settings --- source/MetadataLocalProvider.cs | 3 +-- source/MetadataLocalSettings.cs | 8 +++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/source/MetadataLocalProvider.cs b/source/MetadataLocalProvider.cs index 710baa5..313d4b5 100644 --- a/source/MetadataLocalProvider.cs +++ b/source/MetadataLocalProvider.cs @@ -183,7 +183,6 @@ public override string GetDescription(GetMetadataFieldArgs args) if (ForceStoreName.IsNullOrEmpty() && !(!Options.IsBackgroundDownload && Settings.EnableSelectStore)) { Common.LogDebug(true, "Used many stores"); - foreach (Store store in Settings.Stores) { ForceStoreName = store.Name; @@ -191,7 +190,7 @@ public override string GetDescription(GetMetadataFieldArgs args) if (!Description.IsNullOrEmpty()) { - Common.LogDebug(true, $"find with {ForceStoreName} for {GameName}"); + Common.LogDebug(true, $"Find with {ForceStoreName} for {GameName}"); return Description; } } diff --git a/source/MetadataLocalSettings.cs b/source/MetadataLocalSettings.cs index 83683f2..0c4b133 100644 --- a/source/MetadataLocalSettings.cs +++ b/source/MetadataLocalSettings.cs @@ -1,4 +1,5 @@ -using MetadataLocal.Models; +using CommonPluginsShared.Extensions; +using MetadataLocal.Models; using Playnite.SDK; using Playnite.SDK.Data; using System.Collections.Generic; @@ -63,6 +64,11 @@ public MetadataLocalSettingsViewModel(MetadataLocal plugin) Settings.Stores.Add(new Store { Name = "Origin" }); Settings.Stores.Add(new Store { Name = "Xbox" }); Settings.Stores.Add(new Store { Name = "Ubisoft" }); + Settings.Stores.Add(new Store { Name = "GOG" }); + } + else if (Settings.Stores.Find(x => x.Name.IsEqual("GOG")) == null) + { + Settings.Stores.Add(new Store { Name = "GOG" }); } }