chore(plus): add a warning when multiple keys found

This commit is contained in:
Phan An 2024-07-14 14:17:22 +02:00
parent 72973edfa4
commit dae5605098
2 changed files with 10 additions and 0 deletions

View file

@ -3,6 +3,7 @@
namespace App\Console\Commands; namespace App\Console\Commands;
use App\Enums\LicenseStatus; use App\Enums\LicenseStatus;
use App\Models\License;
use App\Services\License\Contracts\LicenseServiceInterface; use App\Services\License\Contracts\LicenseServiceInterface;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Throwable; use Throwable;
@ -21,6 +22,10 @@ class CheckLicenseStatusCommand extends Command
{ {
$this->components->info('Checking your Koel Plus license status…'); $this->components->info('Checking your Koel Plus license status…');
if (License::count() > 1) {
$this->components->warn('Multiple licenses found. This can cause unexpected behaviors.');
}
try { try {
$status = $this->licenseService->getStatus(checkCache: false); $status = $this->licenseService->getStatus(checkCache: false);

View file

@ -62,6 +62,11 @@ Solution: This most likely has little to do with Koel but more with your node/np
Solution: This may sometimes happen with the native PHP streaming method. Check [Streaming Music](usage/streaming) for alternatives. Solution: This may sometimes happen with the native PHP streaming method. Check [Streaming Music](usage/streaming) for alternatives.
### You receive a `Multiple licenses found` warning when running `koel:license:status` command
Solution: Koel Plus only requires one license key. If it detects more than one key in the database, the warning will be issued.
Most of the time this shouldn't cause any problem, but if you're experiencing issues, try emptying the `licenses` table and re-activating your license key.
## Reinstalling Koel ## Reinstalling Koel
In the worst case scenario, you can always reinstall Koel. Although Koel doesn't provide a built-in way to reinstall itself, you can do so manually by following these steps: In the worst case scenario, you can always reinstall Koel. Although Koel doesn't provide a built-in way to reinstall itself, you can do so manually by following these steps: