Compare commits

..

No commits in common. "cc1c687118bf68dabc6584d375dafdd9f27d9157" and "b90d4d553af5ff83943786ba7bd8d61abde49a74" have entirely different histories.

5 changed files with 19 additions and 48 deletions

22
atom
View File

@ -64,7 +64,6 @@ help() {
-c <file> Load configuration file <file>
-C Dump configuration and exit
-l <load> Override max-load
-f <workers> Use exactly <workers> child processes
-T <seconds> override load-interval
-F <destination> Force re-generation of all files in
<destination>
@ -78,7 +77,7 @@ help() {
#parse arguments
OPTERR=0
while getopts ':c:Cl:T:F:f:B:ShDq' opt
while getopts ':c:Cl:T:F:B:ShDq' opt
do
case $opt in
c)
@ -96,9 +95,6 @@ do
F)
forceall+=("$OPTARG")
;;
f)
fixed_workers="$OPTARG"
;;
B)
maxbatch="$OPTARG"
;;
@ -353,7 +349,6 @@ updateMimes
removeObsoleteFiles
(( cron )) || echo -n 'Gathering files for cleaning...'
echo '
SELECT COUNT(id)
FROM destination_files
@ -401,7 +396,7 @@ do
then
echo 'COMMIT;BEGIN TRANSACTION;' >&3
fi
(( cron )) || echo -en "\rClean obsolete data: $(((deleted+removed)*100/removecount))%\033[K"
(( cron )) || echo -en "\rClean obsolete data: $(((deleted+removed)*100/removecount))%"
done
echo 'COMMIT;' >&3
(( cron )) || echo -n $'\r'
@ -697,21 +692,10 @@ starttime=$concurrencychange
taskcount=$count
remaining=$taskcount
failed=0
echo 'BEGIN TRANSACTION;' >&3
committime=$(date +%s)
while (( (remaining || ${#workers[@]}) && ! quit ))
do
if (( $(date +%s) - committime >= 60 ))
then
echo $'COMMIT;\nBEGIN TRANSACTION;' >&3
committime=$(date +%s)
fi
read humanload garbage < /proc/loadavg
load=${humanload%.*}
if (( fixed_workers ))
then
concurrency="$fixed_workers"
else
if [ -z "$quit" ] \
&& (( ! pause )) \
&& (( $(date +%s)-concurrencychange >= loadinterval ))
@ -727,7 +711,6 @@ do
(( ++concurrency ))
fi
fi
fi
checkworkers
cleaner
(( pause )) || master
@ -806,7 +789,6 @@ do
fi
fi
done
echo 'COMMIT;' >&3
unset count
endtime=$(date +%s)

View File

@ -22,7 +22,7 @@ encodeFile::opus() {
requires ${soxtaskid:-$decodetaskid}
required ${soxtaskid:-$decodetaskid}
fileid $destfileid
filename $destdir/$destfile.opus
filename $destdir/$destfile.ogg
$(
for key in ${!opusencopts[@]}
do

View File

@ -3,7 +3,7 @@ getFiles() {
scantime=$(date +%s)
for prune_expression in "${skippeddirectories[@]}"
do
prunes+=( -path "$sourcepath$prune_expression" -prune -o )
prunes+="-path $sourcepath$prune_expression -prune -o "
done
(( cron )) || echo -n "Scanning $sourcepath... "
# We probably have thousands of files, don't waste time on disk writes
@ -56,10 +56,10 @@ getFiles() {
fi
progressSpin
done < <(
find "$sourcepath" "${prunes[@]}" -type f -not -name '.*' -printf "%T@ %s %P\n"
find "$sourcepath" $prunes -type f -printf "%T@ %s %P\n"
)
echo 'COMMIT;' >&3
(( cron )) || echo -n $'\r'
echo "${count:-0} files found, ${new:=0} new or changed."$'\033[K'
echo "${count:-0} files found, ${new:=0} new or changed."
unset count
}

View File

@ -1,5 +1,5 @@
#!/bin/bash
getInfosffmpeg_version='ffmpeg-6'
getInfosffmpeg_version='ffmpeg-5'
tagreaders+=( "$getInfosffmpeg_version" )
getInfos::ffmpeg() {
tagreader="$getInfosffmpeg_version"
@ -8,8 +8,7 @@ getInfos::ffmpeg() {
-i "$sourcepath/$filename" 2>&1 \
|sed '
/^Input/,/.* Audio: /{s/ *: */=/}
s/^[[:space:]]*//
s/\0//g'
s/^[[:space:]]*//'
)
local metadata=$(
echo -e "$allinfos" \

View File

@ -11,15 +11,5 @@ progressSpin() {
30) echo -n $'\b\\' ;;
*) ;;
esac
if ! (( count % 100 ))
then
echo -n " $count"
until (( backspace > ${#count} ))
do
(( backspace++ ))
echo -n $'\b'
done
unset backspace
fi
fi
}