Skip to content
Permalink
Browse files

Fix xiaodu tts can not stop automatically

  • Loading branch information...
yongman committed Mar 16, 2019
1 parent bf39741 commit 1bd0bfcb3eb0efa94064cb2ceb712ca2d2aa16e0
Showing with 4 additions and 1 deletion.
  1. +4 −0 dlna/media_player.py
  2. +0 −1 dlna1.py
@@ -119,6 +119,10 @@ def update(self):

self._media_position_updated_at = dt_util.utcnow()

# Fix xiaodu can not stop automatically
if self._media_duration == self._media_position:
self._device.Stop()

mute = self._device.GetMute()
statusCode = mute.get("status")
if statusCode == 200:
@@ -211,7 +211,6 @@ def discover_MediaPlayer(self):

devices_urls = [device["location"] for device in devices if "AVTransport" in device["st"]]
devices_urls = list(set(devices_urls))
_LOGGER.info("dlna devices {}".format(devices_urls))
devices = []
for location_url in devices_urls:
device = self.register_device(location_url)

0 comments on commit 1bd0bfc

Please sign in to comment.
You can’t perform that action at this time.