mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Updated
This commit is contained in:
parent
8d30f9f01b
commit
61512f9020
2 changed files with 17 additions and 12 deletions
|
@ -33,7 +33,7 @@ $isAudio = (bool)$this->request['is_audio'];
|
||||||
|
|
||||||
// Get ffprobe info from TorrServer
|
// Get ffprobe info from TorrServer
|
||||||
$ffpInfo = (new \TorrentPier\TorrServerAPI())->getFfpInfo($info_hash, $file_index, $attach_id);
|
$ffpInfo = (new \TorrentPier\TorrServerAPI())->getFfpInfo($info_hash, $file_index, $attach_id);
|
||||||
$ffpInfo = $ffpInfo->{$filesCount};
|
$ffpInfo = $ffpInfo->{$file_index};
|
||||||
if (isset($ffpInfo->streams)) {
|
if (isset($ffpInfo->streams)) {
|
||||||
// Video codec information
|
// Video codec information
|
||||||
$videoCodecIndex = array_search('video', array_column($ffpInfo->streams, 'codec_type'));
|
$videoCodecIndex = array_search('video', array_column($ffpInfo->streams, 'codec_type'));
|
||||||
|
@ -83,5 +83,19 @@ if (isset($ffpInfo->streams)) {
|
||||||
'audio_dub' => implode('<hr>', $audioDub)
|
'audio_dub' => implode('<hr>', $audioDub)
|
||||||
];
|
];
|
||||||
|
|
||||||
$this->response['ffprobe_data'] = '';
|
$result = '<hr>';
|
||||||
|
if (!empty($data['resolution'])) {
|
||||||
|
$result .= $data['resolution'] . '<br>';
|
||||||
|
}
|
||||||
|
if (!empty($data['filesize'])) {
|
||||||
|
$result .= $data['filesize'] . '<br>';
|
||||||
|
}
|
||||||
|
if (!empty($data['video_codec'])) {
|
||||||
|
$result .= $data['video_codec'];
|
||||||
|
}
|
||||||
|
if (!empty($data['audio_dub'])) {
|
||||||
|
$result .= '<hr>' . $data['audio_dub'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->response['ffprobe_data'] = $result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,17 +37,8 @@
|
||||||
<td width="40%"><b>{m3ulist.TITLE}</b>
|
<td width="40%"><b>{m3ulist.TITLE}</b>
|
||||||
<hr>
|
<hr>
|
||||||
<div id="ffprobe_{m3ulist.ROW_NUMBER}">
|
<div id="ffprobe_{m3ulist.ROW_NUMBER}">
|
||||||
<a href="#" onclick="ajax.ffprobe_info({m3ulist.ROW_NUMBER}, {m3ulist.IS_AUDIO}); return false;">{L_SHOW_MORE_INFORMATION_FILE}</a>
|
<a href="#" onclick="ajax.ffprobe_info({m3ulist.ROW_NUMBER}, '{m3ulist.IS_AUDIO}'); return false;">{L_SHOW_MORE_INFORMATION_FILE}</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- BEGIN ffprobe -->
|
|
||||||
<hr><!-- IF m3ulist.ffprobe.RESOLUTION -->{m3ulist.ffprobe.RESOLUTION}<br><!-- ENDIF -->
|
|
||||||
{m3ulist.ffprobe.FILESIZE}<br>
|
|
||||||
<!-- IF m3ulist.ffprobe.VIDEO_CODEC -->{m3ulist.ffprobe.VIDEO_CODEC}<!-- ENDIF -->
|
|
||||||
<!-- IF m3ulist.ffprobe.AUDIO_DUB -->
|
|
||||||
<hr>
|
|
||||||
{m3ulist.ffprobe.AUDIO_DUB}
|
|
||||||
<!-- ENDIF -->
|
|
||||||
<!-- END ffprobe -->
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="#" onclick="return false;" class="copyElement" data-clipboard-text="{m3ulist.STREAM_LINK}">{L_COPY_STREAM_LINK}</a> ·
|
<a href="#" onclick="return false;" class="copyElement" data-clipboard-text="{m3ulist.STREAM_LINK}">{L_COPY_STREAM_LINK}</a> ·
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue