koel/app/Console/Commands/PruneLibraryCommand.php

19 lines
398 B
PHP
Raw Normal View History

2021-12-10 15:22:35 +00:00
<?php
namespace App\Console\Commands;
use App\Events\LibraryChanged;
use Illuminate\Console\Command;
class PruneLibraryCommand extends Command
{
protected $signature = 'koel:prune';
protected $description = 'Remove empty artists and albums';
public function handle(): void
{
event(new LibraryChanged());
$this->info('Empty artists and albums removed.');
}
}