Skip to content

Commit

Permalink
Remote: Show platform
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Jun 1, 2024
1 parent 0de5157 commit 77d66e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion RemoteDownloaderPlugin/Game/InstalledGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public bool HasImage(ImageType type)
if (url == null)
return Task.FromResult<byte[]?>(null);

return Storage.Cache($"{Game.Id}_{type}", () => Storage.ImageDownload(url));
return Storage.Cache($"{Game.Id}_{type}.jpg", () => Storage.ImageDownload(url));
}

public InstalledStatus InstalledStatus => InstalledStatus.Installed;
Expand All @@ -32,6 +32,10 @@ public bool HasImage(ImageType type)
? LauncherGamePlugin.Utils.GuessPlatformBasedOnString(_plugin.Storage.Data.EmuProfiles.FirstOrDefault(x => x.Platform == _emuGame!.Emu)?.ExecPath)
: LauncherGamePlugin.Utils.GuessPlatformBasedOnString(_pcLaunchDetails!.LaunchExec);

public string GamePlatform => (_type == GameType.Emu)
? _emuGame!.Emu
: "Pc";

public ProgressStatus? ProgressStatus => null;
public event Action? OnUpdate;

Expand Down
2 changes: 1 addition & 1 deletion RemoteDownloaderPlugin/Game/OnlineGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public bool HasImage(ImageType type)
if (url == null)
return Task.FromResult<byte[]?>(null);

return Storage.Cache($"{Entry.GameId}_{type}", () => Storage.ImageDownload(url));
return Storage.Cache($"{Entry.GameId}_{type}.jpg", () => Storage.ImageDownload(url));
}

public InstalledStatus InstalledStatus => InstalledStatus.NotInstalled;
Expand Down
1 change: 1 addition & 0 deletions RemoteDownloaderPlugin/Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public List<Command> GetGameCommands(IGame game)
new Command(game.IsRunning ? "Running" : "Launch", installedGame.Play),
new Command("Open in File Manager", installedGame.OpenInFileManager),
new Command($"Version: {installedGame.Game.Version}"),
new Command($"Platform: {installedGame.GamePlatform}"),
new Command("Uninstall", () =>
App.Show2ButtonTextPrompt($"Do you want to uninstall {game.Name}?", "Yes", "No", _ =>
{
Expand Down

0 comments on commit 77d66e8

Please sign in to comment.