@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | } |
35 | 35 | |
36 | 36 | $res = User::getByRssToken($request->input('r')); |
37 | - if (! $res) { |
|
37 | + if (!$res) { |
|
38 | 38 | return Utility::showApiError(100); |
39 | 39 | } |
40 | 40 | |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | return Utility::showApiError(501); |
53 | 53 | } |
54 | 54 | |
55 | - if (! $request->input('id')) { |
|
55 | + if (!$request->input('id')) { |
|
56 | 56 | return Utility::showApiError(200, 'Parameter id is required'); |
57 | 57 | } |
58 | 58 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | |
87 | 87 | $nzbPath = (new NZB)->getNZBPath($request->input('id')); |
88 | 88 | |
89 | - if (! File::exists($nzbPath)) { |
|
89 | + if (!File::exists($nzbPath)) { |
|
90 | 90 | return Utility::showApiError(300, 'NZB file not found!'); |
91 | 91 | } |
92 | 92 | |
@@ -113,9 +113,9 @@ discard block |
||
113 | 113 | 'X-DNZB-Details' => url('/details/'.$request->input('id')), |
114 | 114 | ]; |
115 | 115 | |
116 | - if (! empty($relData['imdbid']) && $relData['imdbid'] > 0) { |
|
116 | + if (!empty($relData['imdbid']) && $relData['imdbid'] > 0) { |
|
117 | 117 | $headers['X-DNZB-MoreInfo'] = 'http://www.imdb.com/title/tt'.$relData['imdbid']; |
118 | - } elseif (! empty($relData['tvdb']) && $relData['tvdb'] > 0) { |
|
118 | + } elseif (!empty($relData['tvdb']) && $relData['tvdb'] > 0) { |
|
119 | 119 | $headers['X-DNZB-MoreInfo'] = 'http://www.thetvdb.com/?tab=series&id='.$relData['tvdb']; |
120 | 120 | } |
121 | 121 | |
@@ -130,15 +130,15 @@ discard block |
||
130 | 130 | $cleanName = str_replace([',', ' ', '/', '\\'], '_', $relData['searchname']); |
131 | 131 | |
132 | 132 | // Stream the file content |
133 | - return response()->streamDownload(function () use ($nzbPath) { |
|
133 | + return response()->streamDownload(function() use ($nzbPath) { |
|
134 | 134 | $bufferSize = 1000000; // 1 MB chunks |
135 | 135 | $gz = gzopen($nzbPath, 'rb'); |
136 | 136 | |
137 | - if (! $gz) { |
|
137 | + if (!$gz) { |
|
138 | 138 | throw new RuntimeException('Failed to open gzipped file for streaming.'); |
139 | 139 | } |
140 | 140 | |
141 | - while (! gzeof($gz)) { |
|
141 | + while (!gzeof($gz)) { |
|
142 | 142 | echo gzread($gz, $bufferSize); |
143 | 143 | flush(); // Ensure chunks are sent immediately |
144 | 144 | } |