[`media.chromecast`] Skip errors on `cast.wait`.

It may be that the cast thread has been recycled and it's already been
awaited. It's safe to skip the error in these cases.
This commit is contained in:
Fabio Manganiello 2023-11-12 15:52:31 +01:00
parent e416a70658
commit 724f625963
Signed by: blacklight
GPG Key ID: D90FBA7F76362774
1 changed files with 6 additions and 1 deletions

View File

@ -165,7 +165,12 @@ class MediaChromecastPlugin(MediaPlugin, RunnablePlugin):
raise RuntimeError(f'Device {chromecast} not found')
cast = self.chromecasts[chromecast]
cast.wait()
try:
cast.wait()
except Exception as e:
self.logger.warning('Failed to wait Chromecast sync: %s', e)
return cast
@action