diff --git a/library/ajax/ffprobe_info.php b/library/ajax/ffprobe_info.php index a440afde6..acc2c9b9a 100644 --- a/library/ajax/ffprobe_info.php +++ b/library/ajax/ffprobe_info.php @@ -33,7 +33,7 @@ $isAudio = (bool)$this->request['is_audio']; // Get ffprobe info from TorrServer $ffpInfo = (new \TorrentPier\TorrServerAPI())->getFfpInfo($info_hash, $file_index, $attach_id); -$ffpInfo = $ffpInfo->{$filesCount}; +$ffpInfo = $ffpInfo->{$file_index}; if (isset($ffpInfo->streams)) { // Video codec information $videoCodecIndex = array_search('video', array_column($ffpInfo->streams, 'codec_type')); @@ -83,5 +83,19 @@ if (isset($ffpInfo->streams)) { 'audio_dub' => implode('
', $audioDub) ]; - $this->response['ffprobe_data'] = ''; + $result = '
'; + if (!empty($data['resolution'])) { + $result .= $data['resolution'] . '
'; + } + if (!empty($data['filesize'])) { + $result .= $data['filesize'] . '
'; + } + if (!empty($data['video_codec'])) { + $result .= $data['video_codec']; + } + if (!empty($data['audio_dub'])) { + $result .= '
' . $data['audio_dub']; + } + + $this->response['ffprobe_data'] = $result; } diff --git a/styles/templates/default/playback_m3u.tpl b/styles/templates/default/playback_m3u.tpl index 7db828fce..38581604a 100644 --- a/styles/templates/default/playback_m3u.tpl +++ b/styles/templates/default/playback_m3u.tpl @@ -37,17 +37,8 @@ {m3ulist.TITLE}
- {L_SHOW_MORE_INFORMATION_FILE} + {L_SHOW_MORE_INFORMATION_FILE}
- -
{m3ulist.ffprobe.RESOLUTION}
- {m3ulist.ffprobe.FILESIZE}
- {m3ulist.ffprobe.VIDEO_CODEC} - -
- {m3ulist.ffprobe.AUDIO_DUB} - - {L_COPY_STREAM_LINK} ·