added default options
This commit is contained in:
@ -10,7 +10,10 @@ declare -a TITLES
|
||||
#FUNCTIONS
|
||||
checkRipDir(){
|
||||
if [ -d "${VOLUME}/${RIP_DIR}/${PERFORMER}/${ALBUM_TITLE}" ]; then
|
||||
read -r -p "Directory already exists, do you want to rip audio cd?: [Y/n] " RIP
|
||||
read -r -p "Directory already exists, do you want to rip audio cd?: [Y/n] (default: Y)" RIP
|
||||
if [[ -z "${RIP}" ]]; then
|
||||
RIP='y'
|
||||
fi
|
||||
case ${RIP} in
|
||||
[yY][eE][sS]|[yY])
|
||||
downloadArt
|
||||
@ -33,7 +36,7 @@ checkRipDir(){
|
||||
mkdir -p "${VOLUME}/${RIP_DIR}/${PERFORMER}/${ALBUM_TITLE}"
|
||||
downloadArt
|
||||
ripDisc
|
||||
#writeTOC
|
||||
writeTOC
|
||||
setFinalData
|
||||
tagRipFiles
|
||||
fi
|
||||
@ -41,7 +44,10 @@ checkRipDir(){
|
||||
|
||||
checkEncDir(){
|
||||
if [ -d "${VOLUME}/${FLAC_DIR}/${PERFORMER}/${ALBUM_TITLE}" ]; then
|
||||
read -r -p "Directory already exists, do you want to encode audio cd?: [Y/n] " ENCODE
|
||||
read -r -p "Directory already exists, do you want to encode audio cd?: [Y/n](default: Y) " ENCODE
|
||||
if [[ -z "${ENCODE}" ]]; then
|
||||
ENCODE='y'
|
||||
fi
|
||||
case ${ENCODE} in
|
||||
[yY][eE][sS]|[yY])
|
||||
encode
|
||||
@ -108,7 +114,10 @@ writeTOC(){
|
||||
|
||||
|
||||
isCompilation(){
|
||||
read -r -p "Is a compilation?: " COMPILATION
|
||||
read -r -p "Is a compilation?(default: n): " COMPILATION
|
||||
if [[ -z "${COMPILATION}" ]]; then
|
||||
COMPILATION='n'
|
||||
fi
|
||||
case ${COMPILATION} in
|
||||
[yY][eE][sS]|[yY])
|
||||
read -r -p "Disc number?: " DISCNUMBER
|
||||
@ -151,7 +160,10 @@ setInitialData(){
|
||||
echo "Album Name: $ALBUM_TITLE"
|
||||
SPEED=$(more /proc/sys/dev/cdrom/info | grep -E 'drive speed:' | awk '{print $3}')
|
||||
echo "Artist detected as: "${PERFORMER}""
|
||||
read -r -p "Is correct: ? [Y/n] " input
|
||||
read -r -p "Is correct: ? [Y/n] (default: Y) " input
|
||||
if [[ -z "${input}" ]]; then
|
||||
input='y'
|
||||
fi
|
||||
case $input in
|
||||
[yY][eE][sS]|[yY])
|
||||
echo "Yes"
|
||||
@ -173,8 +185,10 @@ setInitialData(){
|
||||
esac
|
||||
|
||||
echo "Album detected as: "${ALBUM_TITLE}""
|
||||
read -r -p "Is correct: ? [Y/n] " input
|
||||
|
||||
read -r -p "Is correct: ? [Y/n] (default: Y) " input
|
||||
if [[ -z "${input}" ]]; then
|
||||
input='y'
|
||||
fi
|
||||
case $input in
|
||||
[yY][eE][sS]|[yY])
|
||||
echo "Yes"
|
||||
@ -207,8 +221,10 @@ setFinalData(){
|
||||
YEAR=$(grep DYEAR ${CDDBDATA} | awk -F '=' '{print $2}')
|
||||
#GENRE
|
||||
echo "Genre: "${GENRE}""
|
||||
read -r -p "Is correct: ? [Y/n] " input
|
||||
|
||||
read -r -p "Is correct: ? [Y/n] (default: Y) " input
|
||||
if [[ -z "${input}" ]]; then
|
||||
input='y'
|
||||
fi
|
||||
case $input in
|
||||
[yY][eE][sS]|[yY])
|
||||
echo "Yes"
|
||||
@ -230,8 +246,10 @@ setFinalData(){
|
||||
esac
|
||||
#YEAR
|
||||
echo "Year: "${YEAR}""
|
||||
read -r -p "Is correct: ? [Y/n] " input
|
||||
|
||||
read -r -p "Is correct: ? [Y/n] (default: Y) " input
|
||||
if [[ -z "${input}" ]]; then
|
||||
input='y'
|
||||
fi
|
||||
case $input in
|
||||
[yY][eE][sS]|[yY])
|
||||
echo "Yes"
|
||||
@ -251,7 +269,10 @@ setFinalData(){
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
read -r -p "Is a Various Artist disk?:" input
|
||||
read -r -p "Is a Various Artist disk? (default: n):" input
|
||||
if [[ -z "${input}" ]]; then
|
||||
input='n'
|
||||
fi
|
||||
case $input in
|
||||
[yY][eE][sS]|[yY])
|
||||
PERFORMER_ALBUM="Various Artist"
|
||||
|
||||
Reference in New Issue
Block a user