diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-08-03 22:44:49 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-08-03 22:44:49 +0200 |
commit | 8af365937205159642911542785b4f19588f3239 (patch) | |
tree | dcd142d4d4e16df6ea4b72849c1bfa0a39c66b61 /clerk | |
parent | edb18056d69dc04595c3041829b9b167a657a59a (diff) | |
download | perl-app-clerk-8af365937205159642911542785b4f19588f3239.tar.gz perl-app-clerk-8af365937205159642911542785b4f19588f3239.tar.xz |
made maximum rating configurable
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -504,7 +504,7 @@ rateAlbum () { else echo " " fi rm -f rating.txt - echo "$ratings/10" > rating.txt + echo "$ratings/$maxrating" > rating.txt echo "$(mpc current -f "%$mpd_artist%")" >> rating.txt echo "$(mpc current -f '%album%')" >> rating.txt echo "$(mpc current -f '%date%')" >> rating.txt @@ -532,14 +532,14 @@ rateTrack () { loadRatedAlbums () { cd "$music_path" ratings="$(echo " " | dmenu_t -p "Rating: > " | xargs echo)" - albums="$(grep -r "$ratings/10" **/rating.txt | sed -e 's/\/rating.txt.*//g')" + albums="$(grep -r "$ratings/$maxratings" **/rating.txt | sed -e 's/\/rating.txt.*//g')" album="$(echo -e "replace all\nadd all\n---\n$albums" | dmenu_t)"; if [ "$album" = "" ]; then ratePrompt; elif [ "$album" = "replace all" ]; then mpc clear - grep -r "$ratings/10" **/rating.txt | sed -e 's/\/rating.txt.*//g' | while read line; do mpc add "$line" && mpc play; done + grep -r "$ratings/$maxratings" **/rating.txt | sed -e 's/\/rating.txt.*//g' | while read line; do mpc add "$line" && mpc play; done elif [ "$album" = "add all" ]; then - grep -r "$ratings/10" **/rating.txt | sed -e 's/\/rating.txt.*//g' | while read line; do mpc add "$line"; done ; + grep -r "$ratings/$maxratings" **/rating.txt | sed -e 's/\/rating.txt.*//g' | while read line; do mpc add "$line"; done ; else mpc add "$album" fi } |