rendered paste bodyecho -e "226Grabbing NFO variables..."rarfiles=$(ls -1 ${fbase}.r*)$cksfv -b $rarfiles >${fbase}.sfv || { echo -e "226Error: Failed to create sfv file!" exit 1}b_sizes=$(sum=0; files=0; for element in $(cat ./${fbase}.sfv | grep '^;' | awk '{print $2}' | tr -cd '0-9\n'); do let sum=sum+element; let files=files+1; done; echo $sum:$files)#echo -e "226Grabbing NFO variables..."video=$(cat ./${fbase}-info.sbt | grep " V: " | cut -d ':' -f 2-)audio=$(cat ./${fbase}-info.sbt | grep "\[avi" | grep -v " V: " | sed "s/\[.*\] //g" | tr '\n' ' ' | tr -s ' ')v_fps=$(echo "$video" | cut -d ',' -f 1 | tr -cd '0-9.')v_codec=$(echo "$video" | cut -d ',' -f 2 | cut -d '=' -f 2)v_frames=$(echo "$video" | cut -d ',' -f 3 | cut -d '=' -f 2)v_width=$(echo "$video" | cut -d ',' -f 4 | cut -d '=' -f 2)v_height=$(echo "$video" | cut -d ',' -f 5 | cut -d '=' -f 2)a_hz=$(echo "$audio" | cut -d ',' -f 1 | tr -cd '0-9')a_format_raw=$(echo "$audio" | cut -d ',' -f 2 | cut -d '=' -f 2)a_bits=$(echo "$audio" | cut -d ',' -f 3 | cut -d '=' -f 2)a_channels=$(echo "$audio" | cut -d ',' -f 4 | cut -d '=' -f 2)a_bitrate_2=$(echo "$audio" | cut -d ',' -f 5 | tr -cd '0-9')a_chunks=$(echo "$audio" | cut -d ',' -f 6 | tr -cd '0-9')a_bytes=$(echo "$audio" | cut -d ',' -f 7 | tr -cd '0-9')a_vbrcbr=$(echo "$audio" | cut -d ',' -f 8 | tr -d ' ')[[ "$a_bitrate" == "0" ]] && a_bitrate="$a_bitrate_2"[[ "$a_format_raw" == "0x2000" ]] && a_format="AC3"[[ "$a_format_raw" == "0x55" ]] && a_format="MP3"[[ "$a_format_raw" == "0x1" ]] && a_format="PCM WAV"r_files=$(echo $b_sizes | cut -d ':' -f 2)r_bsize=$(echo $b_sizes | cut -d ':' -f 1)unset rnamewhile read -d \. reltemp; do [[ -z "$rname" ]] && { rname="$reltemp" } || { [[ -z "$(echo " $remove_words " | grep -i " $reltemp ")" ]] && { rname="$rname $reltemp" } || { break } }done < <(echo "$relname")rm ./${fbase}-info.sbtecho "#!/bin/bash" >$origdir/whatever.datecho "video=\"$video\"" >>$origdir/whatever.datecho "audio=\"$audio\"" >>$origdir/whatever.datecho "v_fps=\"$v_fps\"" >>$origdir/whatever.datecho "v_codec=\"$v_codec\"" >>$origdir/whatever.datecho "v_frames=\"$v_frames\"" >>$origdir/whatever.datecho "v_width=\"$v_width\"" >>$origdir/whatever.datecho "v_height=\"$v_height\"" >>$origdir/whatever.datecho "a_hz=\"$a_hz\"" >>$origdir/whatever.datecho "a_format=\"$a_format\"" >>$origdir/whatever.datecho "a_bits=\"$a_bits\"" >>$origdir/whatever.datecho "a_channels=\"$a_channels\"" >>$origdir/whatever.datecho "a_bitrate=\"$a_bitrate\"" >>$origdir/whatever.datecho "a_chunks=\"$a_chunks\"" >>$origdir/whatever.datecho "a_bytes=\"$a_bytes\"" >>$origdir/whatever.datecho "a_vbrcbr=\"$a_vbrcbr\"" >>$origdir/whatever.datecho "r_files=\"$r_files\"" >>$origdir/whatever.datecho "r_bsize=\"$r_bsize\"" >>$origdir/whatever.datecho "relname=\"$relname\"" >>$origdir/whatever.datecho "v_bitrate=\"$v_bitrate\"" >>$origdir/whatever.datecho "f_size=\"$f_size\"" >>$origdir/whatever.datecho "v_length=\"$v_length\"" >>$origdir/whatever.datecho "rname=\"$rname\"" >>$origdir/whatever.datecho "starttime=\"$starttime\"" >>$origdir/whatever.dat