Guest User

Untitled

a guest
Apr 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #!/usr/bin/env zsh
  2.  
  3. music=/mnt/unsort/storage/music
  4. playing=$music/$(mpc -f %file% current)
  5.  
  6. case $1 in
  7. rate)
  8. if [[ $2 -ge 0 ]] && [[ $2 -lt 6 ]]; then
  9. mpc sticker "$(mpc -f %file% current)" set rating $2
  10. fi
  11. ;;
  12. rating)
  13. mpc sticker "$(mpc -f %file% current)" get rating
  14. ;;
  15. sort)
  16. beet -v -l $music/sorted.db -d $music/sorted import $playing
  17. ;;
  18. delete)
  19. echo rm -v $playing
  20. ;;
  21. esac
Add Comment
Please, Sign In to add comment