Hello community,

here is the log from the commit of package python-PyChromecast for 
openSUSE:Factory checked in at 2020-07-14 07:59:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyChromecast (Old)
 and      /work/SRC/openSUSE:Factory/.python-PyChromecast.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-PyChromecast"

Tue Jul 14 07:59:19 2020 rev:13 rq:820588 version:7.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyChromecast/python-PyChromecast.changes  
2020-06-12 21:44:33.060454792 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-PyChromecast.new.3060/python-PyChromecast.changes
        2020-07-14 07:59:54.841910946 +0200
@@ -1,0 +2,12 @@
+Mon Jul 13 05:57:29 UTC 2020 - Steve Kowalik <[email protected]>
+
+- Update to 7.1.1:
+  * Add debug prints (#390)
+  * Report host+port for discovered casts (#385)
+  * Fix plex controller (#389)
+  * Update list_chromecasts example (#382)
+  * BREAKING CHANGE Track services based on UUID instead of mDNS service
+    name (#380)
+  * Reset receiver controller on connection lost (#379)
+
+-------------------------------------------------------------------

Old:
----
  PyChromecast-6.0.0.tar.gz

New:
----
  PyChromecast-7.1.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-PyChromecast.spec ++++++
--- /var/tmp/diff_new_pack.igk6u9/_old  2020-07-14 07:59:55.469912979 +0200
+++ /var/tmp/diff_new_pack.igk6u9/_new  2020-07-14 07:59:55.473912993 +0200
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-PyChromecast
-Version:        6.0.0
+Version:        7.1.1
 Release:        0
 Summary:        Python module to talk to Google Chromecast
 License:        MIT

++++++ PyChromecast-6.0.0.tar.gz -> PyChromecast-7.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/PKG-INFO 
new/PyChromecast-7.1.1/PKG-INFO
--- old/PyChromecast-6.0.0/PKG-INFO     2020-06-03 08:21:17.728713000 +0200
+++ new/PyChromecast-7.1.1/PKG-INFO     2020-07-03 17:23:48.081807100 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: PyChromecast
-Version: 6.0.0
+Version: 7.1.1
 Summary: Python module to talk to Google Chromecast.
 Home-page: https://github.com/balloob/pychromecast
 Author: Paulus Schoutsen
@@ -42,11 +42,17 @@
             >> import time
             >> import pychromecast
         
-            >> chromecasts = pychromecast.get_chromecasts()
+            >> # List chromecasts on the network, but don't connect
+            >> services, browser = 
pychromecast.discovery.discover_chromecasts()
+            >> # Shut down discovery
+            >> pychromecast.discovery.stop_discovery(browser)
+        
+            >> # Discover and connect to chromecasts named Living Room
+            >> chromecasts, browser = 
pychromecast.get_listed_chromecasts(friendly_names=["Living Room"])
             >> [cc.device.friendly_name for cc in chromecasts]
-            ['Dev', 'Living Room', 'Den', 'Bedroom']
+            ['Living Room']
         
-            >> cast = next(cc for cc in chromecasts if cc.device.friendly_name 
== "Living Room")
+            >> cast = chromecasts[0]
             >> # Start worker thread and wait for cast device to be ready
             >> cast.wait()
             >> print(cast.device)
@@ -65,6 +71,9 @@
             >> time.sleep(5)
             >> mc.play()
         
+            >> # Shut down discovery
+            >> pychromecast.discovery.stop_discovery(browser)
+        
         Adding support for extra namespaces
         -----------------------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/PyChromecast.egg-info/PKG-INFO 
new/PyChromecast-7.1.1/PyChromecast.egg-info/PKG-INFO
--- old/PyChromecast-6.0.0/PyChromecast.egg-info/PKG-INFO       2020-06-03 
08:21:17.000000000 +0200
+++ new/PyChromecast-7.1.1/PyChromecast.egg-info/PKG-INFO       2020-07-03 
17:23:47.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: PyChromecast
-Version: 6.0.0
+Version: 7.1.1
 Summary: Python module to talk to Google Chromecast.
 Home-page: https://github.com/balloob/pychromecast
 Author: Paulus Schoutsen
@@ -42,11 +42,17 @@
             >> import time
             >> import pychromecast
         
-            >> chromecasts = pychromecast.get_chromecasts()
+            >> # List chromecasts on the network, but don't connect
+            >> services, browser = 
pychromecast.discovery.discover_chromecasts()
+            >> # Shut down discovery
+            >> pychromecast.discovery.stop_discovery(browser)
+        
+            >> # Discover and connect to chromecasts named Living Room
+            >> chromecasts, browser = 
pychromecast.get_listed_chromecasts(friendly_names=["Living Room"])
             >> [cc.device.friendly_name for cc in chromecasts]
-            ['Dev', 'Living Room', 'Den', 'Bedroom']
+            ['Living Room']
         
-            >> cast = next(cc for cc in chromecasts if cc.device.friendly_name 
== "Living Room")
+            >> cast = chromecasts[0]
             >> # Start worker thread and wait for cast device to be ready
             >> cast.wait()
             >> print(cast.device)
@@ -65,6 +71,9 @@
             >> time.sleep(5)
             >> mc.play()
         
+            >> # Shut down discovery
+            >> pychromecast.discovery.stop_discovery(browser)
+        
         Adding support for extra namespaces
         -----------------------------------
         
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/README.rst 
new/PyChromecast-7.1.1/README.rst
--- old/PyChromecast-6.0.0/README.rst   2020-06-03 08:21:09.000000000 +0200
+++ new/PyChromecast-7.1.1/README.rst   2020-07-03 17:23:37.000000000 +0200
@@ -34,11 +34,17 @@
     >> import time
     >> import pychromecast
 
-    >> chromecasts = pychromecast.get_chromecasts()
+    >> # List chromecasts on the network, but don't connect
+    >> services, browser = pychromecast.discovery.discover_chromecasts()
+    >> # Shut down discovery
+    >> pychromecast.discovery.stop_discovery(browser)
+
+    >> # Discover and connect to chromecasts named Living Room
+    >> chromecasts, browser = 
pychromecast.get_listed_chromecasts(friendly_names=["Living Room"])
     >> [cc.device.friendly_name for cc in chromecasts]
-    ['Dev', 'Living Room', 'Den', 'Bedroom']
+    ['Living Room']
 
-    >> cast = next(cc for cc in chromecasts if cc.device.friendly_name == 
"Living Room")
+    >> cast = chromecasts[0]
     >> # Start worker thread and wait for cast device to be ready
     >> cast.wait()
     >> print(cast.device)
@@ -57,6 +63,9 @@
     >> time.sleep(5)
     >> mc.play()
 
+    >> # Shut down discovery
+    >> pychromecast.discovery.stop_discovery(browser)
+
 Adding support for extra namespaces
 -----------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/pychromecast/__init__.py 
new/PyChromecast-7.1.1/pychromecast/__init__.py
--- old/PyChromecast-6.0.0/pychromecast/__init__.py     2020-06-03 
08:21:09.000000000 +0200
+++ new/PyChromecast-7.1.1/pychromecast/__init__.py     2020-07-03 
17:23:37.000000000 +0200
@@ -7,10 +7,13 @@
 
 # pylint: disable=wildcard-import
 import threading
+
+import zeroconf
+
 from .config import *  # noqa
 from .error import *  # noqa
 from . import socket_client
-from .discovery import (
+from .discovery import (  # noqa
     DISCOVER_TIMEOUT,
     CastListener,
     discover_chromecasts,
@@ -61,12 +64,14 @@
 _get_chromecast_from_host = get_chromecast_from_host  # pylint: 
disable=invalid-name
 
 
-def get_chromecast_from_service(services, tries=None, retry_wait=None, 
timeout=None):
+def get_chromecast_from_service(
+    services, zconf, tries=None, retry_wait=None, timeout=None
+):
     """Creates a Chromecast object from a zeroconf service."""
     # Build device status from the mDNS service name info, this
     # information is the primary source and the remaining will be
     # fetched later on.
-    services, zconf, uuid, model_name, friendly_name = services
+    services, uuid, model_name, friendly_name, _, _ = services
     _LOGGER.debug("_get_chromecast_from_service %s", services)
     cast_type = CAST_TYPES.get(model_name.lower(), CAST_TYPE_CHROMECAST)
     manufacturer = CAST_MANUFACTURERS.get(model_name.lower(), "Google Inc.")
@@ -106,8 +111,15 @@
     Searches the network for chromecast devices matching a list of friendly
     names or a list of UUIDs.
 
-    Returns a list of discovered chromecast devices matching the criteria,
-    or an empty list if no matching chromecasts were found.
+    Returns a tuple of:
+      A list of Chromecast objects matching the criteria,
+      or an empty list if no matching chromecasts were found.
+      A service browser to keep the Chromecast mDNS data updated. When updates
+      are (no longer) needed, pass the broswer object to
+      pychromecast.discovery.stop_discover().
+
+    To only discover chromcast devices wihtout connecting to them, use
+    discover_listed_chromecasts instead.
 
     :param friendly_names: A list of wanted friendly names
     :param uuids: A list of wanted uuids
@@ -118,31 +130,45 @@
                                devices matching the criteria have been found.
     """
 
-    cc_list = set()
+    cc_list = {}
+
+    def callback(uuid, name):  # pylint: disable=unused-argument
+        _LOGGER.debug("Found chromecast %s", uuid)
 
-    def callback(chromecast):
-        _LOGGER.debug("Found chromecast %s", chromecast)
-        if uuids and chromecast.uuid in uuids:
-            cc_list.add(chromecast)
-            uuids.remove(chromecast.uuid)
-        elif friendly_names and chromecast.name in friendly_names:
-            cc_list.add(chromecast)
-            friendly_names.remove(chromecast.name)
-        if not friendly_names and not uuids:
-            discover_complete.set()
+        def get_chromecast_from_uuid(uuid):
+            return get_chromecast_from_service(
+                listener.services[uuid],
+                zconf=zconf,
+                tries=tries,
+                retry_wait=retry_wait,
+                timeout=timeout,
+            )
+
+        service = listener.services[uuid]
+        friendly_name = service[3]
+        try:
+            if uuids and uuid in uuids:
+                if uuid not in cc_list:
+                    cc_list[uuid] = get_chromecast_from_uuid(uuid)
+                uuids.remove(uuid)
+            if friendly_names and friendly_name in friendly_names:
+                if uuid not in cc_list:
+                    cc_list[uuid] = get_chromecast_from_uuid(uuid)
+                friendly_names.remove(friendly_name)
+            if not friendly_names and not uuids:
+                discover_complete.set()
+        except ChromecastConnectionError:  # noqa
+            pass
 
     discover_complete = Event()
-    internal_stop = get_chromecasts(
-        tries=tries,
-        retry_wait=retry_wait,
-        timeout=timeout,
-        callback=callback,
-        blocking=False,
-    )
+
+    listener = CastListener(callback)
+    zconf = zeroconf.Zeroconf()
+    browser = start_discovery(listener, zconf)
+
     # Wait for the timeout or found all wanted devices
     discover_complete.wait(discovery_timeout)
-    internal_stop()
-    return list(cc_list)
+    return (cc_list.values(), browser)
 
 
 # pylint: disable=too-many-locals
@@ -150,10 +176,18 @@
     tries=None, retry_wait=None, timeout=None, blocking=True, callback=None
 ):
     """
-    Searches the network for chromecast devices and creates a Chromecast 
instance
+    Searches the network for chromecast devices and creates a Chromecast object
     for each discovered device.
 
-    May return an empty list if no chromecasts were found.
+    Returns a tuple of:
+      A list of Chromecast objects, or an empty list if no matching 
chromecasts were
+      found.
+      A service browser to keep the Chromecast mDNS data updated. When updates
+      are (no longer) needed, pass the broswer object to
+      pychromecast.discovery.stop_discover().
+
+    To only discover chromcast devices wihtout connecting to them, use
+    discover_chromecasts instead.
 
     Parameters tries, timeout, retry_wait and blocking_app_launch controls the
     behavior of the created Chromecast instances.
@@ -173,29 +207,34 @@
     """
     if blocking:
         # Thread blocking chromecast discovery
-        hosts = discover_chromecasts()
+        services, browser = discover_chromecasts()
         cc_list = []
-        for host in hosts:
+        for service in services:
             try:
                 cc_list.append(
-                    get_chromecast_from_host(
-                        host, tries=tries, retry_wait=retry_wait, 
timeout=timeout
+                    get_chromecast_from_service(
+                        service,
+                        browser.zc,
+                        tries=tries,
+                        retry_wait=retry_wait,
+                        timeout=timeout,
                     )
                 )
             except ChromecastConnectionError:  # noqa
                 pass
-        return cc_list
+        return (cc_list, browser)
 
     # Callback based chromecast discovery
     if not callable(callback):
         raise ValueError("Nonblocking discovery requires a callback function.")
 
-    def internal_callback(name):
+    def internal_callback(uuid, name):  # pylint: disable=unused-argument
         """Called when zeroconf has discovered a new chromecast."""
         try:
             callback(
-                get_chromecast_from_host(
-                    listener.services[name],
+                get_chromecast_from_service(
+                    listener.services[uuid],
+                    zconf=zconf,
                     tries=tries,
                     retry_wait=retry_wait,
                     timeout=timeout,
@@ -204,13 +243,10 @@
         except ChromecastConnectionError:  # noqa
             pass
 
-    def internal_stop():
-        """Stops discovery of new chromecasts."""
-        stop_discovery(browser)
-
     listener = CastListener(internal_callback)
-    browser = start_discovery(listener)
-    return internal_stop
+    zconf = zeroconf.Zeroconf()
+    browser = start_discovery(listener, zconf)
+    return browser
 
 
 # pylint: disable=too-many-instance-attributes, too-many-public-methods
@@ -247,7 +283,7 @@
         timeout = kwargs.pop("timeout", None)
         retry_wait = kwargs.pop("retry_wait", None)
         services = kwargs.pop("services", None)
-        zconf = kwargs.pop("zconf", True)
+        zconf = kwargs.pop("zconf", None)
 
         self.logger = logging.getLogger(__name__)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/pychromecast/controllers/plex.py 
new/PyChromecast-7.1.1/pychromecast/controllers/plex.py
--- old/PyChromecast-6.0.0/pychromecast/controllers/plex.py     2020-06-03 
08:21:09.000000000 +0200
+++ new/PyChromecast-7.1.1/pychromecast/controllers/plex.py     2020-07-03 
17:23:37.000000000 +0200
@@ -53,6 +53,7 @@
     autoplay=True,
     currentTime=0,
     playQueueID=None,
+    version="1.10.1.4602",
     **kwargs
 ):  # noqa: 501 pylint: disable=invalid-name, too-many-arguments, 
too-many-locals, protected-access, redefined-builtin
     """Create the message that chromecast requires. Use pass of plexapi media 
object or
@@ -80,6 +81,7 @@
         username (None): user name of the person that start the playback.
         autoplay (bool): Auto play after the video is done.
         currentTime (int): Set playback from this time. default 0
+        version (str): pms version. Default 1.10.1.4602
         **kwargs: To allow overrides, this will be merged with the rest of the 
msg.
 
     Returns:
@@ -126,7 +128,7 @@
                     "transcoderVideo": transcoderVideo,
                     "transcoderVideoRemuxOnly": transcoderVideoRemuxOnly,
                     "transcoderAudio": transcoderAudio,
-                    "version": "1.4.3.3433",
+                    "version": version,
                     "myPlexSubscription": myPlexSubscription,
                     "isVerifiedHostname": isVerifiedHostname,
                     "protocol": protocol,
@@ -530,3 +532,16 @@
             subtitle (str): could be index, language or languageCode.
         """
         self._change_track(subtitle)
+
+    def play_media(self, media=None, **kwargs):
+        """Start playback on the chromecast
+
+        Args:
+            media (None, optional): Can also be :class:`~plexapi.base.Playable
+                                   if its not, you need to fill out all the 
kwargs.
+            **kwargs: See media_to_chromecast_command docs string. `version` 
is by default set to the
+                version of the PMS reported by the API.
+        """  # noqa
+        args = {"version": self.pms.version}
+        args.update(kwargs)
+        super().play_media(media, **args)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/pychromecast/discovery.py 
new/PyChromecast-7.1.1/pychromecast/discovery.py
--- old/PyChromecast-6.0.0/pychromecast/discovery.py    2020-06-03 
08:21:09.000000000 +0200
+++ new/PyChromecast-7.1.1/pychromecast/discovery.py    2020-07-03 
17:23:37.000000000 +0200
@@ -34,14 +34,26 @@
     def remove_service(self, zconf, typ, name):
         """ Remove a service from the collection. """
         _LOGGER.debug("remove_service %s, %s", typ, name)
-        service = self.services.pop(name, None)
+        service = None
+        service_removed = False
+        uuid = None
+        for uuid, services_for_uuid in self.services.items():
+            if name in services_for_uuid[0]:
+                service = services_for_uuid
+                services_for_uuid[0].remove(name)
+                if len(services_for_uuid[0]) == 0:
+                    self.services.pop(uuid)
+                    service_removed = True
+                break
 
         if not service:
             _LOGGER.debug("remove_service unknown %s, %s", typ, name)
             return
 
-        if self.remove_callback:
-            self.remove_callback(name, service)
+        if self.remove_callback and service_removed:
+            self.remove_callback(uuid, name, service)
+        if self.update_callback and not service_removed:
+            self.update_callback(uuid, name)
 
     def update_service(self, zconf, typ, name):
         """ Update a service in the collection. """
@@ -85,16 +97,29 @@
         uuid = get_value("id")
         friendly_name = get_value("fn")
 
-        if uuid:
-            uuid = UUID(uuid)
+        if not uuid:
+            _LOGGER.debug("add_service failed to get uuid for %s, %s", typ, 
name)
+            return
+        uuid = UUID(uuid)
 
-        self.services[name] = (host, service.port, uuid, model_name, 
friendly_name)
+        services_for_uuid = self.services.setdefault(
+            uuid, ({name}, uuid, model_name, friendly_name)
+        )
+        services_for_uuid[0].add(name)
+        self.services[uuid] = (
+            services_for_uuid[0],
+            services_for_uuid[1],
+            model_name,
+            friendly_name,
+            host,
+            service.port,
+        )
 
         if callback:
-            callback(name)
+            callback(uuid, name)
 
 
-def start_discovery(listener, zeroconf_instance=None):
+def start_discovery(listener, zeroconf_instance):
     """
     Start discovering chromecasts on the network.
 
@@ -113,7 +138,7 @@
     instance is passed, a new instance will be created.
     """
     return zeroconf.ServiceBrowser(
-        zeroconf_instance or zeroconf.Zeroconf(), "_googlecast._tcp.local.", 
listener,
+        zeroconf_instance, "_googlecast._tcp.local.", listener,
     )
 
 
@@ -128,24 +153,76 @@
 
 
 def discover_chromecasts(max_devices=None, timeout=DISCOVER_TIMEOUT):
-    """ Discover chromecasts on the network. """
-    try:
-        # pylint: disable=unused-argument
-        def callback(name):
-            """Called when zeroconf has discovered a new chromecast."""
-            if max_devices is not None and listener.count >= max_devices:
-                discover_complete.set()
-
-        discover_complete = Event()
-        listener = CastListener(callback)
-        browser = start_discovery(listener)
-
-        # Wait for the timeout or the maximum number of devices
-        discover_complete.wait(timeout)
-
-        return listener.devices
-    finally:
-        stop_discovery(browser)
+    """
+    Discover chromecasts on the network.
+
+    Returns a tuple of:
+      A list of chromecast services, or an empty list if no matching 
chromecasts were
+      found.
+      A service browser to keep the Chromecast mDNS data updated. When updates
+      are (no longer) needed, pass the broswer object to
+      pychromecast.discovery.stop_discover().
+    """
+    # pylint: disable=unused-argument
+    def callback(uuid, name):
+        """Called when zeroconf has discovered a new chromecast."""
+        if max_devices is not None and listener.count >= max_devices:
+            discover_complete.set()
+
+    discover_complete = Event()
+    listener = CastListener(callback)
+    zconf = zeroconf.Zeroconf()
+    browser = start_discovery(listener, zconf)
+
+    # Wait for the timeout or the maximum number of devices
+    discover_complete.wait(timeout)
+
+    return (listener.devices, browser)
+
+
+def discover_listed_chromecasts(
+    friendly_names=None, uuids=None, discovery_timeout=DISCOVER_TIMEOUT,
+):
+    """
+    Searches the network for chromecast devices matching a list of friendly
+    names or a list of UUIDs.
+
+    Returns a tuple of:
+      A list of chromecast services matching the criteria,
+      or an empty list if no matching chromecasts were found.
+      A service browser to keep the Chromecast mDNS data updated. When updates
+      are (no longer) needed, pass the broswer object to
+      pychromecast.discovery.stop_discover().
+
+    :param friendly_names: A list of wanted friendly names
+    :param uuids: A list of wanted uuids
+    :param discovery_timeout: A floating point number specifying the time to 
wait
+                               devices matching the criteria have been found.
+    """
+
+    cc_list = {}
+
+    def callback(uuid, name):  # pylint: disable=unused-argument
+        service = listener.services[uuid]
+        friendly_name = service[3]
+        if uuids and uuid in uuids:
+            cc_list[uuid] = listener.services[uuid]
+            uuids.remove(uuid)
+        if friendly_names and friendly_name in friendly_names:
+            cc_list[uuid] = listener.services[uuid]
+            friendly_names.remove(friendly_name)
+        if not friendly_names and not uuids:
+            discover_complete.set()
+
+    discover_complete = Event()
+
+    listener = CastListener(callback)
+    zconf = zeroconf.Zeroconf()
+    browser = start_discovery(listener, zconf)
+
+    # Wait for the timeout or found all wanted devices
+    discover_complete.wait(discovery_timeout)
+    return (cc_list.values(), browser)
 
 
 def get_info_from_service(service, zconf):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/pychromecast/socket_client.py 
new/PyChromecast-7.1.1/pychromecast/socket_client.py
--- old/PyChromecast-6.0.0/pychromecast/socket_client.py        2020-06-03 
08:21:09.000000000 +0200
+++ new/PyChromecast-7.1.1/pychromecast/socket_client.py        2020-07-03 
17:23:37.000000000 +0200
@@ -525,12 +525,21 @@
 
         self.heartbeat_controller.reset()
         self._force_recon = False
-        logging.debug("Thread started...")
-        while not self.stop.is_set():
-
-            if self.run_once(timeout=POLL_TIME_BLOCKING) == 1:
-                break
+        self.logger.debug("Thread started...")
+        try:
+            while not self.stop.is_set():
+                if self.run_once(timeout=POLL_TIME_BLOCKING) == 1:
+                    break
+        except Exception:  # pylint: disable=broad-except
+            self.logger.exception(
+                ("[%s(%s):%s] Unhandled exception in worker thread"),
+                self.fn or "",
+                self.host,
+                self.port,
+            )
+            raise
 
+        self.logger.debug("Thread done...")
         # Clean up
         self._cleanup()
 
@@ -651,6 +660,7 @@
             reset = True
 
         if reset:
+            self.receiver_controller.disconnected()
             for channel in self._open_channels:
                 self.disconnect_channel(channel)
             self._report_connection_status(
@@ -784,11 +794,23 @@
                 chunks.append(chunk)
                 bytes_recd += len(chunk)
             except socket.timeout:
+                self.logger.debug(
+                    "[%s(%s):%s] timeout in : _read_bytes_from_socket",
+                    self.fn or "",
+                    self.host,
+                    self.port,
+                )
                 continue
             except ssl.SSLError as exc:
                 # Support older ssl implementations which does not raise
                 # socket.timeout on timeouts
                 if _is_ssl_timeout(exc):
+                    self.logger.debug(
+                        "[%s(%s):%s] ssl timeout in : _read_bytes_from_socket",
+                        self.fn or "",
+                        self.host,
+                        self.port,
+                    )
                     continue
                 raise
         return b"".join(chunks)
@@ -1078,6 +1100,11 @@
         self._status_listeners = []
         self._launch_error_listeners = []
 
+    def disconnected(self):
+        """ Called when disconnected. Will erase status. """
+        self.logger.info("Receiver:channel_disconnected")
+        self.status = None
+
     @property
     def app_id(self):
         """ Convenience method to retrieve current app id. """
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/PyChromecast-6.0.0/setup.py 
new/PyChromecast-7.1.1/setup.py
--- old/PyChromecast-6.0.0/setup.py     2020-06-03 08:21:09.000000000 +0200
+++ new/PyChromecast-7.1.1/setup.py     2020-07-03 17:23:37.000000000 +0200
@@ -5,7 +5,7 @@
 
 setup(
     name="PyChromecast",
-    version="6.0.0",
+    version="7.1.1",
     license="MIT",
     url="https://github.com/balloob/pychromecast";,
     author="Paulus Schoutsen",


Reply via email to