Skip to content

Commit

Permalink
fix region priority
Browse files Browse the repository at this point in the history
  • Loading branch information
spektor56 committed Sep 12, 2020
1 parent de578da commit 366e06c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion LBGDBMetadata/LbgdbMetadataProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ private GameImage GetBestImage(List<GameImage> images, HashSet<string> imageType

if (_options.GameData.Region != null && !string.IsNullOrWhiteSpace(_options.GameData.Region.Name))
{
imagePriority.Add(_options.GameData.Region.Name, 1);
if (imagePriority.ContainsKey(_options.GameData.Region.Name))
{
imagePriority[_options.GameData.Region.Name] = 1;
}
else
{
imagePriority.Add(_options.GameData.Region.Name, 1);
}
}

foreach (var coverType in imageTypes)
Expand Down

0 comments on commit 366e06c

Please sign in to comment.