]> gitweb.hhaalo.de Git - albentohandy.git/commitdiff
add: parameter no cover jpg
authorBastian Dehn <hhaalo@arcor.de>
Sat, 5 Dec 2020 20:06:40 +0000 (21:06 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sat, 5 Dec 2020 20:06:40 +0000 (21:06 +0100)
albentohandy

index 3cace97c764a5e5bf7f65be0f8a887913308ec61..7f84221157b0a64d52ba4db5d245c9e71792d9e5 100755 (executable)
@@ -12,7 +12,7 @@ NAME
     albumtohandy - konvertiert flac to mp3 von einer Sammlung
 
 SYNOPSIS
-    albentohandy [-3] [-i <inputfile] [-m <destfolder] [-r] [-h]
+    albentohandy [-3] [-i <inputfile] [-m <destfolder] [-n} [-r] [-h]
 
 OPTIONS
     -h                      show this help
@@ -20,6 +20,7 @@ OPTIONS
     -i <file>               input Datei default=albumlist
     -m <dest>               kopiert das Arbeitsverzeichnis
                             in das angegeben Zielverzeichnis
+    -n                      kein cover.jpg
     -r                      löscht das Arbeitsverzeichnis
                             wenn -m angegeben ist
     -w <workdir>            das Arbeitsverzeichnis angegeben
@@ -232,6 +233,9 @@ CleanupCover()
        local readonly wordir="$1"
 
        find $workdir -name 'cover.txt' -exec rm {} \;
+       if [ $nocover == true ]; then
+               find $workdir -name 'cover.jpg' -exec rm {} \;
+       fi
 }
 
 CleanupWorkDir()
@@ -287,13 +291,14 @@ SetDefaultVariables()
        curphase=1
        phase=3
        mp3=false
+       nocover=false
        removework=false
        cptodest=false
 }
 
 ReadArguments()
 {
-       while getopts "3hi:m:rw:" optname; do
+       while getopts "3hi:m:nrw:" optname; do
                case "$optname" in
                "3")
                        mp3=true;
@@ -310,6 +315,9 @@ ReadArguments()
                        dest="$OPTARG"
                        ((phase++))
                        ;;
+               "n")
+                       nocover=true
+                       ;;
                "r")
                        removework=true
                        ;;