updating listento default player; adding whatmusic
This commit is contained in:
parent
655f929f76
commit
d8f19cfde6
2 changed files with 14 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Listenbrainz + DeaDBeeF (or others) via rescrobbled
|
||||
if [[ $# -eq 0 ]]; then
|
||||
player="deadbeef"
|
||||
player="audacious"
|
||||
else
|
||||
player="$1"
|
||||
fi
|
||||
|
|
13
common/whatmusic
Executable file
13
common/whatmusic
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
api_url="https://api.listenbrainz.org/1/user/$1/playing-now"
|
||||
|
||||
if [[ ! $1 ]]; then 1="siinamonster"; fi
|
||||
|
||||
read artist track < <(echo $(curl -s $api_url | \
|
||||
jq -r '.payload.listens[0].track_metadata | .artist_name, .track_name'))
|
||||
|
||||
if [[ "$artist" != "null" ]]; then
|
||||
echo "$artist" - "$track"
|
||||
else
|
||||
echo "Not listening to anything right now."
|
||||
fi
|
Loading…
Reference in a new issue