2016-09-26 06:30:00 +00:00
|
|
|
<?php
|
|
|
|
|
2020-09-07 20:43:23 +00:00
|
|
|
use App\Facades\iTunes;
|
2020-09-06 18:21:39 +00:00
|
|
|
use Illuminate\Support\Facades\Route;
|
|
|
|
|
2020-09-07 20:43:23 +00:00
|
|
|
Route::get('/', static function () {
|
2016-09-26 06:30:00 +00:00
|
|
|
return view('index');
|
|
|
|
});
|
|
|
|
|
2020-09-07 20:43:23 +00:00
|
|
|
Route::get('/remote', static function () {
|
2017-08-27 15:53:17 +00:00
|
|
|
return view('remote');
|
|
|
|
});
|
2020-09-06 21:11:48 +00:00
|
|
|
|
2020-09-12 15:01:48 +00:00
|
|
|
Route::group(['middleware' => 'auth'], static function (): void {
|
|
|
|
Route::get('play/{song}/{transcode?}/{bitrate?}', 'PlayController@show')
|
2020-09-07 20:43:23 +00:00
|
|
|
->name('song.play');
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'lastfm'], static function (): void {
|
|
|
|
Route::get('connect', 'LastfmController@connect')->name('lastfm.connect');
|
|
|
|
Route::get('callback', 'LastfmController@callback')->name('lastfm.callback');
|
|
|
|
});
|
2020-09-06 21:11:48 +00:00
|
|
|
|
2020-09-07 20:43:23 +00:00
|
|
|
if (iTunes::used()) {
|
|
|
|
Route::get('itunes/song/{album}', 'iTunesController@viewSong')->name('iTunes.viewSong');
|
|
|
|
}
|
|
|
|
|
|
|
|
Route::group(['prefix' => 'download', 'namespace' => 'Download'], static function (): void {
|
|
|
|
Route::get('songs', 'SongController@show');
|
|
|
|
Route::get('album/{album}', 'AlbumController@show');
|
|
|
|
Route::get('artist/{artist}', 'ArtistController@show');
|
|
|
|
Route::get('playlist/{playlist}', 'PlaylistController@show');
|
|
|
|
Route::get('favorites', 'FavoritesController@show');
|
|
|
|
});
|
|
|
|
});
|