mirror of
https://github.com/nathom/streamrip.git
synced 2025-05-14 15:15:06 -04:00
Rename MusicDL to RipCore
This commit is contained in:
parent
fd0777ebc3
commit
9be27dbcb3
2 changed files with 13 additions and 12 deletions
|
@ -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']}")
|
||||
|
|
21
rip/core.py
21
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]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue