Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/Http/Livewire/Jukebox.php → app/Livewire/Jukebox.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\DataObjects\Song;
use App\Models\Song as SongModel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\DataObjects\Song;
use App\Models\Song as SongModel;
Expand All @@ -27,6 +27,6 @@ public function queueSong(string $youTubeId): void
app(QueueService::class)->queueSong($youTubeId);

$song = SongModel::where('youtube_id', '=', $youTubeId)->first();
$this->emit('songAdded', Song::fromModel($song));
$this->dispatch('songAdded', Song::fromModel($song));
}
}
6 changes: 3 additions & 3 deletions app/Http/Livewire/Search.php → app/Livewire/Search.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace App\Http\Livewire;
namespace App\Livewire;

use App\DataObjects\Song;
use App\Models\Song as SongModel;
Expand Down Expand Up @@ -36,7 +36,7 @@ function () use ($youTubeApi) {
'videoDimension' => '2d',
);

return Collection::make($youTubeApi->searchAdvanced($searchParams))->pluck('id.videoId');
return Collection::make($youTubeApi->searchAdvanced($searchParams))->pluck('id.videoId')->filter();
}
);

Expand Down Expand Up @@ -66,6 +66,6 @@ public function queueSong(string $youTubeId): void
app(QueueService::class)->queueSong($youTubeId);

$song = SongModel::where('youtube_id', '=', $youTubeId)->first();
$this->emit('songAdded', Song::fromModel($song));
$this->dispatch('songAdded', Song::fromModel($song));
}
}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"laravel/octane": "^1.5",
"laravel/sanctum": "^3.2",
"laravel/tinker": "^2.8",
"livewire/livewire": "^2.12",
"livewire/livewire": "^3.0",
"madcoda/php-youtube-api": "^1.2",
"spiral/roadrunner": "^2.8.2"
},
Expand Down
Loading