2017-02-05 12:26:24 +00:00
# lancache-autofill
2017-08-17 17:37:55 +00:00
Automatically fill a [lancache ](https://github.com/zeropingheroes/lancache ) with the content of your choosing, so that subsequent downloads for the same content will be served from the lancache, improving speeds and reducing load on your internet connection.
2017-02-05 22:18:16 +00:00
2017-08-17 05:26:40 +00:00
# Features
2020-05-17 10:32:55 +00:00
* Download the top popular free and/or paid apps on Steam
2017-12-09 02:50:54 +00:00
* Download a specific app by ID
* Choose which platform(s) apps should be downloaded for
* Download one (or more) users recently played apps
* Download using multiple Steam accounts
* Check which apps will be downloaded
* Alter the download queue as needed
* Start downloading process and leave to run unattended
* Check which apps downloaded successfully
* Check which apps failed to download, and why
* Retry downloading of some or all failed apps
* Clear the temporary download directory
2018-04-24 21:26:30 +00:00
# Screenshots
![Queuing apps ](docs/screenshots/lancache-autofill-01.png )
![Starting the download process ](docs/screenshots/lancache-autofill-02.png )
2017-02-05 22:18:16 +00:00
2017-08-17 05:26:40 +00:00
# Requirements
2017-08-17 17:37:55 +00:00
* A working [lancache ](https://github.com/zeropingheroes/lancache )
2018-11-27 23:11:02 +00:00
* Ubuntu 18.04 x64, configured to download via the lancache
2017-08-17 17:37:55 +00:00
* Sufficient disk space to (temporarily) store the downloaded content
2017-12-09 02:51:17 +00:00
* Dependencies detailed in *Installation* section
2017-08-17 00:11:15 +00:00
# Installation
2017-12-09 02:53:36 +00:00
1. `sudo apt update -y`
2020-06-26 18:11:03 +00:00
2. `sudo apt install -y lib32gcc1 lib32stdc++6 lib32tinfo5 lib32ncurses5 php7.2-cli php7.2-mbstring php7.2-sqlite php7.2-bcmath php7.2-dom composer expect zip unzip`
2017-12-09 02:53:36 +00:00
3. `git clone https://github.com/zeropingheroes/lancache-autofill.git && cd lancache-autofill`
4. `./install.sh`
5. Get a Steam API key from http://steamcommunity.com/dev/apikey and add it to the `.env` file
2017-12-09 02:51:31 +00:00
# Usage
$ ./lancache-autofill
Usage:
lancache-autofill app:initialise-database
lancache-autofill app:initialise-downloads-directory
lancache-autofill steam:initialise
lancache-autofill steam:authorise-account [< account > ]
lancache-autofill steam:update-app-list
2018-09-15 20:26:10 +00:00
lancache-autofill steam:search-apps < app name >
2017-12-09 02:51:31 +00:00
lancache-autofill steam:queue-app < app id > [< app id > ...] [--windows=true] [--osx] [--linux]
2020-05-17 10:32:55 +00:00
lancache-autofill steam:queue-popular-apps [< top X apps > ] [--free] [--windows=true] [--osx] [--linux]
2017-12-09 02:51:31 +00:00
lancache-autofill steam:queue-users-recent-apps < steam id 64 > [< steam id 64 > ...] [--windows=true] [--osx] [--linux]
lancache-autofill steam:queue-users-recent-apps < steam-ids.txt > [--windows=true] [--osx] [--linux]
lancache-autofill steam:show-queue [< status > ]
lancache-autofill steam:start-downloading
lancache-autofill steam:dequeue [--app_id=] [--platform=] [--status=] [--message=]
lancache-autofill steam:requeue [status=failed] [--message=]
2017-08-17 05:26:40 +00:00
# Limitations & Known Issues
* Steam is the only supported platform currently
2017-08-17 17:37:55 +00:00
* Paid apps can only be cached with access to a Steam account that owns them
2017-08-17 05:26:40 +00:00
* No support for forcing download of 32 bit apps
* Yes, it's written in PHP. No shame.
2018-09-15 20:26:10 +00:00
# SteamCMD Errors
| Error | Possible Reason |
| ---------------------------------------------- | ------------------------------------------------- |
| `ERROR! Timed out waiting for AppInfo update.` | Unknown |
| `Login Failure: Rate Limit Exceeded (84)` | Unknown |
| `ERROR! Failed to install (No subscription)` | Game not owned by any authorised accounts |
| `Error! State is 0x202 after update job.` | Not enough space to download game |
| `Error! State is 0x402 after update job.` | Update required but not completed - check network |
| `Error! State is 0x602 after update job.` | Update required but not completed - check network |
For other error codes, you can calculate the app's state(s) by converting the `0x000` code to decimal,
and finding which [AppState codes ](https://github.com/lutris/lutris/blob/master/docs/steam.rst )
sum to the given code, which will give you some clues as to what's going on.
For example:
* [`0x402` to decimal ](https://www.google.co.uk/search?q=0x402+to+decimal ) = 1026
* 1026 is the sum of:
* 2: `StateUpdateRequired`
* 1024: `StateUpdateStarted`
2017-08-17 00:11:15 +00:00
# Reference
2017-02-05 22:18:16 +00:00
* [SteamCMD Reference ](https://developer.valvesoftware.com/wiki/SteamCMD )
* [SteamCMD Commands and Variables ](https://github.com/dgibbs64/SteamCMD-Commands-List/blob/master/steamcmdcommands.txt )
2017-09-07 20:48:58 +00:00
* [Laravel Query Builder ](https://laravel.com/docs/5.5/queries )
* [Laravel Artisan Console ](https://laravel.com/docs/5.5/artisan )
2017-08-17 00:16:06 +00:00
* [Symfony Process Component ](http://symfony.com/doc/current/components/process.html )
2017-08-17 17:37:55 +00:00
* [dotenv Reference ](https://github.com/vlucas/phpdotenv/blob/master/README.md )