diff --git a/app/Http/Controllers/TracksController.php b/app/Http/Controllers/TracksController.php index 05f60a5f..ff42d6cf 100644 --- a/app/Http/Controllers/TracksController.php +++ b/app/Http/Controllers/TracksController.php @@ -114,11 +114,16 @@ class TracksController extends Controller } $trackFile = TrackFile::findOrFailByExtension($track->id, $extension); - ResourceLogItem::logItem('track', $id, ResourceLogItem::PLAY, $trackFile->getFormat()['index']); $response = Response::make('', 200); $filename = $trackFile->getFile(); + if (!file_exists($filename)) { + App::abort(418); + } + + ResourceLogItem::logItem('track', $id, ResourceLogItem::PLAY, $trackFile->getFormat()['index']); + if (Config::get('app.sendfile')) { $response->header('X-Sendfile', $filename); } else { diff --git a/public/templates/partials/track-load-fail-dialog.html b/public/templates/partials/track-load-fail-dialog.html new file mode 100644 index 00000000..35b81f13 --- /dev/null +++ b/public/templates/partials/track-load-fail-dialog.html @@ -0,0 +1,17 @@ +