Add repair command #98

Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
nathom 2021-07-06 14:02:22 -07:00
parent ec5afef1b3
commit 715ac496f1
11 changed files with 417 additions and 267 deletions

View file

@ -1,3 +1,7 @@
from typing import List
import click
class AuthenticationError(Exception):
pass
@ -23,7 +27,16 @@ class InvalidQuality(Exception):
class NonStreamable(Exception):
pass
def __init__(self, message=None):
self.message = message
super().__init__(self.message)
def print(self, item):
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")
class InvalidContainerError(Exception):
@ -52,3 +65,13 @@ class ConversionError(Exception):
class NoResultsFound(Exception):
pass
class ItemExists(Exception):
pass
class PartialFailure(Exception):
def __init__(self, failed_items: List):
self.failed_items = failed_items
super().__init__()