feat(plus): disable scanning for cloud storages

This commit is contained in:
Phan An 2024-02-23 16:37:13 +07:00
parent 268f7849f2
commit bcb92c35a2
2 changed files with 12 additions and 0 deletions

View file

@ -27,6 +27,12 @@ class CollectTagsCommand extends Command
public function handle(): int
{
if (config('koel.storage_driver') !== 'local') {
$this->components->error('This command only works with the local storage driver.');
return self::INVALID;
}
$tags = collect($this->argument('tag'))->unique();
if ($tags->diff(self::COLLECTABLE_TAGS)->isNotEmpty()) {

View file

@ -50,6 +50,12 @@ class ScanCommand extends Command
public function handle(): int
{
if (config('koel.storage_driver') !== 'local') {
$this->components->error('This command only works with the local storage driver.');
return self::INVALID;
}
$this->mediaPath = $this->getMediaPath();
$config = ScanConfiguration::make(