Skip to content

Commit

Permalink
added missing store in plugin settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacro59 committed Mar 4, 2022
1 parent 17326e1 commit b938c86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions source/MetadataLocalProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,15 +183,14 @@ 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;
Description = GetDescription(args);

if (!Description.IsNullOrEmpty())
{
Common.LogDebug(true, $"find with {ForceStoreName} for {GameName}");
Common.LogDebug(true, $"Find with {ForceStoreName} for {GameName}");
return Description;
}
}
Expand Down
8 changes: 7 additions & 1 deletion source/MetadataLocalSettings.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using MetadataLocal.Models;
using CommonPluginsShared.Extensions;
using MetadataLocal.Models;
using Playnite.SDK;
using Playnite.SDK.Data;
using System.Collections.Generic;
Expand Down Expand Up @@ -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" });
}
}

Expand Down

0 comments on commit b938c86

Please sign in to comment.