Reduce timeout to expire Sonos resource cache (#500)

This commit is contained in:
jjlawren 2020-05-27 09:36:55 -05:00 committed by GitHub
parent 4193012bc2
commit 4a24d50036
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -217,7 +217,7 @@ class MyPlexAccount(PlexObject):
return []
t = time.time()
if t - self._sonos_cache_timestamp > 60:
if t - self._sonos_cache_timestamp > 5:
self._sonos_cache_timestamp = t
data = self.query('https://sonos.plex.tv/resources')
self._sonos_cache = [PlexSonosClient(self, elem) for elem in data]