Merge pull request #1 from bowlercaptain/master

uses last-played song instead of "now playing" song
This commit is contained in:
erin 2018-02-25 23:36:35 -06:00 committed by GitHub
commit e3abd7e5f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,7 +32,7 @@ class NowplayingBot(PineappleBot):
@interval(30) @interval(30)
def post_np(self): def post_np(self):
# grab the track from the last.fm api # grab the track from the last.fm api
currently_playing = self.lastfm.get_user(self.config.lastfm_username).get_now_playing() currently_playing = self.lastfm.get_user(self.config.lastfm_username).get_recent_tracks(1)[0][0]
# don't try to post if nothing is being played # don't try to post if nothing is being played
if currently_playing is None: if currently_playing is None: