Skip to content

Commit

Permalink
Merge pull request #57 from KrystianLesniak/develop
Browse files Browse the repository at this point in the history
Release: 1.9.2
  • Loading branch information
KrystianLesniak authored Jan 25, 2025
2 parents 38d247b + 6bd3b8a commit ffeca7e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/GamesLauncher.Common/GamesLauncher.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


<ItemGroup>
<PackageReference Include="Flow.Launcher.Plugin" Version="4.1.1" />
<PackageReference Include="Flow.Launcher.Plugin" Version="4.4.0" />
</ItemGroup>

</Project>
15 changes: 12 additions & 3 deletions src/GamesLauncher.Platforms/SyncEngines/Steam/SteamSyncEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,21 @@ private Func<Task> GetSteamDeleteTask(string gameAppIdString)
private static string GetIconPath(SteamGame game)
{
var appIdString = game.AppId.ToString().Trim();
var iconCachePath = Path.Combine(game.SteamPath.ToString(), "appcache", "librarycache", $"{appIdString}_icon.jpg");
var iconCachePath = Path.Combine(game.SteamPath.ToString(), "appcache", "librarycache", appIdString);

if (!File.Exists(iconCachePath))
if(!Directory.Exists(iconCachePath))
return Path.Combine("Icons", "steam.png");

return iconCachePath;
var files = Directory
.GetFiles(iconCachePath, "*.jpg", SearchOption.TopDirectoryOnly)
.Where(file => {
string fileName = Path.GetFileName(file);
return !fileName.StartsWith("header", StringComparison.OrdinalIgnoreCase) &&
!fileName.StartsWith("library", StringComparison.OrdinalIgnoreCase) &&
!fileName.StartsWith("logo", StringComparison.OrdinalIgnoreCase);
});

return files.FirstOrDefault() ?? Path.Combine("Icons", "steam.png");
}
}
}
2 changes: 1 addition & 1 deletion src/GamesLauncher/GamesLauncher.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Flow.Launcher.Plugin" Version="4.1.1" />
<PackageReference Include="Flow.Launcher.Plugin" Version="4.4.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/GamesLauncher/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Name": "GamesLauncher",
"Description": "Search and launch games from multiple platforms like Steam, Epic Games, Xbox etc.",
"Author": "KrystianLesniak",
"Version": "1.9.1",
"Version": "1.9.2",
"Language": "csharp",
"Website": "https://github.com/KrystianLesniak/Flow.Launcher.Plugin.GamesLauncher",
"IcoPath": "icon.png",
Expand Down

0 comments on commit ffeca7e

Please sign in to comment.