forked from platypush/platypush
[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:
parent
e416a70658
commit
724f625963
1 changed files with 6 additions and 1 deletions
|
@ -165,7 +165,12 @@ class MediaChromecastPlugin(MediaPlugin, RunnablePlugin):
|
||||||
raise RuntimeError(f'Device {chromecast} not found')
|
raise RuntimeError(f'Device {chromecast} not found')
|
||||||
|
|
||||||
cast = self.chromecasts[chromecast]
|
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
|
return cast
|
||||||
|
|
||||||
@action
|
@action
|
||||||
|
|
Loading…
Reference in a new issue