@@ -67,11 +67,12 @@ heibaise=${black}${on_white}; shanshuo=$(tput blink); wuguangbiao=$(tput civis);
6767CW=" ${bold}${baihongse} ERROR ${jiacu} " ; ZY=" ${baihongse}${bold} ATTENTION ${jiacu} " ; JG=" ${baihongse}${bold} WARNING ${jiacu} "
6868# --------------------------------------------------------------------------------
6969BDDATE=2019.01.14
70- BDVER=2.8.8
70+ BDVER=2.8.9
7171DeBUG=0
7272# --------------------------------------------------------------------------------
73+ using_bdinfo=new
7374bdinfocli_path=" /etc/inexistence/02.Tools/bdinfocli.exe"
74- using_bdinfo=old
75+ [[ $ using_bdinfo == new ]] && bdinfocli_path= " /etc/inexistence/02.Tools/BDinfoCli.0.7.3/BDInfo.exe "
7576convert=1
7677# --------------------------------------------------------------------------------
7778
@@ -145,7 +146,13 @@ fi ; }
145146
146147
147148# 检查必要软件是否齐全
148- 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 ; }
149+ function _check_install_2(){
150+ for apps in ffmpeg vcs mono mktorrent convert montage identify bash getopt cut nconvert bc expr ; do
151+ app_name=$apps ; _check_install
152+ done
153+ rm -rf tmpmissingapp
154+ [[ $NoRoot == 0 ]] && _install_bdinfo
155+ }
149156
150157
151158# 有 root 权限的盒子安装 ffmpeg
@@ -217,6 +224,7 @@ chmod -R 755 "${DIR}/tools"
217224export PATH=" $DIR " :" $DIR " /tools:$PATH
218225export MONO_PATH=" $DIR " /mono.net-4.0
219226bdinfocli_path=" $DIR " /tools/bdinfocli.exe
227+ [[ $using_bdinfo == new ]] && bdinfocli_path=" $DIR " /tools/BDinfoCli.0.7.3/BDInfo.exe
220228USE_Built_IN=1 ; }
221229
222230# Ctrl+C 时恢复样式
@@ -233,11 +241,11 @@ trap cancel SIGINT
233241# 简介与检查
234242function _intro() {
235243
244+ NoRoot=0 ; [[ $EUID != 0 ]] && NoRoot=1
245+
236246[[ $NoInstall == 0 ]] && _check_install_2
237247[[ $appmissing == Yes ]] && _logo
238248
239- NoRoot=0 ; [[ $EUID != 0 ]] && NoRoot=1
240-
241249[[ $NoInstall == 1 ]] && echo -e " ${bold} We will use bulit-in library ...${normal} " && _check_library
242250
243251
@@ -356,8 +364,8 @@ UHDBD=0 ; [[ ` echo "${BDname}" | grep -E "[He][Ee][Vv][Cc]" ` ]] &
356364[[ ! $UHDBD == 1 ]] && [[ ` echo " ${BDname} " | grep -E " 2160[Pp]" ` ]] && UHDBD=1
357365[[ ! $UHDBD == 1 ]] && [[ ` echo " ${BDname} " | grep -E " \b[Uu][Hh][Dd]\b" ` ]] && UHDBD=1
358366
359- [[ $UHDBD == 1 ]] && [[ $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path=" $DIR " /tools/BDinfoCli.0.7.3/BDInfo.exe
360- [[ $UHDBD == 1 ]] && [[ ! $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path=" /etc/inexistence/02.Tools/BDinfoCli.0.7.3/BDInfo.exe"
367+ # [[ $UHDBD == 1 ]] && [[ $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path="$DIR"/tools/BDinfoCli.0.7.3/BDInfo.exe
368+ # [[ $UHDBD == 1 ]] && [[ ! $USE_Built_IN == 1 ]] && using_bdinfo=new && bdinfocli_path="/etc/inexistence/02.Tools/BDinfoCli.0.7.3/BDInfo.exe"
361369
362370# if [[ ! $UHDBD == 1 ]] && [[ -d "${pathtostuff}" ]]; then
363371if [[ -d " ${pathtostuff} " ]]; then
@@ -825,12 +833,13 @@ function _getinfo() {
825833
826834if [[ ! $bdscan == no ]]; then
827835
828- # New BDinfoCLI 不输出 Quick Summary
829- [[ $using_bdinfo == old ]] && {
836+ # BDinfoCLI 0.7.3 也能输出 Quick Summary
837+ # [[ $using_bdinfo == old ]] && {
830838 sed -n ' /QUICK SUMMARY/,//p' " ${outputpath} /BDINFO.${file_title} .txt" > temptext
831839 count=` wc -l temptext | awk ' {print $1-1}' `
832840 head -n $count temptext > " ${outputpath} /bdinfo.quick.txt"
833- rm temptext ; }
841+ rm temptext
842+ # }
834843
835844 sed -n ' /DISC INFO/,/FILES/p' " ${outputpath} /BDINFO.${file_title} .txt" > temptext
836845 count=` wc -l temptext | awk ' {print $1-2}' `
0 commit comments