mirror of
https://github.com/koel/koel
synced 2024-11-24 05:03:05 +00:00
63 lines
1.6 KiB
PHP
63 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Events\LibraryChanged;
|
|
use App\Events\MediaScanCompleted;
|
|
use App\Events\MultipleSongsLiked;
|
|
use App\Events\MultipleSongsUnliked;
|
|
use App\Events\NewPlaylistCollaboratorJoined;
|
|
use App\Events\PlaybackStarted;
|
|
use App\Events\SongLikeToggled;
|
|
use App\Listeners\DeleteNonExistingRecordsPostScan;
|
|
use App\Listeners\LoveMultipleTracksOnLastfm;
|
|
use App\Listeners\LoveTrackOnLastfm;
|
|
use App\Listeners\MakePlaylistSongsPublic;
|
|
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,
|
|
],
|
|
|
|
MultipleSongsLiked::class => [
|
|
LoveMultipleTracksOnLastfm::class,
|
|
],
|
|
|
|
MultipleSongsUnliked::class => [
|
|
UnloveMultipleTracksOnLastfm::class,
|
|
],
|
|
|
|
PlaybackStarted::class => [
|
|
UpdateLastfmNowPlaying::class,
|
|
],
|
|
|
|
LibraryChanged::class => [
|
|
PruneLibrary::class,
|
|
],
|
|
|
|
MediaScanCompleted::class => [
|
|
DeleteNonExistingRecordsPostScan::class,
|
|
WriteSyncLog::class,
|
|
],
|
|
|
|
NewPlaylistCollaboratorJoined::class => [
|
|
MakePlaylistSongsPublic::class,
|
|
],
|
|
];
|
|
|
|
public function boot(): void
|
|
{
|
|
parent::boot();
|
|
|
|
Album::observe(AlbumObserver::class);
|
|
}
|
|
}
|