Refresh auth after every disconnect, ensuring there's a fresh token. Fixes Shorts aren't handled anymore #162

and maybe changes something related to Disable Autoplay #82
This commit is contained in:
dmunozv04
2024-05-31 15:26:58 +02:00
parent 5214190fd0
commit e92ba897c4

View File

@@ -52,13 +52,13 @@ class DeviceListener:
# Main subscription loop
async def loop(self):
lounge_controller = self.lounge_controller
while not lounge_controller.linked():
try:
self.logger.debug("Refreshing auth")
await lounge_controller.refresh_auth()
except:
await asyncio.sleep(10)
while not self.cancelled:
while not lounge_controller.linked():
try:
self.logger.debug("Refreshing auth")
await lounge_controller.refresh_auth()
except:
await asyncio.sleep(10)
while not (await self.is_available()) and not self.cancelled:
await asyncio.sleep(10)
try: