mirror of https://github.com/calexil/BansheeBot
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
640 B
19 lines
640 B
#!/bin/bash |
|
|
|
currentTrack="Calexil is listening to $title by $artist on $album" |
|
|
|
while : |
|
do |
|
title=$(rhythmbox-client --no-start --print-playing-format %tt | sed 's/title: //') |
|
artist=$(rhythmbox-client --no-start --print-playing-format %aa | sed 's/artist: //') |
|
album=$(rhythmbox-client --no-start --print-playing-format %at | sed 's/album: //') |
|
track="Calexil is listening to $title by $artist on $album" |
|
echo $track |
|
if [[ $currentTrack = "$track" ]] |
|
then |
|
sleep 30 |
|
else |
|
currentTrack=$track |
|
curl --data "trackName=$currentTrack" https://bansheebot.herokuapp.com/endpoint |
|
fi |
|
done
|
|
|