Browse Source

bug fix for main bot ignored all files

master
filesite 2 weeks ago
parent
commit
e2ba8fc6f5
  1. 20
      themes/beauty/controller/CommandController.php

20
themes/beauty/controller/CommandController.php

@ -230,11 +230,11 @@ eof;
//忽略.txt描述文件 //忽略.txt描述文件
if ( if (
!empty($item['filename']) && !empty($item['extension']) !empty($item['filename']) && !empty($item['extname'])
&& ( && (
in_array($item['extension'], $supportedImageExts) in_array($item['extname'], $supportedImageExts)
|| in_array($item['extension'], $supportedVideoExts) || in_array($item['extname'], $supportedVideoExts)
|| in_array($item['extension'], $supportedAudioExts) || in_array($item['extname'], $supportedAudioExts)
) )
) { ) {
//保存所有文件到索引 //保存所有文件到索引
@ -248,14 +248,14 @@ eof;
if ( if (
!empty($item['filename']) !empty($item['filename'])
&& empty($item['original_ctime']) && empty($item['original_ctime'])
&& in_array($item['extension'], $supportedImageExts) && in_array($item['extname'], $supportedImageExts)
&& !in_array($item['extension'], $scanner->exifSupportFileExtensions) && !in_array($item['extname'], $scanner->exifSupportFileExtensions)
) { ) {
echo "Image file no original_ctime: {$item['filename']}.{$item['extension']}, {$item['realpath']}\n"; echo "Image file no original_ctime: {$item['filename']}.{$item['extension']}, {$item['realpath']}\n";
}else if ( }else if (
!empty($item['filename']) !empty($item['filename'])
&& empty($item['original_ctime']) && empty($item['original_ctime'])
&& (in_array($item['extension'], $supportedVideoExts) || in_array($item['extension'], $supportedAudioExts)) && (in_array($item['extname'], $supportedVideoExts) || in_array($item['extname'], $supportedAudioExts))
) { ) {
echo "Video or audio file no original_ctime: {$item['filename']}.{$item['extension']}, {$item['realpath']}\n"; echo "Video or audio file no original_ctime: {$item['filename']}.{$item['extension']}, {$item['realpath']}\n";
}else if (!empty($item['directory']) && empty($hadScanedDirs[$id])) { //if it's directory }else if (!empty($item['directory']) && empty($hadScanedDirs[$id])) { //if it's directory
@ -486,15 +486,15 @@ eof;
} }
if ( if (
!empty($item['filename']) && in_array($item['extension'], $supportedImageExts) !empty($item['filename']) && in_array($item['extname'], $supportedImageExts)
) { ) {
$imgNum ++; $imgNum ++;
}else if ( }else if (
!empty($item['filename']) && in_array($item['extension'], $supportedVideoExts) !empty($item['filename']) && in_array($item['extname'], $supportedVideoExts)
) { ) {
$videoNum ++; $videoNum ++;
}else if ( }else if (
!empty($item['filename']) && in_array($item['extension'], $supportedAudioExts) !empty($item['filename']) && in_array($item['extname'], $supportedAudioExts)
) { ) {
$audioNum ++; $audioNum ++;
} }

Loading…
Cancel
Save