diff options
| author | anand <anand.panchdhari@gmail.com> | 2025-12-17 15:57:55 +0530 |
|---|---|---|
| committer | anand <anand.panchdhari@gmail.com> | 2025-12-17 15:57:55 +0530 |
| commit | b7ef29a8886a57aadb787807a7c6cf74c1f0ed3a (patch) | |
| tree | 366a68240fbc9da6b1d567bd6c46d1350ad814de /rmpc/increment_play_count | |
Nixos
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 |
