Skip to content

Commit

Permalink
QOL for Remote
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed May 20, 2024
1 parent b24aa81 commit 0de5157
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
3 changes: 2 additions & 1 deletion RemoteDownloaderPlugin/Game/GameDownload.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ private async Task DownloadEmu(IApp app, EmuEntry entry)
{
throw new Exception("Multiple base images, impossible download");
}


Line2 = $"{entry.Files.Count(x => x.Type == "base")} base, {entry.Files.Count(x => x.Type == "update")} update, {entry.Files.Count(x => x.Type == "dlc")} dlc";
var basePath = Path.Join(app.GameDir, "Remote", entry.Emu);
string baseGamePath = null;
var extraFilesPath = Path.Join(app.GameDir, "Remote", entry.Emu, entry.GameId);
Expand Down
11 changes: 3 additions & 8 deletions RemoteDownloaderPlugin/Game/InstalledGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,9 @@ public void Delete()

public void OpenInFileManager()
{
if (_type == GameType.Emu)
{
LauncherGamePlugin.Utils.OpenFolderWithHighlightedFile(Path.Join(_plugin.App.GameDir, "Remote", _emuGame!.Emu, _emuGame.BaseFilename));
}
else
{
LauncherGamePlugin.Utils.OpenFolder(Path.Join(_plugin.App.GameDir, "Remote", "Pc", Game.Id));
}
LauncherGamePlugin.Utils.OpenFolder(_type == GameType.Emu
? Path.Join(_plugin.App.GameDir, "Remote", _emuGame!.Emu)
: Path.Join(_plugin.App.GameDir, "Remote", "Pc", Game.Id));
}

private Uri? ImageTypeToUri(ImageType type)
Expand Down
2 changes: 1 addition & 1 deletion RemoteDownloaderPlugin/Remote.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class EmuEntry : IEntry
public string Emu { get; set; }

[System.Text.Json.Serialization.JsonIgnore]
public long GameSize => Files.FirstOrDefault(x => x.Type == "base")?.DownloadSize ?? 0;
public long GameSize => Files.Sum(x => x.DownloadSize);
}

public class PcEntry : IEntry
Expand Down

0 comments on commit 0de5157

Please sign in to comment.