mirror of
https://github.com/nathom/streamrip.git
synced 2025-06-07 02:01:20 -04:00
Add repair command #98
Signed-off-by: nathom <nathanthomas707@gmail.com>
This commit is contained in:
parent
ec5afef1b3
commit
715ac496f1
11 changed files with 417 additions and 267 deletions
|
@ -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__()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue