diff --git a/apps/PlayniteWebPlugin/src/Models/Game.cs b/apps/PlayniteWebPlugin/src/Models/Game.cs index e545c7526..8c6f5844e 100755 --- a/apps/PlayniteWebPlugin/src/Models/Game.cs +++ b/apps/PlayniteWebPlugin/src/Models/Game.cs @@ -13,7 +13,6 @@ public class Game : IIdentifiable { private readonly IEnumerable releases; private readonly PlatformSorter platformSorter; - private readonly List pcSourceNames; private readonly List pcPlatformNames; private readonly List xboxPlatformNames; private readonly List nintendoPlatformNames; @@ -32,7 +31,6 @@ public Game(IEnumerable playniteGames) { platformSorter = new PlatformSorter(); - pcSourceNames = new List { "Steam", "EA app", "Ubisoft Connect", "Epic", "GOG", "Origin", "UPlay", "Battle.net", "Amazon Games", "Fanatical", "GamersGate", "Humble", "itch.io", "Legacy Games", "Indiegala", "Rockstar Games", "Riot Games", "RomM" }; pcPlatformNames = new List { ".*PC.*", ".*Macintosh.*", ".*Linux.*" }; xboxPlatformNames = new List { ".*Xbox.*" }; nintendoPlatformNames = new List { ".*Nintendo.*", ".*Switch.*", ".*Wii.*", ".*Game ?Cube.*" }; @@ -76,12 +74,6 @@ private bool IsMatchingPlatform(GameSource source, Platform platform) } - if (pcSourceNames.Any(platformName => platformName.ToLower() == source.Name.ToLower())) - { - return pcPlatformNames.Any(platformName => Regex.IsMatch(platform.Name, platformName, RegexOptions.IgnoreCase)); - } - - if (Regex.IsMatch(source.Name, "xbox", RegexOptions.IgnoreCase)) { return xboxPlatformNames.Any(platformName => Regex.IsMatch(platform.Name, platformName, RegexOptions.IgnoreCase)); @@ -93,7 +85,7 @@ private bool IsMatchingPlatform(GameSource source, Platform platform) return nintendoPlatformNames.Any(platformName => Regex.IsMatch(platform.Name, platformName, RegexOptions.IgnoreCase)); } - return false; + return pcPlatformNames.Any(platformName => Regex.IsMatch(platform.Name, platformName, RegexOptions.IgnoreCase)); ; } }