removed unnecesarry file

This commit is contained in:
Lars Noack 2022-11-08 12:08:36 +01:00
parent 452c1b5eea
commit 3969290159
3 changed files with 4 additions and 6 deletions

View File

@ -18,9 +18,6 @@ print(EasyID3.valid_keys.keys())
""" """
class Download: class Download:
def __init__(self, database, logger: logging.Logger, proxies: dict = None, base_path: str = ""): def __init__(self, database, logger: logging.Logger, proxies: dict = None, base_path: str = ""):
if proxies is not None: if proxies is not None:

View File

@ -6,7 +6,8 @@ from scraping import musify, youtube_music
class Download: class Download:
def __init__(self, database, logger: logging.Logger, proxies: dict = None) -> None: def __init__(self, database, logger: logging.Logger, music_dir: str, proxies: dict = None) -> None:
self.music_dir = music_dir
self.database = database self.database = database
self.logger = logger self.logger = logger
if proxies is not None: if proxies is not None:
@ -18,7 +19,7 @@ class Download:
row['artists'] = [artist['name'] for artist in row['artists']] row['artists'] = [artist['name'] for artist in row['artists']]
id_ = row['id'] id_ = row['id']
if os.path.exists(os.path.join(os.path.expanduser('~/Music'), row['file'])): if os.path.exists(os.path.join(self.music_dir, row['file'])):
self.logger.info(f"skipping the fetching of the download links, cuz {row['file']} already exists.") self.logger.info(f"skipping the fetching of the download links, cuz {row['file']} already exists.")
continue continue

View File

@ -116,7 +116,7 @@ def cli(start_at: int = 0):
if start_at <= 2: if start_at <= 2:
logging.info("Fetching Download Links") logging.info("Fetching Download Links")
download_links.Download(database, METADATA_DOWNLOAD_LOGGER, proxies=proxies) download_links.Download(database, METADATA_DOWNLOAD_LOGGER, MUSIC_DIR, proxies=proxies)
if start_at <= 3: if start_at <= 3:
logging.info("starting to download the mp3's") logging.info("starting to download the mp3's")