mirror of
https://github.com/koel/koel
synced 2024-11-10 06:34:14 +00:00
Move touch and tile icons to img folder
This commit is contained in:
parent
229eb7def2
commit
c3ec0e1198
7 changed files with 34 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
namespace App\Http\Controllers\API;
|
namespace App\Http\Controllers\API;
|
||||||
|
|
||||||
use App\Http\Streamers\XSendFileStreamer;
|
use App\Http\Streamers\XSendFileStreamer;
|
||||||
|
use App\Http\Streamers\XAccelRedirectStreamer;
|
||||||
use App\Http\Streamers\PHPStreamer;
|
use App\Http\Streamers\PHPStreamer;
|
||||||
use App\Models\Song;
|
use App\Models\Song;
|
||||||
|
|
||||||
|
@ -23,6 +24,12 @@ class SongController extends Controller
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (str_contains(env('SERVER_SOFTWARE'), 'nginx')) {
|
||||||
|
(new XAccelRedirectStreamer($id))->stream();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
(new PHPStreamer($id))->stream();
|
(new PHPStreamer($id))->stream();
|
||||||
|
|
||||||
// Exit here to avoid accidentally sending extra content at the end of the file.
|
// Exit here to avoid accidentally sending extra content at the end of the file.
|
||||||
|
|
25
app/Http/Streamers/XAccelRedirectStreamer.php
Normal file
25
app/Http/Streamers/XAccelRedirectStreamer.php
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Streamers;
|
||||||
|
|
||||||
|
use App\Models\Setting;
|
||||||
|
|
||||||
|
class XAccelRedirectStreamer extends BaseStreamer implements StreamerInterface
|
||||||
|
{
|
||||||
|
public function __construct($id)
|
||||||
|
{
|
||||||
|
parent::__construct($id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stream the current song using nginx's X-Accel-Redirect.
|
||||||
|
*/
|
||||||
|
public function stream()
|
||||||
|
{
|
||||||
|
header('X-Accel-Redirect: '.str_replace(Setting::get('media_path'), '/media/', $this->song->path));
|
||||||
|
header("Content-Type: {$this->contentType}");
|
||||||
|
header('Content-Disposition: inline; filename="'.basename($this->song->path).'"');
|
||||||
|
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 4.2 KiB |
|
@ -7,7 +7,7 @@
|
||||||
<meta name="description" content="{{ config('app.tagline') }}">
|
<meta name="description" content="{{ config('app.tagline') }}">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon-precomposed.png">
|
<link rel="apple-touch-icon" href="public/img/apple-touch-icon-precomposed.png">
|
||||||
|
|
||||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,100&subset=latin">
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,100&subset=latin">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon-precomposed.png">
|
<link rel="apple-touch-icon" href="/public/img/apple-touch-icon-precomposed.png">
|
||||||
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100&subset=latin,latin-ext,vietnamese,greek-ext,greek,cyrillic,cyrillic-ext" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Roboto:400,300,100&subset=latin,latin-ext,vietnamese,greek-ext,greek,cyrillic,cyrillic-ext" rel="stylesheet">
|
||||||
|
|
||||||
|
|
BIN
tile-wide.png
BIN
tile-wide.png
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB |
BIN
tile.png
BIN
tile.png
Binary file not shown.
Before Width: | Height: | Size: 7.9 KiB |
Loading…
Reference in a new issue