diff --git a/MainForm.cs b/MainForm.cs index 75fc2a37..1f39e444 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -3398,14 +3398,17 @@ public async void gamesListView_SelectedIndexChanged(object sender, EventArgs e) keyheld = true; } + string[] imageExtensions = { ".jpg", ".png" }; string ImagePath = ""; - if (File.Exists($"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.jpg")) - { - ImagePath = $"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.jpg"; - } - else if (File.Exists($"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.png")) + + foreach (string extension in imageExtensions) { - ImagePath = $"{SideloaderRCLONE.ThumbnailsFolder}\\{CurrentPackageName}.png"; + string path = Path.Combine(SideloaderRCLONE.ThumbnailsFolder, $"{CurrentPackageName}{extension}"); + if (File.Exists(path)) + { + ImagePath = path; + break; + } } if (gamesPictureBox.BackgroundImage != null)