mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-25 07:35:48 -07:00
Updated
This commit is contained in:
parent
93056a5ef3
commit
2751369569
2 changed files with 10 additions and 8 deletions
|
@ -108,17 +108,19 @@ foreach ($m3uData as $entry) {
|
||||||
$audioTracks = array_filter($ffpInfo->streams, function ($e) {
|
$audioTracks = array_filter($ffpInfo->streams, function ($e) {
|
||||||
return $e->codec_type === 'audio';
|
return $e->codec_type === 'audio';
|
||||||
});
|
});
|
||||||
|
dump($audioTracks);
|
||||||
$audioDub = array_map(function ($stream) {
|
$audioDub = array_map(function ($stream) {
|
||||||
if (!isset($stream->tags)) {
|
if (!isset($stream->tags)) {
|
||||||
$result = null;
|
return null;
|
||||||
} else {
|
|
||||||
if (isset($stream->tags->title)) {
|
|
||||||
$result = $stream->tags->language . ' (' . $stream->tags->title . ') [Каналов: ' . $stream->channels . ' | Битрейт: ' . $stream->bit_rate . ' ]';
|
|
||||||
} else {
|
|
||||||
$result = $stream->tags->language;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isset($stream->tags->title)) {
|
||||||
|
$result = $stream->tags->language . ' (' . $stream->tags->title . ')';
|
||||||
|
} else {
|
||||||
|
$result = $stream->tags->language;
|
||||||
|
}
|
||||||
|
$result .= '1';
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}, $audioTracks);
|
}, $audioTracks);
|
||||||
|
|
||||||
|
|
|
@ -229,7 +229,7 @@ class TorrServerAPI
|
||||||
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);
|
||||||
} else {
|
} else {
|
||||||
bb_log("TorrServer (ERROR) [$this->url]: Response code: {$curl->httpStatusCode} | Content: $response\n", $this->logFile);
|
bb_log("TorrServer (ERROR) [$this->url]: Response code: {$curl->httpStatusCode}\n", $this->logFile);
|
||||||
}
|
}
|
||||||
$curl->close();
|
$curl->close();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue