hankhank10 / music-screen-api

Display the playing Sonos track in real time on an e-ink display - also includes functionality for last.fm
120 stars 17 forks source link

Use requests timeouts, remove duplicate request #12

Closed jjlawren closed 4 years ago

jjlawren commented 4 years ago

A timeout parameter should always be used with requests calls as an unresponsive server can hang the request indefinitely: https://requests.readthedocs.io/en/master/user/quickstart/#timeouts. This adds a default timeout of 5s to all requests.

Also removes a seemingly redundant requests.get() call in sonos_user_data.py.