From 2fa687db8904c51ff524ea8f61f75201b5c6ca71 Mon Sep 17 00:00:00 2001 From: yiannisha Date: Thu, 28 Oct 2021 20:43:45 +0300 Subject: [PATCH 1/2] Added some .lower()'s so that file format can be uppercase in config --- zspotify/track.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zspotify/track.py b/zspotify/track.py index 57960496..6f01c38f 100644 --- a/zspotify/track.py +++ b/zspotify/track.py @@ -72,7 +72,7 @@ def download_track(track_id: str, extra_paths='', prefix=False, prefix_value='', ) else f'{prefix_value} - {song_name}' filename = os.path.join( - download_directory, f'{song_name}.{EXT_MAP.get(ZSpotify.get_config(DOWNLOAD_FORMAT))}') + download_directory, f'{song_name}.{EXT_MAP.get(ZSpotify.get_config(DOWNLOAD_FORMAT).lower())}') except Exception as e: print('### SKIPPING SONG - FAILED TO QUERY METADATA ###') @@ -146,7 +146,7 @@ def convert_audio_format(filename) -> None: temp_filename = f'{os.path.splitext(filename)[0]}.tmp' os.replace(filename, temp_filename) - download_format = ZSpotify.get_config(DOWNLOAD_FORMAT) + download_format = ZSpotify.get_config(DOWNLOAD_FORMAT).lower() file_codec = CODEC_MAP.get(download_format, "copy") if file_codec != 'copy': bitrate = ZSpotify.get_config(BITRATE) From 31baf3feaeb9d4a7d1112f2ef5bb3fc28d299f7a Mon Sep 17 00:00:00 2001 From: logykk Date: Fri, 29 Oct 2021 21:09:20 +1300 Subject: [PATCH 2/2] Fixed issues with playlist downloading --- README.md | 3 +++ zspotify/playlist.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 24bba2f5..107d2684 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,9 @@ Create and run a container from the image: docker run --rm -v "$PWD/ZSpotify Music:/ZSpotify Music" -v "$PWD/ZSpotify Podcasts:/ZSpotify Podcasts" -it zspotify ``` +### Google Colab +There is a community maintained repo for Google Colab at [Ori5000/zspotifycolab](https://github.com/Ori5000/zspotifycolab) designed to make it easier to add songs to Google Drive or orther cloud services. + ### Will my account get banned if I use this tool? ~~Currently no user has reported their account getting banned after using ZSpotify.~~ diff --git a/zspotify/playlist.py b/zspotify/playlist.py index cf333d1b..d232a8ac 100644 --- a/zspotify/playlist.py +++ b/zspotify/playlist.py @@ -76,7 +76,7 @@ def download_from_user_playlist(): playlist_choices = input('ID(s): ').split('-') if len(playlist_choices) == 1: - download_playlist(playlists, playlist_choices[0]) + download_playlist(playlists[0]) else: start = int(playlist_choices[0]) end = int(playlist_choices[1]) + 1