mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-09-01 02:38:55 +00:00
Clean release name properly
This commit is contained in:
@@ -102,8 +102,6 @@ class GetNzbController extends BasePageController
|
||||
return Utility::showApiError(300, 'Release not found!');
|
||||
}
|
||||
|
||||
$cleanName = str_replace([',', ' ', '/'], '_', $relData['searchname']);
|
||||
|
||||
$headers = [
|
||||
'Content-Type' => 'application/x-nzb',
|
||||
'Expires' => date('r', now()->addDays(365)->timestamp),
|
||||
@@ -125,8 +123,10 @@ class GetNzbController extends BasePageController
|
||||
$headers += ['X-DNZB-RCode' => '200',
|
||||
'X-DNZB-RText' => 'OK, NZB content follows.', ];
|
||||
|
||||
$cleanName = str_replace([',', ' ', '/', '\\'], '_', $relData['searchname']);
|
||||
|
||||
return response()->streamDownload(function () use ($nzbPath) {
|
||||
readgzfile($nzbPath);
|
||||
echo $nzbPath;
|
||||
}, $cleanName.'.nzb', $headers);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user