removed unnecesarry file
This commit is contained in:
parent
452c1b5eea
commit
3969290159
@ -18,9 +18,6 @@ print(EasyID3.valid_keys.keys())
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Download:
|
||||
def __init__(self, database, logger: logging.Logger, proxies: dict = None, base_path: str = ""):
|
||||
if proxies is not None:
|
||||
|
@ -6,7 +6,8 @@ from scraping import musify, youtube_music
|
||||
|
||||
|
||||
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.logger = logger
|
||||
if proxies is not None:
|
||||
@ -18,7 +19,7 @@ class Download:
|
||||
row['artists'] = [artist['name'] for artist in row['artists']]
|
||||
|
||||
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.")
|
||||
continue
|
||||
|
||||
|
@ -116,7 +116,7 @@ def cli(start_at: int = 0):
|
||||
|
||||
if start_at <= 2:
|
||||
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:
|
||||
logging.info("starting to download the mp3's")
|
||||
|
Loading…
Reference in New Issue
Block a user