Files
dots/config/rmpc/increment_play_count
2025-11-24 19:46:30 +07:00

9 lines
220 B
Bash
Executable File

#!/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