Fix chromecast paths

This commit is contained in:
Michal Szczepanski 2020-02-20 21:09:15 +01:00
parent 4ca2adf58f
commit e24c9e92d3

@ -21,7 +21,7 @@ class PlayerTime:
if self.current and self.duration:
cdelta = timedelta(seconds=self.current)
ddelta = timedelta(seconds=self.duration)
return f'{lib.util.strfdelta(cdelta, "%H:%M:%S")}/{lib.util.strfdelta(ddelta, "%H:%M:%S")}'
return f'{playlistcast.util.strfdelta(cdelta, "%H:%M:%S")}/{playlistcast.util.strfdelta(ddelta, "%H:%M:%S")}'
return '00:00:00/00:00:00'
@property
@ -95,6 +95,8 @@ class ChromeCast:
def _start(self):
# find and wait for chromecast
chromecasts = pychromecast.get_chromecasts()
for ch in chromecasts:
if ch.name == 'Hell TV':
self.cast = chromecasts[0]
self.cast.wait(timeout=30)
print(self.cast.status)