Misc renames

This commit is contained in:
nathom 2021-03-22 13:06:06 -07:00
parent 41223c1237
commit bd52681623
3 changed files with 9 additions and 9 deletions

View file

@ -9,7 +9,7 @@ import click
from .clients import DeezerClient, QobuzClient, TidalClient from .clients import DeezerClient, QobuzClient, TidalClient
from .config import Config from .config import Config
from .constants import CONFIG_PATH, DB_PATH, URL_REGEX from .constants import CONFIG_PATH, DB_PATH, URL_REGEX
from .db import QobuzDB from .db import MusicDB
from .downloader import Album, Artist, Playlist, Track, Label from .downloader import Album, Artist, Playlist, Track, Label
from .exceptions import AuthenticationError, ParsingError from .exceptions import AuthenticationError, ParsingError
from .utils import capitalize from .utils import capitalize
@ -44,9 +44,9 @@ class MusicDL:
} }
if database is None: if database is None:
self.db = QobuzDB(DB_PATH) self.db = MusicDB(DB_PATH)
else: else:
assert isinstance(database, QobuzDB) assert isinstance(database, MusicDB)
self.db = database self.db = database
def prompt_creds(self, source: str): def prompt_creds(self, source: str):

View file

@ -10,7 +10,7 @@ class MusicDB:
"""Simple interface for the downloaded track database.""" """Simple interface for the downloaded track database."""
def __init__(self, db_path: Union[str, os.PathLike]): def __init__(self, db_path: Union[str, os.PathLike]):
"""Create a QobuzDB object """Create a MusicDB object
:param db_path: filepath of the database :param db_path: filepath of the database
:type db_path: Union[str, os.PathLike] :type db_path: Union[str, os.PathLike]

View file

@ -23,7 +23,7 @@ from .constants import (
FOLDER_FORMAT, FOLDER_FORMAT,
TRACK_FORMAT, TRACK_FORMAT,
) )
from .db import QobuzDB from .db import MusicDB
from .exceptions import ( from .exceptions import (
InvalidQuality, InvalidQuality,
InvalidSourceError, InvalidSourceError,
@ -139,7 +139,7 @@ class Track:
quality: int = 7, quality: int = 7,
parent_folder: str = "Downloads", parent_folder: str = "Downloads",
progress_bar: bool = True, progress_bar: bool = True,
database: QobuzDB = None, database: MusicDB = None,
): ):
""" """
Download the track. Download the track.
@ -725,7 +725,7 @@ class Album(Tracklist):
tag_tracks: bool = True, tag_tracks: bool = True,
cover_key: str = "large", cover_key: str = "large",
embed_cover: bool = False, embed_cover: bool = False,
database: QobuzDB = None, database: MusicDB = None,
): ):
"""Download all of the tracks in the album. """Download all of the tracks in the album.
@ -935,7 +935,7 @@ class Playlist(Tracklist):
quality: int = 6, quality: int = 6,
filters: Callable = None, filters: Callable = None,
embed_cover: bool = False, embed_cover: bool = False,
database: QobuzDB = None, database: MusicDB = None,
): ):
"""Download and tag all of the tracks. """Download and tag all of the tracks.
@ -1052,7 +1052,7 @@ class Artist(Tracklist):
no_repeats: bool = False, no_repeats: bool = False,
quality: int = 6, quality: int = 6,
embed_cover: bool = False, embed_cover: bool = False,
database: QobuzDB = None, database: MusicDB = None,
): ):
"""Download all albums in the discography. """Download all albums in the discography.