mirror of
https://github.com/koel/koel
synced 2024-11-15 00:47:18 +00:00
57 lines
1.4 KiB
PHP
57 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\LibraryChanged;
|
|
use App\Events\MediaSyncCompleted;
|
|
use App\Events\PlaybackStarted;
|
|
use App\Events\SongLikeToggled;
|
|
use App\Events\SongsBatchLiked;
|
|
use App\Events\SongsBatchUnliked;
|
|
use App\Listeners\DeleteNonExistingRecordsPostSync;
|
|
use App\Listeners\LoveMultipleTracksOnLastfm;
|
|
use App\Listeners\LoveTrackOnLastfm;
|
|
use App\Listeners\PruneLibrary;
|
|
use App\Listeners\UnloveMultipleTracksOnLastfm;
|
|
use App\Listeners\UpdateLastfmNowPlaying;
|
|
use App\Listeners\WriteSyncLog;
|
|
use App\Models\Album;
|
|
use App\Observers\AlbumObserver;
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as BaseServiceProvider;
|
|
|
|
class EventServiceProvider extends BaseServiceProvider
|
|
{
|
|
protected $listen = [
|
|
SongLikeToggled::class => [
|
|
LoveTrackOnLastfm::class,
|
|
],
|
|
|
|
SongsBatchLiked::class => [
|
|
LoveMultipleTracksOnLastfm::class,
|
|
],
|
|
|
|
SongsBatchUnliked::class => [
|
|
UnloveMultipleTracksOnLastfm::class,
|
|
],
|
|
|
|
PlaybackStarted::class => [
|
|
UpdateLastfmNowPlaying::class,
|
|
],
|
|
|
|
LibraryChanged::class => [
|
|
PruneLibrary::class,
|
|
],
|
|
|
|
MediaSyncCompleted::class => [
|
|
DeleteNonExistingRecordsPostSync::class,
|
|
WriteSyncLog::class,
|
|
],
|
|
];
|
|
|
|
public function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
Album::observe(AlbumObserver::class);
|
|
}
|
|
}
|