commit 54373c209b0ecb9d5e506dcf8d333cd5dabca955 parent 30a7771ca3c3ff8de436652efc2a17459ca7d4be Author: Anders Damsgaard Christensen <adc@geo.au.dk> Date: Mon, 19 Sep 2016 10:53:02 -0700 only move file is metadata is recorded Diffstat:
M | bin/youtube-dl-music.sh | | | 28 | ++++++++++++++-------------- |
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/bin/youtube-dl-music.sh b/bin/youtube-dl-music.sh @@ -37,22 +37,22 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then id3v2 --artist "$artist" --album "$album" --song "$song" --track "$track" \ "$filename" -fi -read -p "move to music folder? [y/N] " -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]]; then + read -p "move to music folder? [y/N] " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then - if [[ "$(uname)" == 'Darwin' ]]; then - musicroot="$HOME/Music/iTunes/iTunes Media/Music/" - else - musicroot="$HOME/music/" - fi + if [[ "$(uname)" == 'Darwin' ]]; then + musicroot="$HOME/Music/iTunes/iTunes Media/Music/" + else + musicroot="$HOME/music/" + fi - outdir="$musicroot/$artist/$album" - mkdir -p "$outdir" - mv "$filename" "$outdir/$song.mp3" + outdir="$musicroot/$artist/$album" + mkdir -p "$outdir" + mv "$filename" "$outdir/$song.mp3" - echo "updating mpd" - mpc update > /dev/null + echo "updating mpd" + mpc update > /dev/null + fi fi