Better handling of error message
This commit is contained in:
parent
eb479df689
commit
bd7928a8ca
2 changed files with 5 additions and 2 deletions
|
@ -334,6 +334,8 @@ class Client:
|
|||
if entry.uuid not in self.skipped:
|
||||
self.skipped = []
|
||||
await self.player.play(video, audio, source.extra_mpv_options)
|
||||
except ValueError as e:
|
||||
logger.error("Error playing: %s", e)
|
||||
except Exception: # pylint: disable=broad-except
|
||||
print_exc()
|
||||
if self.skipped:
|
||||
|
|
|
@ -255,10 +255,11 @@ class Source(ABC):
|
|||
self.downloaded_files[entry.ident].video = video
|
||||
self.downloaded_files[entry.ident].audio = audio
|
||||
self.downloaded_files[entry.ident].complete = True
|
||||
except ValueError as exc:
|
||||
raise exc
|
||||
except Exception: # pylint: disable=broad-except
|
||||
print_exc()
|
||||
logger.error("Buffering failed for %s", entry)
|
||||
self.downloaded_files[entry.ident].failed = True
|
||||
raise ValueError("Buffering failed for %s" % entry)
|
||||
|
||||
self.downloaded_files[entry.ident].ready.set()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue