shell/+mpd: add mpd-recent-played script

This commit is contained in:
Henrik Lissner 2017-09-05 19:09:02 +02:00
parent 2a92acd85b
commit 8bf195b64b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
# Show a list of recently added songs, and the date they were added. This can be
# used to compile a playlist, e.g.
#
# mpc clear
# mpc add $(mpc-recent-played | cut -f2)
grep played "$HOME/.config/mpd/mpd.log" | sed 's/ : player: played "(.+)"/\t\1/g' | tail -n${1:-20}