Skip to content

Commit

Permalink
Ignoring Podcasts
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurVardevanyan committed Sep 3, 2021
1 parent 9b22272 commit 980ffe9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion monitoringBackend/spotify.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,15 @@ def realTimeSpotify(user):
time.sleep(60)
elif(response.json().get("is_playing") and
"unknown" in str.lower(response.json().get("currently_playing_type", "false"))):
log.warning("Nothing is Playing: " +
log.warning("Unknown Error: " +
str(user) + " : " + str(response))
update_status(user, "statusSong", 1)
time.sleep(45)
elif(response.json().get("is_playing") and
"episode" in str.lower(response.json().get("currently_playing_type", "false"))):
log.debug("Ignoring Podcast: " + str(user))
update_status(user, "statusSong", 1)
time.sleep(90)
else:
response = response.json()
if(response.get("is_playing")):
Expand Down

0 comments on commit 980ffe9

Please sign in to comment.