Skip to content

Commit

Permalink
Cleaning up TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpill90 committed Jan 28, 2024
1 parent 2df5509 commit 4ca8594
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions SteamPrefill/Extensions/MiscExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
namespace SteamPrefill.Utils
namespace SteamPrefill.Extensions
{
public static class MiscExtensions
{
//TODO rename to IsEmpty
public static bool Empty<T>(this IEnumerable<T> enumerable)
{
return !enumerable.Any();
Expand Down
1 change: 0 additions & 1 deletion SteamPrefill/Handlers/Steam/LicenseManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public bool AccountHasAppAccess(uint appid)
return _userLicenses.OwnedAppIds.Contains(appid);
}

//TODO write test for all 3 of these conditions
/// <summary>
/// Checks against the list of currently owned depots + apps to determine if the user is able to download this depot.
/// There are 3 cases that a depot is considered owned :
Expand Down
4 changes: 0 additions & 4 deletions SteamPrefill/SteamManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ private async Task DownloadSingleAppAsync(uint appId)
var filteredDepots = await _depotHandler.FilterDepotsToDownloadAsync(_downloadArgs, appInfo.Depots);
if (filteredDepots.Empty())
{
//TODO add to summary output?
_ansiConsole.LogMarkupLine($"Starting {Cyan(appInfo)} {LightYellow("No depots to download. Current arguments filtered all depots")}");
return;
}
Expand All @@ -152,7 +151,6 @@ private async Task DownloadSingleAppAsync(uint appId)
await _cdnPool.PopulateAvailableServersAsync();

// Get the full file list for each depot, and queue up the required chunks
//TODO not a fan of having to do the status spinner here instead of inside the manifest handler
List<QueuedRequest> chunkDownloadQueue = null;
await _ansiConsole.StatusSpinner().StartAsync("Fetching depot manifests...", async _ =>
{
Expand Down Expand Up @@ -308,8 +306,6 @@ await _ansiConsole.CreateSpectreProgress(TransferSpeedUnit.Bytes, displayTransfe
var gamesToUse = await _appInfoHandler.GetAvailableGamesByIdAsync(appIds);
var overallProgressTask = ctx.AddTask("Processing games..".PadLeft(30), new ProgressTaskSettings { MaxValue = gamesToUse.Count });
//TODO add a retry loop + handle errors
//TODO figure out what happens if there are less than 5 cdns to use
await Parallel.ForEachAsync(gamesToUse, new ParallelOptions { MaxDegreeOfParallelism = 5 }, async (appInfo, _) =>
{
var individualProgressTask = ctx.AddTask($"{Cyan(appInfo.Name.Truncate(30).PadLeft(30))}");
Expand Down

0 comments on commit 4ca8594

Please sign in to comment.