mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
1. 新增BDInfo解析
2. 优化MediaInfo显示 3. 修改MediaInfo和BDInfo支持多语言
This commit is contained in:
+22
-1
@@ -308,7 +308,28 @@ JS;
|
||||
|
||||
//technical info
|
||||
if ($settingMain['enable_technical_info'] == 'yes') {
|
||||
$technicalInfo = new \Nexus\Torrent\TechnicalInformation($row['technical_info'] ?? '');
|
||||
$technicalData = $row['technical_info'] ?? '';
|
||||
|
||||
// 判断是否为BDINFO格式
|
||||
$isBdInfo = false;
|
||||
if (!empty($technicalData)) {
|
||||
$firstLine = strtok($technicalData, "\n");
|
||||
if (strpos($firstLine, 'DISC INFO') !== false
|
||||
|| strpos($firstLine, 'Disc Title') !== false
|
||||
|| strpos($firstLine, 'Disc Label') !== false
|
||||
) {
|
||||
$isBdInfo = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($isBdInfo) {
|
||||
// 使用BdInfoExtra处理BDINFO格式
|
||||
$technicalInfo = new \Nexus\Torrent\BdInfoExtra($technicalData);
|
||||
} else {
|
||||
// 使用TechnicalInformation处理MediaInfo格式
|
||||
$technicalInfo = new \Nexus\Torrent\TechnicalInformation($technicalData);
|
||||
}
|
||||
|
||||
$technicalInfoResult = $technicalInfo->renderOnDetailsPage();
|
||||
if (!empty($technicalInfoResult)) {
|
||||
tr($lang_functions['text_technical_info'], $technicalInfoResult, 1);
|
||||
|
||||
Reference in New Issue
Block a user