mirror of
https://github.com/nathom/streamrip.git
synced 2025-06-07 10:04:49 -04:00
Misc bug fixes
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
e77182ae6a
commit
835c8d4cc6
5 changed files with 44 additions and 16 deletions
|
@ -32,11 +32,16 @@ class NonStreamable(Exception):
|
|||
super().__init__(self.message)
|
||||
|
||||
def print(self, item):
|
||||
print(self.print_msg(item))
|
||||
|
||||
def print_msg(self, item) -> str:
|
||||
base_msg = click.style(f"Unable to stream {item!s}.", fg="yellow")
|
||||
if self.message:
|
||||
click.secho(f"Unable to stream {item!s}. Message: ", nl=False, fg="yellow")
|
||||
click.secho(self.message, fg="red")
|
||||
else:
|
||||
click.secho(f"Unable to stream {item!s}.", fg="yellow")
|
||||
base_msg += click.style(" Message: ", fg="yellow") + click.style(
|
||||
self.message, fg="red"
|
||||
)
|
||||
|
||||
return base_msg
|
||||
|
||||
|
||||
class InvalidContainerError(Exception):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue