2015-12-13 04:42:28 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2018-08-19 09:05:33 +00:00
|
|
|
use App\Events\LibraryChanged;
|
2024-01-04 21:51:32 +00:00
|
|
|
use App\Events\MediaScanCompleted;
|
2024-01-10 21:37:24 +00:00
|
|
|
use App\Events\MultipleSongsLiked;
|
|
|
|
use App\Events\MultipleSongsUnliked;
|
2024-01-25 16:21:26 +00:00
|
|
|
use App\Events\NewPlaylistCollaboratorJoined;
|
2024-01-02 13:10:06 +00:00
|
|
|
use App\Events\PlaybackStarted;
|
2018-08-19 09:05:33 +00:00
|
|
|
use App\Events\SongLikeToggled;
|
2024-02-05 21:17:41 +00:00
|
|
|
use App\Listeners\DeleteNonExistingRecordsPostScan;
|
2021-06-04 15:19:33 +00:00
|
|
|
use App\Listeners\LoveMultipleTracksOnLastfm;
|
2018-08-19 09:05:33 +00:00
|
|
|
use App\Listeners\LoveTrackOnLastfm;
|
2024-01-25 16:21:26 +00:00
|
|
|
use App\Listeners\MakePlaylistSongsPublic;
|
2021-12-10 15:22:35 +00:00
|
|
|
use App\Listeners\PruneLibrary;
|
2021-06-04 15:19:33 +00:00
|
|
|
use App\Listeners\UnloveMultipleTracksOnLastfm;
|
2018-08-19 09:05:33 +00:00
|
|
|
use App\Listeners\UpdateLastfmNowPlaying;
|
2023-12-25 17:15:49 +00:00
|
|
|
use App\Listeners\WriteSyncLog;
|
2015-12-13 04:42:28 +00:00
|
|
|
use App\Models\Album;
|
2018-08-29 07:58:46 +00:00
|
|
|
use App\Observers\AlbumObserver;
|
2022-08-01 10:42:33 +00:00
|
|
|
use Illuminate\Foundation\Support\Providers\EventServiceProvider as BaseServiceProvider;
|
2015-12-13 04:42:28 +00:00
|
|
|
|
2022-08-01 10:42:33 +00:00
|
|
|
class EventServiceProvider extends BaseServiceProvider
|
2015-12-13 04:42:28 +00:00
|
|
|
{
|
|
|
|
protected $listen = [
|
2018-08-19 09:05:33 +00:00
|
|
|
SongLikeToggled::class => [
|
|
|
|
LoveTrackOnLastfm::class,
|
2015-12-13 04:42:28 +00:00
|
|
|
],
|
2016-02-02 07:47:00 +00:00
|
|
|
|
2024-01-10 21:37:24 +00:00
|
|
|
MultipleSongsLiked::class => [
|
2021-06-04 15:19:33 +00:00
|
|
|
LoveMultipleTracksOnLastfm::class,
|
|
|
|
],
|
|
|
|
|
2024-01-10 21:37:24 +00:00
|
|
|
MultipleSongsUnliked::class => [
|
2021-06-04 15:19:33 +00:00
|
|
|
UnloveMultipleTracksOnLastfm::class,
|
|
|
|
],
|
|
|
|
|
2024-01-02 13:10:06 +00:00
|
|
|
PlaybackStarted::class => [
|
2018-08-19 09:05:33 +00:00
|
|
|
UpdateLastfmNowPlaying::class,
|
2015-12-23 06:26:16 +00:00
|
|
|
],
|
2016-02-02 07:47:00 +00:00
|
|
|
|
2018-08-19 09:05:33 +00:00
|
|
|
LibraryChanged::class => [
|
2021-12-10 15:22:35 +00:00
|
|
|
PruneLibrary::class,
|
2018-08-19 09:05:33 +00:00
|
|
|
],
|
|
|
|
|
2024-01-04 21:51:32 +00:00
|
|
|
MediaScanCompleted::class => [
|
2024-02-05 21:17:41 +00:00
|
|
|
DeleteNonExistingRecordsPostScan::class,
|
2023-12-25 17:15:49 +00:00
|
|
|
WriteSyncLog::class,
|
2021-12-06 16:12:47 +00:00
|
|
|
],
|
2024-01-25 16:21:26 +00:00
|
|
|
|
|
|
|
NewPlaylistCollaboratorJoined::class => [
|
|
|
|
MakePlaylistSongsPublic::class,
|
|
|
|
],
|
2015-12-13 04:42:28 +00:00
|
|
|
];
|
|
|
|
|
2020-12-22 20:11:22 +00:00
|
|
|
public function boot(): void
|
2015-12-13 04:42:28 +00:00
|
|
|
{
|
2016-09-26 06:30:00 +00:00
|
|
|
parent::boot();
|
2015-12-13 04:42:28 +00:00
|
|
|
|
2018-08-29 07:58:46 +00:00
|
|
|
Album::observe(AlbumObserver::class);
|
2015-12-13 04:42:28 +00:00
|
|
|
}
|
|
|
|
}
|