File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,10 @@ public function convert(Request $request)
33
33
return new JsonResponse (['error ' => true , 'error_messages ' => $ validator ->errors ()], Response::HTTP_BAD_REQUEST );
34
34
}
35
35
36
- $ url = Arr::get ($ validator ->validated (), 'url ' );
37
- $ format = Arr::get ($ validator ->validated (), 'format ' , 'mp3 ' );
36
+ $ validated = $ validator ->validated ();
37
+
38
+ $ url = Arr::get ($ validated , 'url ' );
39
+ $ format = Arr::get ($ validated , 'format ' , 'mp3 ' );
38
40
39
41
parse_str (parse_url ($ url , PHP_URL_QUERY ), $ queryvars );
40
42
@@ -70,7 +72,7 @@ public function convert(Request $request)
70
72
'output ' => '%(id)s.%(ext)s ' ,
71
73
);
72
74
73
- if (config ('youtube-api.ffmpeg_path ' , null ) !== null ) {
75
+ if (config ('youtube-api.ffmpeg_path ' ) !== null ) {
74
76
$ options ['ffmpeg-location ' ] = config ('youtube-api.ffmpeg_path ' );
75
77
}
76
78
}
You can’t perform that action at this time.
0 commit comments