Remove interactivity (improve performances)
This commit is contained in:
parent
d16b31f479
commit
890dfc5e9c
32
atom
32
atom
@ -673,36 +673,6 @@ remaining=$taskcount
|
|||||||
failed=0
|
failed=0
|
||||||
while (( (remaining || ${#workers[@]}) && ! quit ))
|
while (( (remaining || ${#workers[@]}) && ! quit ))
|
||||||
do
|
do
|
||||||
if read -n 1 -t 0.1 userinput
|
|
||||||
then
|
|
||||||
case $userinput in
|
|
||||||
'+')
|
|
||||||
((maxload++))
|
|
||||||
;;
|
|
||||||
'-')
|
|
||||||
((--maxload)) || ((maxload=1))
|
|
||||||
;;
|
|
||||||
[qQ])
|
|
||||||
quit=1
|
|
||||||
;;
|
|
||||||
[pP])
|
|
||||||
if (( pause ))
|
|
||||||
then
|
|
||||||
pause=0
|
|
||||||
((
|
|
||||||
pausedtime +=
|
|
||||||
$(date +%s) - pausestart
|
|
||||||
))
|
|
||||||
concurrencychange=$(date +%s)
|
|
||||||
else
|
|
||||||
pause=1
|
|
||||||
pausestart=$(date +%s)
|
|
||||||
(( concurrency = maxload / 2 ))
|
|
||||||
(( concurrency )) || concurrency=1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
read humanload garbage < /proc/loadavg
|
read humanload garbage < /proc/loadavg
|
||||||
load=${humanload%.*}
|
load=${humanload%.*}
|
||||||
if [ -z "$quit" ] \
|
if [ -z "$quit" ] \
|
||||||
@ -980,7 +950,7 @@ do
|
|||||||
'opus') extension=opus ;;
|
'opus') extension=opus ;;
|
||||||
'vorbis') extension=ogg ;;
|
'vorbis') extension=ogg ;;
|
||||||
esac
|
esac
|
||||||
(( cron )) || echo -n "$destination: rename pattern changed, renaming files... "
|
(( cron )) || echo -en "$destination: rename pattern changed, renaming files...\033[K"
|
||||||
(( textunidecodeneeded )) && ascii
|
(( textunidecodeneeded )) && ascii
|
||||||
echo 'BEGIN TRANSACTION;' >&3
|
echo 'BEGIN TRANSACTION;' >&3
|
||||||
for line in "${renamefiles[@]}"
|
for line in "${renamefiles[@]}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user