Open
Conversation
mewforest
commented
Jan 14, 2023
- Fixes playlist duplicates (old version creates multiple playlists chucked to 100 tracks with the same name)
- Fixes BadRequest error, when search string is too big for Spotify API
- Adds progress bar (shows time elapsed and time remaining
added 2 commits
January 14, 2023 19:45
fix: playlist duplicates, when >100 tracks
smtchahal
requested changes
Jun 17, 2023
Owner
smtchahal
left a comment
There was a problem hiding this comment.
Apologies for the late review. I just saw this PR, it somehow missed my inbox.
Looks like a solid improvement overall! Just needs a few things fixed, see the added comments.
| @@ -1,2 +1,3 @@ | |||
| python-dotenv>=0.13.0,<=0.13.99 | |||
| spotipy>=2.19.0,<=2.19.99 | |||
| tqdm>=4.64.1 No newline at end of file | |||
Owner
There was a problem hiding this comment.
Suggested change
| tqdm>=4.64.1 | |
| tqdm>=4.64.1,<=4.64.99 |
Would recommend limiting package version to be the latest patch version as done with previous packages -- we don't want it to suddenly upgrade to say v5.0.0 and break functionality.
|
|
||
| def _run_txt(self): | ||
| with open(self.songs) as songs_file, open('failed.txt', 'w') as failed_file: | ||
| playlist = self.sp.user_playlist_create(user=self._get_user_id(), name=self.playlist, public=False) |
Owner
There was a problem hiding this comment.
self.playlist does not exist if the destination is 'library', so the script fails when run with destination=library. Need to add a check for destination and pass in a default value (e.g. None) instead of self.playlist if the destination is library.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.