From 5d2b69ae5d2536f6bf50c670de6ecf9aedec6930 Mon Sep 17 00:00:00 2001 From: Michael V Date: Fri, 14 Jan 2022 12:55:39 +0100 Subject: [PATCH] Fix resposne code and ffmpeglocation --- src/Controllers/ApiController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Controllers/ApiController.php b/src/Controllers/ApiController.php index 4e936b7..fdc7032 100644 --- a/src/Controllers/ApiController.php +++ b/src/Controllers/ApiController.php @@ -90,7 +90,7 @@ public function convert(Request $request) ->audioQuality('0'); if(config('youtube-api.ffmpeg_path') !== null) { - $options->ffmpegLocation(config('youtube-api.ffmpeg_path')); + $options = $options->ffmpegLocation(config('youtube-api.ffmpeg_path')); } } else @@ -135,7 +135,7 @@ public function convert(Request $request) } catch (Exception $e) { - return response()->json(['error' => true, 'message' => $e->getMessage()]); + return response()->json(['error' => true, 'message' => $e->getMessage()], Response::HTTP_BAD_REQUEST); } }