fix(appstoreFetcher): get app list from custom app store

Signed-off-by: Grigorii K. Shartsev <me@shgk.me>
pull/48165/head
Grigorii K. Shartsev 2024-09-17 01:29:25 +07:00
parent 07ce8c7e84
commit 23e8424c19
2 changed files with 1 additions and 8 deletions

@ -176,14 +176,6 @@ class AppFetcher extends Fetcher {
public function get($allowUnstable = false): array {
$allowPreReleases = $allowUnstable || $this->getChannel() === 'beta' || $this->getChannel() === 'daily' || $this->getChannel() === 'git';
$appStoreEnabled = $this->config->getSystemValueBool('appstoreenabled', true);
$internetAvailable = $this->config->getSystemValueBool('has_internet_connection', true);
if (!$appStoreEnabled || !$internetAvailable) {
$this->logger->info('AppStore is disabled or this instance has no Internet connection', ['app' => 'appstoreFetcher']);
return [];
}
$apps = parent::get($allowPreReleases);
if (empty($apps)) {
return [];

@ -145,6 +145,7 @@ abstract class Fetcher {
$isDefaultAppStore = $this->config->getSystemValueString('appstoreurl', self::APP_STORE_URL) === self::APP_STORE_URL;
if (!$appstoreenabled || (!$internetavailable && $isDefaultAppStore)) {
$this->logger->info('AppStore is disabled or this instance has no Internet connection to access the default app store', ['app' => 'appstoreFetcher']);
return [];
}