diff options
Diffstat (limited to 'rmpc/increment_play_count')
| -rwxr-xr-x | rmpc/increment_play_count | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rmpc/increment_play_count b/rmpc/increment_play_count new file mode 100755 index 0000000..6fa8570 --- /dev/null +++ b/rmpc/increment_play_count @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +sticker=$(rmpc sticker get "$FILE" "playCount" | jq -r '.value') +if [ -z "$sticker" ]; then + rmpc sticker set "$FILE" "playCount" "1" +else + rmpc sticker set "$FILE" "playCount" "$((sticker + 1))" +fi |
