mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
API: torrents upload/list
This commit is contained in:
@@ -148,20 +148,25 @@ class TechnicalInformation
|
||||
public function renderOnDetailsPage()
|
||||
{
|
||||
global $lang_functions;
|
||||
$videos = [
|
||||
'Runtime' => $this->getRuntime(),
|
||||
'Resolution' => $this->getResolution(),
|
||||
'Bitrate' => $this->getBitrate(),
|
||||
'HDR' => $this->getHDRFormat(),
|
||||
'Bit depth' => $this->getBitDepth(),
|
||||
'Frame rate' => $this->getFramerate(),
|
||||
'Profile' => $this->getProfile(),
|
||||
'Ref.Frames' => $this->getRefFrame(),
|
||||
];
|
||||
$videos = array_filter($videos);
|
||||
$audios = $this->getAudios();
|
||||
$subtitles = $this->getSubtitles();
|
||||
// dd($videos, $audios, $subtitles);
|
||||
// $videos = [
|
||||
// 'Runtime' => $this->getRuntime(),
|
||||
// 'Resolution' => $this->getResolution(),
|
||||
// 'Bitrate' => $this->getBitrate(),
|
||||
// 'HDR' => $this->getHDRFormat(),
|
||||
// 'Bit depth' => $this->getBitDepth(),
|
||||
// 'Frame rate' => $this->getFramerate(),
|
||||
// 'Profile' => $this->getProfile(),
|
||||
// 'Ref.Frames' => $this->getRefFrame(),
|
||||
// ];
|
||||
// $videos = array_filter($videos);
|
||||
// $audios = $this->getAudios();
|
||||
// $subtitles = $this->getSubtitles();
|
||||
$summaryInfo = $this->getSummaryInfo();
|
||||
$videos = $summaryInfo['videos'] ?: [];
|
||||
$audios = $summaryInfo['audios'] ?: [];
|
||||
$subtitles = $summaryInfo['subtitles'] ?: [];
|
||||
|
||||
// dd($summaryInfo, $videos, $audios, $subtitles);
|
||||
if (empty($videos) && empty($audios) && empty($subtitles)) {
|
||||
return sprintf('<div class="nexus-media-info-raw"><pre>%s</pre></div>', $this->mediaInfo);
|
||||
}
|
||||
@@ -187,6 +192,24 @@ class TechnicalInformation
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function getSummaryInfo(): array
|
||||
{
|
||||
$videos = [
|
||||
'Runtime' => $this->getRuntime(),
|
||||
'Resolution' => $this->getResolution(),
|
||||
'Bitrate' => $this->getBitrate(),
|
||||
'HDR' => $this->getHDRFormat(),
|
||||
'Bit depth' => $this->getBitDepth(),
|
||||
'Frame rate' => $this->getFramerate(),
|
||||
'Profile' => $this->getProfile(),
|
||||
'Ref.Frames' => $this->getRefFrame(),
|
||||
];
|
||||
$videos = array_filter($videos) ?: null;
|
||||
$audios = $this->getAudios() ?: null;
|
||||
$subtitles = $this->getSubtitles() ?: null;
|
||||
return compact('videos', 'audios', 'subtitles');
|
||||
}
|
||||
|
||||
private function buildTdTable(array $parts)
|
||||
{
|
||||
$table = '<table style="border: none;"><tbody>';
|
||||
|
||||
Reference in New Issue
Block a user