This commit is contained in:
Roman Kelesidis 2024-08-31 17:20:14 +07:00
commit 2751369569
2 changed files with 10 additions and 8 deletions

View file

@ -108,17 +108,19 @@ foreach ($m3uData as $entry) {
$audioTracks = array_filter($ffpInfo->streams, function ($e) {
return $e->codec_type === 'audio';
});
dump($audioTracks);
$audioDub = array_map(function ($stream) {
if (!isset($stream->tags)) {
$result = null;
} else {
if (isset($stream->tags->title)) {
$result = $stream->tags->language . ' (' . $stream->tags->title . ') [Каналов: ' . $stream->channels . ' | Битрейт: ' . $stream->bit_rate . ' ]';
} else {
$result = $stream->tags->language;
}
return null;
}
if (isset($stream->tags->title)) {
$result = $stream->tags->language . ' (' . $stream->tags->title . ')';
} else {
$result = $stream->tags->language;
}
$result .= '1';
return $result;
}, $audioTracks);

View file

@ -229,7 +229,7 @@ class TorrServerAPI
if ($curl->httpStatusCode === 200 && !empty($response)) {
CACHE('tr_cache')->set("ffprobe_m3u_$attach_id", $response, 3600);
} 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();
}