From: Bastian Dehn
Foldende Alben wurden ausgewählt:
" addInfo "$(cat "$albumlist" | sed 's/$/
/')
"
currentDate
addInfo "flac -> mp3 start
"
+# convert flac to mp3
+# it is the longest phase
printf "\nPhase %02d of %02d: flac -> mp3\n" $((curphase++)) $phase
find $work -name '*.flac' | sort | parallel $BASEFILE --eta --progress --noswap -S $parallelopts $scriptpath/flactomp3v2.sh {}
currentDate
@@ -128,6 +130,7 @@ then
fi
# make zipfile in the current path
+# content of zipfile is content of working directory
if [ $mkzip == true ]
then
printf "Phase %02d of %02d: create %s\n" $((curphase++)) $phase $zipname
diff --git a/flactomp3v2.sh b/flactomp3v2.sh
index 61ee9ae..20df1ac 100755
--- a/flactomp3v2.sh
+++ b/flactomp3v2.sh
@@ -5,17 +5,16 @@ BITRATE=192
MODE="j"
# check config exists
-# config can set BITRATE and MODE
+# config .flactomp3v2.conf can set BITRATE and MODE
if [ -f $HOME/.flactomp3v2.conf ]
then
source $HOME/.flactomp3v2.conf
fi
INPUTFILE=$1
-# give output correct extension
-OUTPUTFILE="${INPUTFILE[@]/%flac/mp3}"
+OUTPUTFILE="${INPUTFILE[@]/%flac/mp3}" # give output correct extension
-# get the tags
+# get the tags from flac file
ARTIST=$(metaflac "$INPUTFILE" --show-tag=ARTIST | sed s/.*=//g)
TITLE=$(metaflac "$INPUTFILE" --show-tag=TITLE | sed s/.*=//g)
ALBUM=$(metaflac "$INPUTFILE" --show-tag=ALBUM | sed s/.*=//g)
@@ -31,7 +30,7 @@ RAP=$(metaflac "$INPUTFILE" --show-tag=REPLAYGAIN_ALBUM_PEAK | sed s/.*=//g)
# stream flac into the lame encoder
flac -s -c -d "$INPUTFILE" | lame --silent -b $BITRATE -m $MODE --noreplaygain - "$OUTPUTFILE"
-# ID3v2.3 tagging
+# ID3v2.3 tagging with cover and without cover
if [ -f ${INPUTFILE%/*}/cover.jpg ]
then
eyeD3 --to-v2.3 \
diff --git a/notify.sh b/notify.sh
index 6dd9306..fefbe15 100755
--- a/notify.sh
+++ b/notify.sh
@@ -3,9 +3,10 @@
# default no notify
# it will be set in .ablentohandy.conf
NOTIFY=false
-
MESSAGE=""
+
# load all parameters to sendemail over smtp
+# NOTIFY; FROMADDRESS; TOADDRESS; STMP; SMPTUSERNAME; SMTPPASSWORD(base64)
if [ ! -f $HOME/.albentohandy.conf ]
then
printf "\nERROR\n.albentohandy.conf does not exist\n"
@@ -25,11 +26,13 @@ then
fi
}
+# add current date in message
currentDate()
{
MESSAGE="${MESSAGE}$(date +"%Y-%m-%d %H:%M:%S") "
}
+# open html, header and body
openMail()
{
MESSAGE="\n \
@@ -39,11 +42,13 @@ openMail()