diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-10-11 16:56:24 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-10-11 16:56:24 +0200 |
commit | 1584f16bdbe6e4d851cbc802c7b3c66e60c8d043 (patch) | |
tree | e3c7bcfbe9b77086e89b6e51d15c55fe71157792 | |
parent | 51ae2533f84e8b9388b773885a3e78df9daf6d26 (diff) | |
download | perl-app-clerk-1584f16bdbe6e4d851cbc802c7b3c66e60c8d043.tar.gz perl-app-clerk-1584f16bdbe6e4d851cbc802c7b3c66e60c8d043.tar.xz |
fixed current rating
-rwxr-xr-x | clerk | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -625,6 +625,20 @@ rateTrack () { fi } + instantRateTrack () { + mpc sticker "$(mpc current -f '%file%')" set rating "$rating" + if [[ "$music_dir_access" == "yes" ]]; then + cd "$music_path" + cd "$(dirname "$(mpc current -f %file%)")" + if [[ "$(pwd)" == */"$cd_divider"* ]]; then + cd .. + fi + touch track.ratings + sed -i "/$(mpc current -f '%title%')/d" track.ratings + echo "$rating\\$(mpc current -f "%artist%\%track%\%title%\%date%\%album%")" >> track.ratings + fi + } + loadRatedAlbums () { rating="$(seq 10 | rofi -dmenu -p "Minimum Rating > ")" @@ -1348,7 +1362,8 @@ elif [[ "$1" == "-resume" ]]; then elif [[ "$1" == "-playlists" ]]; then managePlaylists elif [[ "$1" == "-rcurrent" ]]; then - mpc sticker "$(mpc current -f '%file%')" set rating $2 + export rating="$2" + instantRateTrack else dplayPrompt fi |