diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-25 01:24:39 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-25 01:24:39 +0200 |
commit | 62fc8443eff38c6735046030489f66a61b92208e (patch) | |
tree | 991c471b3c9989aedd5f3bfdc4e82e841c9e8e11 /clerk | |
parent | abe3fdc85df13a0287db56e614617a65c1ddff2c (diff) | |
download | perl-app-clerk-62fc8443eff38c6735046030489f66a61b92208e.tar.gz perl-app-clerk-62fc8443eff38c6735046030489f66a61b92208e.tar.xz |
trying autoupdate
Diffstat (limited to 'clerk')
-rw-r--r-- | clerk | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -677,6 +677,10 @@ currentTracksInsert () { rateAlbum () { + artist=$(mpc current -f %artist%) + album=$(mpc current -f %album%) + date=$(mpc current -f %date%) + directory=$(dirname $(mpc current -f %file%)) ratings="$(seq $maxratings | dmenu_t -p "Select Rating: > ")" if [ ratings = "" ]; then exit @@ -704,7 +708,9 @@ rateAlbum () { cp $HOME/.config/clerk/ratings/"$(mpc current -f %artist%--%date%--%album%).ratings" . fi notify-send "clerk" "Rated $(mpc current -f "%$mpd_artist% - %album%") with $ratings" + sqlite3 ../ratings.db "insert or replace into albums (date, artist, album, directory, rating) values ('$date', '$artist', '$album', '$directory', '$rating')" fi + ratingPrompt } rateTrack () { @@ -738,6 +744,8 @@ rateTrack () { cp $HOME/.config/clerk/ratings/"$(mpc current -f %artist%--%date%--%album%).ratings" . fi notify-send "clerk" "Rated $(mpc current -f "%$mpd_artist% - %title%") with $ratings" + updateDB + ratingPrompt } |