Skip to content

Commit 8cc6a9c

Browse files
committed
Pull missing apps on update apps list
1 parent 18001fb commit 8cc6a9c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/Jobs/ProcessApps.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Illuminate\Support\Facades\Storage;
1111
use App\Application;
1212
use App\SupportedApps;
13+
use App\Item;
1314

1415
class ProcessApps implements ShouldQueue
1516
{
@@ -42,5 +43,13 @@ public function handle()
4243
$app->save();
4344
}
4445

46+
$items = Item::whereNotNull('class')->get();
47+
foreach($items as $item) {
48+
if(!file_exists(app_path('SupportedApps/'.Item::nameFromClass($item->class)))) {
49+
$app = Application::where('class', $item->class)->first();
50+
Application::getApp($app->appid);
51+
}
52+
}
53+
4554
}
4655
}

0 commit comments

Comments
 (0)