From 5d7771666a96ecd23ced1c9e5f4e55e37f52cb9d Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Tue, 27 Jun 2023 21:31:33 +0200 Subject: [PATCH] change album path --- tidal_scrape.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tidal_scrape.py b/tidal_scrape.py index c0a2268..048ff3d 100755 --- a/tidal_scrape.py +++ b/tidal_scrape.py @@ -81,9 +81,9 @@ def download_track( try: album_name = re.sub("/", " ", track.album.name) # type: ignore[reportOptionalMemberAccess] track_name = re.sub("/", " ", track.name) # type: ignore[reportOptionalMemberAccess] - artist_name = re.sub("/", " ", track.album.artist.name) # type: ignore[reportOptionalMemberAccess] + # artist_name = re.sub("/", " ", track.album.artist.name) # type: ignore[reportOptionalMemberAccess] dl_path = f"{DL_PATH}/{track.track_num} {track_name}.part" # type: ignore[reportOptionalMemberAccess] - dest_path = f"{DEST_PATH}/{artist_name}/{album_name}/{track.track_num} {track_name}" # type: ignore[reportOptionalMemberAccess] + dest_path = f"{DEST_PATH}/{album_name}/{track.track_num} {track_name}" # type: ignore[reportOptionalMemberAccess] for ext in ['.flac', '.mpf', '.m4a', '']: if os.path.exists(dest_path + ext) and SKIP_DOWNLOADED: @@ -129,8 +129,8 @@ def download_track( def download_cover(album: tidalapi.Album) -> None: album_name = re.sub("/", " ", album.name) # type: ignore[reportOptionalMemberAccess] - artist_name = re.sub("/", " ", album.artist.name) # type: ignore[reportOptionalMemberAccess] - dest_path = f"{DEST_PATH}/{artist_name}/{album_name}/cover.png" # type: ignore[reportOptionalMemberAccess] + # artist_name = re.sub("/", " ", album.artist.name) # type: ignore[reportOptionalMemberAccess] + dest_path = f"{DEST_PATH}/{album_name}/cover.png" # type: ignore[reportOptionalMemberAccess] url = album.image(1280) if os.path.exists(dest_path) and SKIP_DOWNLOADED: