updating listento default player; adding whatmusic
This commit is contained in:
parent
655f929f76
commit
d8f19cfde6
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Listenbrainz + DeaDBeeF (or others) via rescrobbled
|
# Listenbrainz + DeaDBeeF (or others) via rescrobbled
|
||||||
if [[ $# -eq 0 ]]; then
|
if [[ $# -eq 0 ]]; then
|
||||||
player="deadbeef"
|
player="audacious"
|
||||||
else
|
else
|
||||||
player="$1"
|
player="$1"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -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 New Issue