Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add get_or_create_playlist and follow_playlist methods to RemoteAPI and related changes #91

Merged
merged 5 commits into from
May 30, 2024

Conversation

geo-martino
Copy link
Owner

Added

  • :py:meth:.RemoteAPI.get_or_create_playlist method for only creating a playlist when it doesn't
    already exist by name. Gets the existing playlist otherwise
  • Added :py:meth:.MusifyCollection.outer_difference method to cover the logic previously handled
    by the mislabelled :py:meth:.MusifyCollection.outer_difference method
  • :py:class:.RemoteDataWrangler and its implementations now handle URL objects from the yarl package
  • :py:meth:.RemoteAPI.follow_playlist method

Changed

  • :py:class:.RemoteItemChecker now uses the new :py:meth:.RemoteAPI.get_or_create_playlist method
    when creating playlists to avoid creating many duplicate playlists which could have lead to playlist
    creation explosion in repeated uses. The processor also accounts for any items that may have existed
    in the playlist before it was run and discounts them from any matches.
  • :py:class:.RemoteItemChecker also uses the new :py:meth:.RemoteAPI.follow_playlist method
    when creating playlists to ensure that a user is following the playlists it creates to avoid 'ghost playlist' issue.
  • :py:meth:.SpotifyAPI.create_playlist now returns the full response rather than just the URL of the playlist.

Fixed

  • Fixed logic in :py:meth:.MusifyCollection.intersection and :py:meth:.MusifyCollection.difference

@geo-martino geo-martino linked an issue May 30, 2024 that may be closed by this pull request
1 task
@geo-martino geo-martino enabled auto-merge (squash) May 30, 2024 20:29
@geo-martino geo-martino merged commit 3acc922 into master May 30, 2024
5 of 7 checks passed
@geo-martino geo-martino deleted the add-get-create-playlist branch May 30, 2024 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add get_or_create_playlist method to RemoteAPI
1 participant