diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-10-02 18:55:35 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-10-02 18:55:35 +0200 |
| commit | cf6bd83b9bc3f739c755516706d6702dc2567550 (patch) | |
| tree | a45c637df7f905eebb2d3ab8c1762b9c4a6e9e23 /bin | |
| parent | 901207d1651a555cfd45828abd2f441a44be5a7c (diff) | |
| download | dotfiles-cf6bd83b9bc3f739c755516706d6702dc2567550.tar.gz dotfiles-cf6bd83b9bc3f739c755516706d6702dc2567550.tar.bz2 dotfiles-cf6bd83b9bc3f739c755516706d6702dc2567550.zip | |
Added keyrepeat, ti ignore node_modules
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/tag-music | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/bin/tag-music b/bin/tag-music index 17d6aac..e801132 100755 --- a/bin/tag-music +++ b/bin/tag-music @@ -16,33 +16,17 @@ do for song_file in "$album_dir"/* do [ ! -f "$song_file" ] && continue - song="$(basename "$song_file" | cut -d '.' -f 1)" - # echo "$artist" - # echo "$album" - # echo "$song" - case "$song_file" in - *.ogg) - ;; - *.opus) - echo "OPUS: $song_file" - echo "Title=$song -Artist=$artist -Album=$album -Track= -Total= -Date= -Genre= -Comment=" | opustags -i -S "$song_file" - ;; - *.mp3) - id3tag --artist "$artist" --album "$album" --song "$song" "$songfile" - ;; - *.m4a) - id3tag --artist "$artist" --album "$album" --song "$song" "$songfile" - ;; - *) - ;; - esac + song="$(basename "$song_file" | rev | cut -d '.' -f 2- | rev)" + # echo $song_file + track=0 + if expr "$song" : "[0-9][0-9]*\-.*" > /dev/null + then + track="$(echo "$song" | cut -d '-' -f 1)" + song="$(echo "$song" | cut -d '-' -f 2-)" + fi + # echo $track $song + echo $song_file + taffy --artist "$artist" --album "$album" --title "$song" --track "$track" "$song_file" done done done |
