Move touch and tile icons to img folder

This commit is contained in:
An Phan 2015-12-14 11:39:06 +08:00
parent 229eb7def2
commit c3ec0e1198
7 changed files with 34 additions and 2 deletions

View file

@ -3,6 +3,7 @@
namespace App\Http\Controllers\API;
use App\Http\Streamers\XSendFileStreamer;
use App\Http\Streamers\XAccelRedirectStreamer;
use App\Http\Streamers\PHPStreamer;
use App\Models\Song;
@ -23,6 +24,12 @@ class SongController extends Controller
return;
}
if (str_contains(env('SERVER_SOFTWARE'), 'nginx')) {
(new XAccelRedirectStreamer($id))->stream();
return;
}
(new PHPStreamer($id))->stream();
// Exit here to avoid accidentally sending extra content at the end of the file.

View 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

View file

@ -7,7 +7,7 @@
<meta name="description" content="{{ config('app.tagline') }}">
<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://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css">

View file

@ -7,7 +7,7 @@
<meta charset="utf-8">
<meta name="csrf-token" content="{{ csrf_token() }}">
<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">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

BIN
tile.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB