diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-03 01:48:11 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-03 01:48:11 +0200 |
commit | 443adc51e001ccb00a2092c63c98d982e64ef45f (patch) | |
tree | d6f0fb0888aff188855f36140c8c866a02c8d12c /clerk | |
parent | e02a43146a55fd04ad546bc6545815f630751432 (diff) | |
download | perl-app-clerk-443adc51e001ccb00a2092c63c98d982e64ef45f.tar.gz perl-app-clerk-443adc51e001ccb00a2092c63c98d982e64ef45f.tar.xz |
now fixed it
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 32 |
1 files changed, 21 insertions, 11 deletions
@@ -630,19 +630,29 @@ InsertAlbum() { } ReplaceAlbum() { + declare -i seen=0 + while read TRACK + do + seen=1 TRACK=$(echo -e "0 Return to Main Menu\n---\nAdding Mode: Replace\n---\n$(echo "$album_temp")" | dmenu_t -dmenu -p "Choose Album > ") -if [[ "$TRACK" = "0 Return to Main Menu" ]] - then dplayPrompt -else - if [[ "$TRACK" == "Adding Mode: Replace" ]] - then AddAlbum - else - artist=$(echo "$TRACK" | awk -F " $seperator " '{print $1}') - date=$(echo "$TRACK" | awk -F " $seperator " '{print $3}') - album=$(echo "$TRACK" | awk -F " $seperator " '{print $2}') - mpc clear && mpc findadd date "$date" album "$album" $mpd_artist "$artist" && mpc play + if [[ "$TRACK" = "0 Return to Main Menu" ]] + then dplayPrompt + else + if [[ "$TRACK" == "Adding Mode: Replace" ]] + then AddAlbum + else + artist=$(echo "$TRACK" | awk -F " $seperator " '{print $1}') + date=$(echo "$TRACK" | awk -F " $seperator " '{print $3}') + album=$(echo "$TRACK" | awk -F " $seperator " '{print $2}') + mpc clear && mpc findadd date "$date" album "$album" $mpd_artist "$artist" && mpc play + fi + fi + done < <(echo -e "0 Return to Main Menu\n---\nAdding Mode: Replace\n---\n$(echo "$album_temp")" | dmenu_t -dmenu -p "Choose Album > ") + + if [[ $seen = 0 ]] + then + exit fi -fi } AddTrack() { |