diff --git a/rip/cli.py b/rip/cli.py index 6ce3938..f6464ce 100644 --- a/rip/cli.py +++ b/rip/cli.py @@ -45,7 +45,7 @@ def cli(ctx, **kwargs): from .config import Config from .constants import CONFIG_DIR - from .core import MusicDL + from .core import RipCore logging.basicConfig(level="WARNING") logger = logging.getLogger("streamrip") @@ -104,7 +104,7 @@ def cli(ctx, **kwargs): config.session["tidal"]["quality"] = quality config.session["deezer"]["quality"] = quality - core = MusicDL(config) + core = RipCore(config) if kwargs["urls"]: logger.debug(f"handling {kwargs['urls']}") diff --git a/rip/core.py b/rip/core.py index 4670490..17c6a1d 100644 --- a/rip/core.py +++ b/rip/core.py @@ -81,14 +81,22 @@ DB_PATH_MAP = {"downloads": DB_PATH, "failed_downloads": FAILED_DB_PATH} # ---------------------------------------------- # -class MusicDL(list): - """MusicDL.""" +class RipCore(list): + """RipCore.""" + + clients = { + "qobuz": QobuzClient(), + "tidal": TidalClient(), + "deezer": DeezerClient(), + "soundcloud": SoundCloudClient(), + "deezloader": DeezloaderClient(), + } def __init__( self, config: Optional[Config] = None, ): - """Create a MusicDL object. + """Create a RipCore object. :param config: :type config: Optional[Config] @@ -99,13 +107,6 @@ class MusicDL(list): else: self.config = config - self.clients = { - "qobuz": QobuzClient(), - "tidal": TidalClient(), - "deezer": DeezerClient(), - "soundcloud": SoundCloudClient(), - } - def get_db(db_type: str) -> db.Database: db_settings = self.config.session["database"] db_class = db.CLASS_MAP[db_type]