Adding ability to queue one or more app IDs at once

This commit is contained in:
ilumos 2017-09-07 22:27:45 +01:00
parent 3a1894a880
commit 9029701e91
2 changed files with 43 additions and 42 deletions

View file

@ -72,9 +72,9 @@ Automatically fill a [lancache](https://github.com/zeropingheroes/lancache) with
* Authorise a Steam account to allow download of apps in their library.
* If no account is specified, you will be prompted for the username
`steam:queue-app appid [--windows] [--osx] [--linux]`
`steam:queue-app appid [appid, appid...] [--windows] [--osx] [--linux]`
* Queue a Steam app for downloading.
* Queue one or more Steam apps for downloading.
* Optionally the platform(s) to download can be specified as options
* If no platform option is specified, the Windows version of the app will be queued

View file

@ -15,7 +15,7 @@ class QueueApp extends Command
* @var string
*/
protected $signature = 'steam:queue-app
{app_id : The ID of the app}
{app_ids* : One or more app IDs to queue}
{--windows=true : Queue the Windows version of the app}
{--osx : Queue the OS X version of the app}
{--linux : Queue the Linux version of the app}';
@ -34,10 +34,12 @@ class QueueApp extends Command
*/
public function handle()
{
$appId = $this->argument('app_id');
$appIds = $this->argument('app_ids');
foreach($appIds as $appId)
{
if (!$app = SteamApp::find($appId)) {
$this->error('Steam app with ID '.$this->argument('app_id').' not found');
$this->error('Steam app with ID '.$appId.' not found');
die();
}
@ -77,7 +79,6 @@ class QueueApp extends Command
}
}
}
}
}