diff --git a/bluray b/bluray index 98d2c82..c43edab 100644 --- a/bluray +++ b/bluray @@ -67,11 +67,12 @@ heibaise=${black}${on_white}; shanshuo=$(tput blink); wuguangbiao=$(tput civis); CW="${bold}${baihongse} ERROR ${jiacu}";ZY="${baihongse}${bold} ATTENTION ${jiacu}";JG="${baihongse}${bold} WARNING ${jiacu}" # -------------------------------------------------------------------------------- BDDATE=2019.01.14 -BDVER=2.8.8 +BDVER=2.8.9 DeBUG=0 # -------------------------------------------------------------------------------- +using_bdinfo=new bdinfocli_path="/etc/inexistence/02.Tools/bdinfocli.exe" -using_bdinfo=old +[[ $using_bdinfo == new ]] && bdinfocli_path="/etc/inexistence/02.Tools/BDinfoCli.0.7.3/BDInfo.exe" convert=1 # -------------------------------------------------------------------------------- @@ -145,7 +146,13 @@ fi ; } # 检查必要软件是否齐全 -function _check_install_2(){ for apps in ffmpeg vcs mono mktorrent convert montage identify bash getopt cut nconvert bc expr ; do app_name=$apps; _check_install ; done ; rm -rf tmpmissingapp ; } +function _check_install_2(){ +for apps in ffmpeg vcs mono mktorrent convert montage identify bash getopt cut nconvert bc expr ; do + app_name=$apps ; _check_install +done +rm -rf tmpmissingapp +[[ $NoRoot == 0 ]] && _install_bdinfo +} # 有 root 权限的盒子安装 ffmpeg @@ -217,6 +224,7 @@ chmod -R 755 "${DIR}/tools" export PATH="$DIR":"$DIR"/tools:$PATH export MONO_PATH="$DIR"/mono.net-4.0 bdinfocli_path="$DIR"/tools/bdinfocli.exe +[[ $using_bdinfo == new ]] && bdinfocli_path="$DIR"/tools/BDinfoCli.0.7.3/BDInfo.exe USE_Built_IN=1 ; } # Ctrl+C 时恢复样式 @@ -233,11 +241,11 @@ trap cancel SIGINT # 简介与检查 function _intro() { +NoRoot=0 ; [[ $EUID != 0 ]] && NoRoot=1 + [[ $NoInstall == 0 ]] && _check_install_2 [[ $appmissing == Yes ]] && _logo -NoRoot=0 ; [[ $EUID != 0 ]] && NoRoot=1 - [[ $NoInstall == 1 ]] && echo -e "${bold}We will use bulit-in library ...${normal}" && _check_library @@ -356,8 +364,8 @@ UHDBD=0 ; [[ ` echo "${BDname}" | grep -E "[He][Ee][Vv][Cc]" ` ]] & [[ ! $UHDBD == 1 ]] && [[ ` echo "${BDname}" | grep -E "2160[Pp]" ` ]] && UHDBD=1 [[ ! $UHDBD == 1 ]] && [[ ` echo "${BDname}" | grep -E "\b[Uu][Hh][Dd]\b" ` ]] && UHDBD=1 -[[ $UHDBD == 1 ]] && [[ $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path="$DIR"/tools/BDinfoCli.0.7.3/BDInfo.exe -[[ $UHDBD == 1 ]] && [[ ! $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path="/etc/inexistence/02.Tools/BDinfoCli.0.7.3/BDInfo.exe" +# [[ $UHDBD == 1 ]] && [[ $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path="$DIR"/tools/BDinfoCli.0.7.3/BDInfo.exe +# [[ $UHDBD == 1 ]] && [[ ! $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path="/etc/inexistence/02.Tools/BDinfoCli.0.7.3/BDInfo.exe" # if [[ ! $UHDBD == 1 ]] && [[ -d "${pathtostuff}" ]]; then if [[ -d "${pathtostuff}" ]]; then @@ -825,12 +833,13 @@ function _getinfo() { if [[ ! $bdscan == no ]]; then - # New BDinfoCLI 不输出 Quick Summary - [[ $using_bdinfo == old ]] && { + # BDinfoCLI 0.7.3 也能输出 Quick Summary + # [[ $using_bdinfo == old ]] && { sed -n '/QUICK SUMMARY/,//p' "${outputpath}/BDINFO.${file_title}.txt" > temptext count=`wc -l temptext | awk '{print $1-1}' ` head -n $count temptext > "${outputpath}/bdinfo.quick.txt" - rm temptext ; } + rm temptext + # } sed -n '/DISC INFO/,/FILES/p' "${outputpath}/BDINFO.${file_title}.txt" > temptext count=`wc -l temptext | awk '{print $1-2}' `