mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Updated
This commit is contained in:
parent
61512f9020
commit
5431f1fa51
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue