Browse Source

make it work 7

master
calexil 5 years ago
parent
commit
da425a1140
  1. 4
      bansheecheck.sh
  2. 2
      bot.js

4
bansheecheck.sh

@ -9,8 +9,8 @@ do @@ -9,8 +9,8 @@ do
album=$(banshee --query-album | sed 's/album: //')
track="Calexil is listening to $title by $artist on $album"
echo "Calexil is listening to $title by $artist on $album"
if $currentTrack != $track
$currentTrack = $track
if $currentTrack != "$track"
currentTrack=$track
curl --data "trackName=$currentTrack" https://bansheebot.herokuapp.com/endpoint
sleep 15
then

2
bot.js

@ -13,7 +13,7 @@ app.listen(process.env.PORT, () => console.log(`App listening on port ${process. @@ -13,7 +13,7 @@ app.listen(process.env.PORT, () => console.log(`App listening on port ${process.
app.post('/endpoint', (req, res) => {
let trackName = req.body.trackName;
res.send('Track received!');
console.log(`Track: ${trackName}`)
console.log(`${trackName}`)
});
const responseObject = {

Loading…
Cancel
Save