Merge pull request #2168 from forslund/feature/update-pychromecast

Update pychromecast to 3.2.2
pull/2173/head
Åke 2019-06-26 10:34:55 +02:00 committed by GitHub
commit 0a67544ea4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -89,14 +89,18 @@ class ChromecastService(RemoteAudioBackend):
TODO: add playlist support and repeat
"""
self.cast.wait() # Make sure the device is ready to receive command
self.cast.quit_app()
while self.cast.status.status_text != '':
time.sleep(1)
track = self.tracklist[0]
# Report start of playback to audioservice
if self._track_start_callback:
self._track_start_callback(track)
LOG.debug('track: {}, type: {}'.format(track, guess_type(track)))
LOG.debug('track: {}, type: {}'.format(track, guess_type(track)[0]))
mime = guess_type(track)[0] or 'audio/mp3'
self.cast.wait() # Make sure the device is ready to receive command
self.cast.play_media(track, mime)
def stop(self):

View File

@ -16,7 +16,7 @@ pocketsphinx==0.1.0
inflection==0.3.1
pillow==4.1.1
python-dateutil==2.6.0
pychromecast==0.7.7
pychromecast==3.2.2
python-vlc==1.1.2
pulsectl==17.7.4
google-api-python-client==1.6.4