Minor bugfixes:

- Playlist creation didn't correctly yield the ID of the new playlist
- Albums with more than a single page of tracks would yield the results directly, rather than a pager
This commit is contained in:
Bradlee Speice 2021-09-08 22:20:25 -04:00
parent 21adb3acdc
commit b8ab83ae63
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ def album_to_tracks(client: Spotify, albums: Iterable[SimplifiedAlbum]) -> Itera
# Because most album tracklists don't need to use paging, it's expected that API calls are relatively infrequent # Because most album tracklists don't need to use paging, it's expected that API calls are relatively infrequent
for album in albums: for album in albums:
tracks_function = partial(client.album_tracks, album_id=album.spotify_id) tracks_function = partial(_album_tracks, album_id=album.spotify_id)
for track in exhaust(tracks_function, album.tracks): for track in exhaust(tracks_function, album.tracks):
yield SimplifiedTrack(**track) yield SimplifiedTrack(**track)

View File

@ -54,7 +54,7 @@ def playlist_current_user_assure(
if not found: if not found:
current_user_id = user_current(client).spotify_id current_user_id = user_current(client).spotify_id
playlist_create(client, current_user_id, name) yield playlist_create(client, current_user_id, name)
def playlist_replace( def playlist_replace(