mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-20 21:33:54 -07:00
parent
5431f1fa51
commit
61c49dba62
1 changed files with 2 additions and 2 deletions
|
@ -224,7 +224,7 @@ class TorrServerAPI
|
||||||
$curl->setTimeout($bb_cfg['torr_server']['timeout']);
|
$curl->setTimeout($bb_cfg['torr_server']['timeout']);
|
||||||
|
|
||||||
$curl->setHeader('Accept', 'application/json');
|
$curl->setHeader('Accept', 'application/json');
|
||||||
$curl->get($this->url . $this->endpoints['ffprobe'] . '/' . $hash . '/' . $index);
|
$curl->get($this->url . $this->endpoints['ffprobe'] . '/' . bin2hex($hash) . '/' . $index);
|
||||||
$response->{$index} = $curl->response;
|
$response->{$index} = $curl->response;
|
||||||
if ($curl->httpStatusCode === 200 && !empty($response)) {
|
if ($curl->httpStatusCode === 200 && !empty($response)) {
|
||||||
CACHE('tr_cache')->set("ffprobe_m3u_$attach_id", $response, 3600);
|
CACHE('tr_cache')->set("ffprobe_m3u_$attach_id", $response, 3600);
|
||||||
|
@ -251,7 +251,7 @@ class TorrServerAPI
|
||||||
$curl->setTimeout($bb_cfg['torr_server']['timeout']);
|
$curl->setTimeout($bb_cfg['torr_server']['timeout']);
|
||||||
|
|
||||||
$curl->setHeader('Accept', 'application/octet-stream');
|
$curl->setHeader('Accept', 'application/octet-stream');
|
||||||
$curl->get($this->url . $this->endpoints['stream'], ['link' => $hash]);
|
$curl->get($this->url . $this->endpoints['stream'], ['link' => bin2hex($hash)]);
|
||||||
$isSuccess = $curl->httpStatusCode === 200;
|
$isSuccess = $curl->httpStatusCode === 200;
|
||||||
if (!$isSuccess) {
|
if (!$isSuccess) {
|
||||||
bb_log("TorrServer (ERROR) [$this->url]: Response code: {$curl->httpStatusCode} | Content: {$curl->response}\n", $this->logFile);
|
bb_log("TorrServer (ERROR) [$this->url]: Response code: {$curl->httpStatusCode} | Content: {$curl->response}\n", $this->logFile);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue