|
|
@ -118,9 +118,10 @@ class StreamPlayer(threading.Thread): |
|
|
|
except Exception as e: |
|
|
|
self._current_error = e |
|
|
|
self.stop() |
|
|
|
finally: |
|
|
|
self._call_after() |
|
|
|
|
|
|
|
def stop(self): |
|
|
|
self._end.set() |
|
|
|
def _call_after(self): |
|
|
|
if self.after is not None: |
|
|
|
try: |
|
|
|
arg_count = len(inspect.signature(self.after).parameters) |
|
|
@ -136,6 +137,9 @@ class StreamPlayer(threading.Thread): |
|
|
|
except: |
|
|
|
pass |
|
|
|
|
|
|
|
def stop(self): |
|
|
|
self._end.set() |
|
|
|
|
|
|
|
@property |
|
|
|
def error(self): |
|
|
|
return self._current_error |
|
|
|