This commit is contained in:
Roman Kelesidis 2024-08-31 20:38:21 +07:00
commit 5431f1fa51

View file

@ -224,7 +224,7 @@ class TorrServerAPI
$curl->setTimeout($bb_cfg['torr_server']['timeout']);
$curl->setHeader('Accept', 'application/json');
$curl->get($this->url . $this->endpoints['ffprobe'] . '/' . bin2hex($hash) . '/' . $index);
$curl->get($this->url . $this->endpoints['ffprobe'] . '/' . $hash . '/' . $index);
$response->{$index} = $curl->response;
if ($curl->httpStatusCode === 200 && !empty($response)) {
CACHE('tr_cache')->set("ffprobe_m3u_$attach_id", $response, 3600);
@ -251,7 +251,7 @@ class TorrServerAPI
$curl->setTimeout($bb_cfg['torr_server']['timeout']);
$curl->setHeader('Accept', 'application/octet-stream');
$curl->get($this->url . $this->endpoints['stream'], ['link' => bin2hex($hash)]);
$curl->get($this->url . $this->endpoints['stream'], ['link' => $hash]);
$isSuccess = $curl->httpStatusCode === 200;
if (!$isSuccess) {
bb_log("TorrServer (ERROR) [$this->url]: Response code: {$curl->httpStatusCode} | Content: {$curl->response}\n", $this->logFile);