Git Product home page Git Product logo

steam-lancache-prefill's Introduction

steam-lancache-prefill

view - Documentation ko-fi

GitHub all releases dockerhub

Automatically fills a Lancache with games from Steam, so that subsequent downloads for the same content will be served from the Lancache, improving speeds and reducing load on your internet connection.

Overview

Features

  • Selecting which apps to prefill can be done through an interactive menu.
  • Supports login with Steam Guard, and Steam Guard Mobile Authenticator
  • No installation required! A completely self-contained, portable application.
  • Multi-platform support (Windows, Linux, MacOS, Arm64, Docker, Unraid)
  • High-performance! Downloads are significantly faster than using Steam. Downloads can scale all the way up to 100gbit/s!
  • Game downloads write no data to disk, so there is no need to have enough free space available. This also means no unnecessary wear-and-tear to SSDs!
  • Completely implemented from scratch, has no dependency on SteamCMD!
  • No Steam API key required!

Table of contents

Installation

SteamPrefill is flexible and portable, and supports multiple platforms and configurations. It can be run on directly on the Lancache server itself, or on your gaming machine as an alternative Steam client. You should decide which one works better for your use case.

Detailed setup guides are available for the following platforms:

Linux   Docker   unRAID   Windows

Getting Started

Selecting what to prefill

Warning This guide was written with Linux in mind. If you are running SteamPrefill on Windows you will need to substitute ./SteamPrefill with .\SteamPrefill.exe instead.

Prior to prefilling for the first time, you will have to decide which apps should be prefilled. This will be done using an interactive menu, for selecting what to prefill from all of your currently owned apps. To display the interactive menu, run the following command

./SteamPrefill select-apps

Once logged into Steam, all of your currently owned apps will be displayed for selection. Navigating using the arrow keys, select any apps that you are interested in prefilling with space. Once you are satisfied with your selections, save them with enter.

Interactive app selection

These selections will be saved permanently, and can be freely updated at any time by simply rerunning select-apps again at any time.

Initial prefill

Now that a prefill app list has been created, we can now move onto our initial prefill run by using

./SteamPrefill prefill

The prefill command will automatically pickup the prefill app list, and begin downloading each app. During the initial run, it is likely that the Lancache is empty, so download speeds should be expected to be around your internet line speed (in the below example, a 300mbit/s connection was used). Once the prefill has completed, the Lancache should be fully ready to serve clients cached data.

Initial Prefill

Updating previously prefilled apps

Updating any previously prefilled apps can be done by simply re-running the prefill command, which will use same prefill app list as before.

SteamPrefill keeps track of which version of each app was previously prefilled, and will only re-download if there is a newer version of the app available. Any apps that are currently up to date, will simply be skipped. The number of apps already up to date will be displayed in the end of run summary table:

Prefilled app up to date

However, if there is a newer version of an app that is available, then SteamPrefill will re-download the app. Due to how Lancache works, this subsequent run should complete much faster than the initial prefill (example below used a 10gbit connection). Any data that was previously downloaded, will be retrieved from the Lancache, while any new data from the update will be retrieved from the internet. Any apps that have been updated will be counted towards the "Updated" column in the end of run summary.

Prefill run when app has an update

Frequently Asked Questions

I have to login with my password? How do I know this is safe?

SteamPrefill, like Steam, will never save your password. Your password will only be temporarily used once during the initial login, and won't be save to disk anywhere. Upon login SteamPrefill will receive an "access token" that will be used on future logins, no password required. Since SteamPrefill is open source, you can validate that this is indeed how your password is being used in the source code.

For extra account security, it is good practice to enable 2 Factor Authentication (2FA) for your account using Steam Guard Mobile Authenticator. The authenticator generates a code that you need to enter every time that you log on to your Steam account. The code changes every 30 seconds, can be used only once, and is unguessable. To get setup, see the guide How to set up a Steam Guard Mobile Authenticator

Can I run SteamPrefill on the Lancache server?

You certainly can! All you need to do is download SteamPrefill onto the server, and run it as you regularly would!

If everything works as expected, you should see a message saying it found the server at 127.0.0.1

Prefill running on Lancache Server

Running from a Docker container on the Lancache server is also supported! You should instead see a message saying the server was found at 172.17.0.1

Prefill running on Lancache Server in Docker

Running on the Lancache server itself can give you some advantages over running SteamPrefill on a client machine, primarily the speed at which you can prefill apps.
Since there is no network transfer happening, the prefill should only be limited by disk I/O and CPU throughput.
For example, using a SK hynix Gold P31 2TB NVME and running prefill --force on previously cached game yields the following performance Prefill running on Lancache Server in Docker

Can SteamPrefill be run on a schedule?

Yes it can! Scheduled jobs can be easily setup on Linux using systemd services, and can be flexibly configured to run on any schedule that you desire.
See Configuring a Nightly Job for a guide on how to get setup with a schedule.

My logs have weird characters that make it hard to read. Is there any way to remove them?

Depending on the terminal that you are using, and what colors your system supports, you may see output similar to the following:

[6:20:46 PM] Starting �[38;5;80mCounter-Strike: Global Offensive�[0m
[6:20:46 PM] Downloading �[38;5;170m12.91 GiB�[0m

One of the reasons you may be seeing this is that your terminal is misreporting what capabilities it supports, thus receiving output that it can't handle.
To remove these characters from the log, simply use the flag --no-ansi which will remove all unsupported characters from the application's output.

Can I fill my cache using previously installed Steam games?

Unfortunately it is not possible to fill a Lancache using games that have been installed with Steam. The installed games are in a different format than what Lancache caches, as they are decrypted and unzipped from the raw request. The decryption/unzip process is not reversible. Thus, the only way to get games properly cached is to redownload them using either SteamPrefill or Steam

How can I limit download speeds?

You may want to limit the download speed of SteamPrefill to prevent it from potentially saturating your entire connection, causing other devices to suffer from massive latency and poor speeds. This issue is known as bufferbloat, and more detailed information on the issue can be found here: What is bufferbloat?

SteamPrefill does not currently contain any functionality to limit its own download speed, and due to the way that downloads are implemented will likely never be able to throttle its own download speed. Additionally, even if SteamPrefill was able to throttle itself, the same issue would persist with downloads through Steam.

One method to limit bandwidth would be to configure Quality of Service (QOS) on your router, limiting bandwidth to the Lancache server, or by prioritizing other network traffic. A general overview of QOS can be found here : Beginners guide to QOS

For more brand specific guides (non-exhaustive), see :

How do I pause my running downloads?

You can pause your downloads at any time by simply pressing CTRL + C, which will immediately terminate the application. This won't hurt anything at all, and SteamPrefill will pickup where it left off during the next prefill run.

Is it possible to prefill apps I don't own?

While it would certainly be helpful (and cheaper!) to prefill apps that you don't own, it is unfortunately not possible. In order to download from the Steam network, Steam requires you to authenticate with your username and password. Steam keeps track of which apps you own, which is how SteamPrefill displays the list of available apps in select-apps. When SteamPrefill attempts to download any app (owned or unowned) the Steam network will validate that you do indeed own that app. If you do not own it, then the Steam network will simply refuse to let you download it.

Detailed Command Usage

Note Detailed command documentation has been moved to the wiki : Detailed Command Usage

Updating

SteamPrefill will automatically check for updates, and notify you when an update is available :

Update available message

Automatically updating

  • Windows
    • Run the .\update.ps1 script in the executable directory
  • Linux
    • First time only : Grant executable permissions to the update script with chmod +x ./update.sh
    • Run the ./update.sh script in the executable directory
  • Docker
    • docker pull tpill90/steam-lancache-prefill:latest

Manually updating:

  1. Download the latest version for your OS from the Releases page.
  2. Unzip to the directory where SteamPrefill is currently installed, overwriting the previous executable.
  3. Thats it! You're all up to date!

Need Help?

If you are running into any issues, feel free to open up a Github issue on this repository.

You can also find us at the LanCache.NET Discord, in the #steam-prefill channel.

Additional Documentation

Acknowledgements

  • @dlrudie for all your help with debugging and testing!

steam-lancache-prefill's People

Contributors

bastians-bits avatar bgraf2311 avatar c9glax avatar comfuzio avatar harshithmohan avatar nurtic-vibe avatar tpill90 avatar turboslayer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

steam-lancache-prefill's Issues

Bug: Titles missing

Certain titles that appeared previously are not appearing in 1.2.0.

One example is the game Into the Breach.

image

Select-apps does not fill terminal

select-apps will leave empty space at the bottom of the terminal, depending on terminal size. Instead, it should fill the list of games to use all available vertical space.

image

Unable to prefill EA titles

I've been seeing a conistent issue in trying to prefill what seems to be exclusively EA titles using this tool, they fail instantly with the following error:

[8:56:32 AM] Starting Burnout:tm: Paradise Remastered
   Unexpected download error : An unexpected error occured while downloading manifests!  Skipping...

I've noticed it on Battlefield 1, Battlefield V and many other EA titles
All other non-EA titles prefill without issue. This is also using version 1.3.0 (latest at time of writing).

[Feature] Select-apps interface redesign feedback

Feedback desired

  • Navigation
    • Is the navigation intuitive? Does it make sense without reading documentation?
    • Is there anything frustrating about trying to navigate?
  • Could the text coloring be modified in any way that would make it easier to read?
  • Update documentation
  • Switch select-apps over to using new beta interface
  • Add a notice to select-apps-beta that command is deprectated.

Wrong False / Positive with AV Scanner (Win 11 Defender mybe more)

First of all:
There is NO VIRUS it is only a FALSE ALARM

The Problem:

With the Prefill File Version: SteamPrefill-1.3.1-win-x64 and Windows 11 and Defender:

Defender Security Update from 22.08.2022 12:48 Versions Number: 1.373.806.0

you can get a False/Postive Virus Found.

It is not Possible to access the File in Windows 11 or even download it. Chromium Browser no download, Firefox Download but no Access to File.

The Hash of the File should be: (Check with Powershell)


Get-FileHash .\SteamPrefill-1.3.1-win-x64.zip

Algorithm Hash

SHA256 6491C77C3778B2A2FE3D3A2172945742A5A5AF163311F3D1C0E1EEBE65DFD8D8


Error Message be like that in Windows:

image

Unable to download "Sid Meier's Civilization VI"

Originally posted by @stuart-c-moore in #70 (comment)

Here is the error log:

stuart@lancache:~/SteamPrefill-1.3.0-linux-x64$ cat errorlog.txt
[[10:48:40 PM]] An exception occurred while downloading manifests[[10:48:40 PM]] SteamPrefill.Models.Exceptions.ManifestException: No manifest request code was returned for 1523210 1523211 4005512837758401031
   at SteamPrefill.Handlers.ManifestHandler.GetManifestRequestCodeAsync(DepotInfo depot)
   at SteamPrefill.Handlers.ManifestHandler.GetSingleManifestAsync(DepotInfo depot, Server server)
   at SteamPrefill.Handlers.ManifestHandler.<>c__DisplayClass6_1.<<AttemptManifestDownloadAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__50`1.<<ForEachAsync>b__50_0>d.MoveNext()
--- End of stack trace from previous location ---
   at SteamPrefill.Handlers.ManifestHandler.<>c__DisplayClass6_0.<<AttemptManifestDownloadAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 79
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Progress\Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Internal\DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Progress\Progress.cs:line 116
   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 117
   at Spectre.Console.Status.StartAsync(String status, Func`2 action) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 77
   at SteamPrefill.Handlers.ManifestHandler.AttemptManifestDownloadAsync(List`1 depots)
   at SteamPrefill.Handlers.ManifestHandler.GetAllManifestsAsync(List`1 depots)[[10:48:44 PM]] An exception occurred while downloading manifests[[10:48:44 PM]] SteamPrefill.Models.Exceptions.ManifestException: No manifest request code was returned for 1523210 1523211 4005512837758401031
   at SteamPrefill.Handlers.ManifestHandler.GetManifestRequestCodeAsync(DepotInfo depot)
   at SteamPrefill.Handlers.ManifestHandler.GetSingleManifestAsync(DepotInfo depot, Server server)
   at SteamPrefill.Handlers.ManifestHandler.<>c__DisplayClass6_1.<<AttemptManifestDownloadAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__50`1.<<ForEachAsync>b__50_0>d.MoveNext()
--- End of stack trace from previous location ---
   at SteamPrefill.Handlers.ManifestHandler.<>c__DisplayClass6_0.<<AttemptManifestDownloadAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 79
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Progress\Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Internal\DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Progress\Progress.cs:line 116
   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 117
   at Spectre.Console.Status.StartAsync(String status, Func`2 action) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 77
   at SteamPrefill.Handlers.ManifestHandler.AttemptManifestDownloadAsync(List`1 depots)
   at SteamPrefill.Handlers.ManifestHandler.GetAllManifestsAsync(List`1 depots)[[10:48:52 PM]] An exception occurred while downloading manifests[[10:48:52 PM]] SteamPrefill.Models.Exceptions.ManifestException: No manifest request code was returned for 1523210 1523211 4005512837758401031
   at SteamPrefill.Handlers.ManifestHandler.GetManifestRequestCodeAsync(DepotInfo depot)
   at SteamPrefill.Handlers.ManifestHandler.GetSingleManifestAsync(DepotInfo depot, Server server)
   at SteamPrefill.Handlers.ManifestHandler.<>c__DisplayClass6_1.<<AttemptManifestDownloadAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__50`1.<<ForEachAsync>b__50_0>d.MoveNext()
--- End of stack trace from previous location ---
   at SteamPrefill.Handlers.ManifestHandler.<>c__DisplayClass6_0.<<AttemptManifestDownloadAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 79
--- End of stack trace from previous location ---
   at Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 120
--- End of stack trace from previous location ---
   at Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Progress\Progress.cs:line 133
--- End of stack trace from previous location ---
   at Spectre.Console.Internal.DefaultExclusivityMode.RunAsync[T](Func`1 func) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Internal\DefaultExclusivityMode.cs:line 40
   at Spectre.Console.Progress.StartAsync[T](Func`2 action) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Progress\Progress.cs:line 116
   at Spectre.Console.Status.StartAsync[T](String status, Func`2 func) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 117
   at Spectre.Console.Status.StartAsync(String status, Func`2 action) in C:\Users\Tim\Dropbox\Programming\dotnet-public\spectre.console\src\Spectre.Console\Live\Status\Status.cs:line 77
   at SteamPrefill.Handlers.ManifestHandler.AttemptManifestDownloadAsync(List`1 depots)

[Docs] Add instructions on how to update app

Currently, the readme.md only has documentation for initial setup of the app.

image

This documentation should be updated to include a section on how to update the app if you have already previously downloaded it, and are currently using it.

Implement --no-cache flag to skip saving manifest cache

  • Add --no-cache flag to prefill command
  • Implement always requesting the manifest from Steam when flag is enabled
  • Implement no data being written to disk when flag is enabled
  • Update readme with documentation on the flag

Feature request: prefill all to select the apps

If using prefill --all it may download all of the games but when you choose select-apps the games remain unselected. It would be nice to have it automatically mark the games downloaded as selected.

Failed to save Steam session key. Steam account will not stay logged in

When logging in, sometimes Steam will fail to save the session and will show the following error :

image

This issue prevents users from being able to use the app without logging in every time, which also prevents the use of this app in a cron job.

Findings so far

  • When using the Lancache with two copies of SteamPrefill, logging into the first copy will cause the second to be kicked out. Then logging in with the second one will cause the first one to be kicked out.
  • If I disable the Lancache, then the above no longer occurs.
  • Removing the Logout() call in Steam3Session.cs seems to prevent other login sessions from getting bounced. Tested by logging into multiple SteamPrefill instances, waiting over the weekend, and then running SteamPrefill Monday morning. No SteamPrefill instances were logged out.
  • The "Failed to save Steam session key" seems to be reliably reproducible by logging into multiple instances of SteamPrefill back-to-back. They appear to go away after a certain period of time, it may be Steam throttling logins.

--nocache not working

https://github.com/tpill90/steam-lancache-prefill#prefill

$ docker run   -v ${PWD}/Cache:/app/Cache   -v ${PWD}/Config:/app/Config   -it   --rm   kirbownz/steam-prefill-docker:latest   prefill --nocache
Unrecognized option(s):
--nocache

SteamPrefill v1.3.1
  Automatically fills a Lancache with games from Steam, so that subsequent downloads will be 
  served from the Lancache, improving speeds and reducing load on your internet connection. 

  Start by selecting apps for prefill with the 'select-apps' command, then start the prefill using 'prefill'

USAGE
  SteamPrefill prefill [options]

DESCRIPTION
  Downloads the latest version of one or more specified app(s).  Automatically includes apps selected using the 'select-apps' command

OPTIONS
  --all             Prefills all currently owned apps 
  -f|--force        Forces the prefill to always run, overrides the default behavior of only prefilling if a newer version is available. 
  -d|--dns-override  Deprecated, will be removed in a future version.  Manually specifies the Lancache IP, used to prefill on the Lancache server.  Ex, '192.168.1.111' 
  -h|--help         Shows help text. 

libicu is required to run the app

The package libicu is required to run the app. This means users who choose to run the app in a docker container will have to build their own image from a Dockerfile.

The full error given when trying to run the app without libicu installed: Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.

[Feature] Benchmark Mode

Implementation details

  • CLI Interface
    • SteamPrefill.exe benchmark setup
      • --use-selected - Generates a benchmark file from the currently selected apps.
      • --appid 1234 5678 910 - Generates a file from 1 or more specified app ids
      • --all - Generates a file with all owned apps
      • User must own specified apps in order to generate a benchmark file.
      • Displays the apps that are included, their number of files, and their total size.
    • SteamPrefill.exe benchmark run
      • Uses the default benchmark file.
      • --concurrency - Specifies how many concurrent requests.
      • --iterations - Specifies how many iterations to run.
      • Reports statistics in a summary table
        • Min speed
        • Max speed
        • Average speed
  • Setup/config logic
    • When selecting a list of apps to benchmark, it should download all manifests + generate a benchmark file.
    • Benchmark file should be portable. Should have no need to login to Steam.
    • Should the CDNs be resolved ahead of time, and kept in the benchmark file?
  • Benchmark logic
    • Upon starting a benchmark run, should randomize the list of requests to be made
    • Requests should be ran in an infinite loop.
  • Error handling
    • How should errors be handled? Too many errors could make it seem like the download speed is faster than it really is. Fail out on errors?
    • Suppose a user keeps around an old "benchmark" file, and those files are no longer available on the CDN. How should this be handled?
  • Documentation
    • Users should select enough apps to prefill, so that the download queue exceeds the capacity of the LC host's ram. To ensure that only disk IO is being tested.
    • Document how to use this feature in readme.md
    • Document benchmark setup detailed command usage
    • Document benchmark run detailed command usage
    • Document how to decide on a good benchmark

Alternative sorting methods for game selection

Sorting games by most recently played would help speed up the init for the games to prefill.

People with huge libraries could be scrolling for quite some time before finding the 20 out of 200 games that they want to prefill, having the games you want to play the most right at the top would be great for speeding that up.

ARM support?

Hi,
It would be really cool if i can run this script on my low powered raspberry pi,
so that i don't need my main pc to download games overnight,
it will be comparing 4w power consumption to 100w.

hardware:
pi4B

  • 4GB of ram
  • 64bit system

thanks

Downloading doesn't use trigger domain

Currently the application makes connections directly to the hostnames of the CDN servers, relying on DNS poisoning of all CDN server hostnames to work correctly.

This needs to be updated to work in a way similar to steamcmd and the Steam Client, where it checks to see if lancache.steamcontent.com resolves to a private IP address. If so, it will open HTTP connections specifically to that IP address; and then use the Host: header to specify the upstream CDN server; instead of connecting to the hostname of the CDN server.

We are planning to remove all the other Steam hostnames from uklans/cache-domains and only have the trigger domain, lancache.steamcontent.com at some point this year, so this behaviour will need updating before then.

Feature request: display year for games with the same title

Certain games may be re-released or be remade/remastered and share the same title. The list will just show both titles but you don't know which is which. Maybe check if there are multiple games that share the same title to display the year of the game afterwards.

image

Prey (2006)
Prey (2017)

Unexpected download error / X failed downloads

[10:05:50 PM] Starting Cyberpunk 2077
[10:05:51 PM] Downloading 60.67 GiB
3456 failed downloads
[10:07:33 PM] Finished in 01:42.15 - 5101.42 Mbit/s

[10:07:33 PM] Starting Eco
[10:07:33 PM] Downloading 1.28 GiB
8 failed downloads
[10:07:46 PM] Finished in 13.13 - 839.28 Mbit/s

[10:07:48 PM] Starting Garry's Mod
[10:07:48 PM] Downloading 2.25 GiB
16 failed downloads
[10:08:01 PM] Finished in 13.45 - 1435.66 Mbit/s
2022/08/29 16:03:32 [error] 1971#1971: *308621 unexpected status code 200 in slice response while reading response header 
from upstream, client: 172.16.10.35, server: , request: "GET /depot/1091501/chunk
/b9bb9f2e8e012ec15168490514a7cb5edc601aa8 HTTP/1.1", subrequest: "/depot/1091501/chunk
/b9bb9f2e8e012ec15168490514a7cb5edc601aa8", upstream: "http://155.133.248.15:80/depot/1091501/chunk
/b9bb9f2e8e012ec15168490514a7cb5edc601aa8", host: "cache4-ams1.steamcontent.com"

Exception while scrolling through pages of apps

When using page down to select an app it will throw an exception after the 12th page. It this to me in Windows and in Linux.

Output from Windows Terminal:
image

Copy/pasted exception for clarity:

System.NullReferenceException: Object reference not set to an instance of an object.
  at Spectre.Console.ExceptionFormatter.TryGetTupleName(ParameterInfo parameter, Type parameterType, String& tupleName) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:314
  at Spectre.Console.ExceptionFormatter.GetParameterName(ParameterInfo parameter) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:280
  at Spectre.Console.ExceptionFormatter.<>c__DisplayClass4_0.<AppendParameters>b__0(ParameterInfo x) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:121
  at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
  at System.String.Join(String separator, IEnumerable`1 values)
  at Spectre.Console.ExceptionFormatter.AppendParameters(StringBuilder builder, MethodBase method, ExceptionSettings settings) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:125
  at Spectre.Console.ExceptionFormatter.GetStackFrames(Exception ex, ExceptionSettings settings) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:86
  at Spectre.Console.ExceptionFormatter.GetException(Exception exception, ExceptionSettings settings) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:22
  at Spectre.Console.ExceptionFormatter.Format(Exception exception, ExceptionSettings settings) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Widgets\Exceptions\ExceptionFormatter.cs:7
  at Spectre.Console.ExceptionExtensions.GetRenderable(Exception exception, ExceptionSettings settings) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Extensions\ExceptionExtensions.cs:40
  at Spectre.Console.ExceptionExtensions.GetRenderable(Exception exception, ExceptionFormats format) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Extensions\ExceptionExtensions.cs:21
  at Spectre.Console.AnsiConsoleExtensions.WriteException(IAnsiConsole console, Exception exception, ExceptionFormats format) in C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Extensions\AnsiConsoleExtensions.Exceptions.cs:16
  at SteamPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(IConsole console)
  at CliFx.CliApplication.RunAsync(ApplicationSchema applicationSchema, CommandInput commandInput) in D:\a\CliFx\CliFx\CliFx\CliApplication.cs:147
  at CliFx.CliApplication.RunAsync(IReadOnlyList`1 commandLineArguments, IReadOnlyDictionary`2 environmentVariables) in D:\a\CliFx\CliFx\CliFx\CliApplication.cs:191

[Bug] Password prompt causes Cron job to hang

I know that I have been logged out at least once in the past, which I realized when trying to set up a cron job. That cron job also does not give any alert that something is wrong if it fails, and I only could know that there was an issue if I looked at the logs for the job (which I manually set up)

Originally posted by @EthRousseau in #56 (comment)

  • Bump up the timeout to 1 minute

Duplicate Key error

Please enter your Steam password. (Password won't be saved) : *********
This account is protected by Steam Guard.  Please enter the code sent to your email address: *****
[12:54:50 PM] Logged into Steam
System.ArgumentException: An item with the same key has already been added. Key: 414170
System.ArgumentException: An item with the same key has already been added. Key: 414170
  at bool System.Collections.Generic.Dictionary`2.TryInsert(TKey , TValue , InsertionBehavior )
  at Dictionary<TKey, TElement> System.Linq.Enumerable.ToDictionary<TSource,TKey,TElement>(IEnumerable<TSource> ,
     Func<TSource, TKey> , Func<TSource, TElement> , IEqualityComparer<TKey> )
  at void SteamPrefill.Handlers.Steam.Steam3Session.LoadPackageInfo(IReadOnlyCollection<License> licenseList)
  at void SteamPrefill.Handlers.Steam.Steam3Session.LicenseListCallback(LicenseListCallback licenseList)
  at void SteamKit2.Internal.Callback`1.Run(object callback)
  at void SteamKit2.CallbackManager.<>c__DisplayClass10_0.<Handle>b__1(CallbackBase callback)
  at void System.Collections.Generic.List`1.ForEach(Action<T> )
  at void SteamKit2.CallbackManager.Handle(ICallbackMsg call)
  at void SteamKit2.CallbackManager.RunWaitAllCallbacks(TimeSpan timeout)
  at void SteamPrefill.Handlers.Steam.Steam3Session.TryWaitForLoginKey()
  at void SteamPrefill.Handlers.Steam.Steam3Session.<LoginToSteam>b__20_0(StatusContext _)
  at Task Spectre.Console.Status.<>c__DisplayClass14_0.<Start>b__0(StatusContext ctx) in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Status
     \Status.cs:44
  at void Spectre.Console.Status.<>c__DisplayClass16_0.<<StartAsync>b__0>d.MoveNext() in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Status
     \Status.cs:79
  at void Spectre.Console.Status.<>c__DisplayClass17_0`1.<<StartAsync>b__0>d.MoveNext() in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Status
     \Status.cs:120
  at void Spectre.Console.Progress.<>c__DisplayClass28_0`1.<<StartAsync>b__0>d.MoveNext() in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Progre
     ss\Progress.cs:133
  at async Task<T> Spectre.Console.Internal.DefaultExclusivityMode.RunAsync<T>(Func<Task<T>> func) in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Internal\
     DefaultExclusivityMode.cs:40
  at async Task<T> Spectre.Console.Progress.StartAsync<T>(Func<ProgressContext, Task<T>> action) in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Progre
     ss\Progress.cs:116
  at async Task<T> Spectre.Console.Status.StartAsync<T>(string status, Func<StatusContext, Task<T>> func) in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Status
     \Status.cs:117
  at async Task Spectre.Console.Status.StartAsync(string status, Func<StatusContext, Task> action) in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Status
     \Status.cs:77
  at void Spectre.Console.Status.Start(string status, Action<StatusContext> action) in
     C:\Users\Tim\Dropbox\Programming\dotnet-public\SteamPrefill\External\SpectreConsole\src\Spectre.Console\Live\Status
     \Status.cs:48
  at void SteamPrefill.Handlers.Steam.Steam3Session.LoginToSteam()
  at void SteamPrefill.SteamManager.Initialize()
  at async ValueTask SteamPrefill.CliCommands.SelectAppsCommand.ExecuteAsync(IConsole console)

Statically linked binaries for linux

Hi,

Would it be possible to build the app with static links so that it could run any distro?

Trying to run this on alpine which doesn't have glibc but musl libc :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.