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

Support for playlist management (v2) #287

Open
wants to merge 34 commits into
base: main
Choose a base branch
from

Commits on Nov 3, 2020

  1. Configuration menu
    Copy the full SHA
    95c1031 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5333536 View commit details
    Browse the repository at this point in the history
  3. Added support for paging playlist edit calls

    It also addresses the comments in mopidy#236
    blacklight authored and girst committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    c23eda1 View commit details
    Browse the repository at this point in the history
  4. make tests pass

    girst committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    0acd636 View commit details
    Browse the repository at this point in the history
  5. implement playlist deletion

    girst committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    d449225 View commit details
    Browse the repository at this point in the history
  6. fix SpotifyPlaylistsProvider.partitions() usage

    - can't pass in sets, only lists
    - provide a useful default n parameter
    girst committed Nov 3, 2020
    Configuration menu
    Copy the full SHA
    1dc0e7e View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2020

  1. fix creating playlist

    making playlist private, not just for the obvious reason, but also
    because our API client is not authorized for the playlist-modify-public
    scope (only playlist-modify-private).
    girst committed Nov 7, 2020
    Configuration menu
    Copy the full SHA
    13e98bf View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2020

  1. Don't invalidate whole cache on playlist modifications

    not thoroughly tested yet
    girst committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    2994325 View commit details
    Browse the repository at this point in the history
  2. Implement diff algorithm, API calls

    Uses Myers' diff, extended to detect moved ranges. With the exception of
    non-consecutive deletes, this generates a near-optimal edit script.
    girst committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    42a6506 View commit details
    Browse the repository at this point in the history
  3. Mock up a Spotify API backend that supports editing playlists

    To use the preexisting mopidy_album_mock the web translator had to be
    extended to parse release dates (only the year is supported, as that's
    what the test data requires).
    girst committed Nov 15, 2020
    Configuration menu
    Copy the full SHA
    ba0a616 View commit details
    Browse the repository at this point in the history

Commits on Nov 19, 2020

  1. Configuration menu
    Copy the full SHA
    46f2935 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e9caa71 View commit details
    Browse the repository at this point in the history
  3. Keep utils test coverage at 100%

    op.__repr__ is useful for debugging only.
    girst committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    4ec107c View commit details
    Browse the repository at this point in the history
  4. remove dead code

    this won't ever fire, since getattr() will raise on error.
    girst committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    74d405f View commit details
    Browse the repository at this point in the history
  5. Fix flake8 warnings

    Rest will be fixed by black.
    girst committed Nov 19, 2020
    Configuration menu
    Copy the full SHA
    d6708ee View commit details
    Browse the repository at this point in the history

Commits on Nov 20, 2020

  1. Configuration menu
    Copy the full SHA
    525f420 View commit details
    Browse the repository at this point in the history
  2. Reformat source with black

    girst committed Nov 20, 2020
    Configuration menu
    Copy the full SHA
    e8ce572 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4adc6f4 View commit details
    Browse the repository at this point in the history

Commits on Nov 21, 2020

  1. Configuration menu
    Copy the full SHA
    4b3a3b4 View commit details
    Browse the repository at this point in the history
  2. Add some notes about the confusing part of delta_f/t

    ... and its accompanying tests.
    girst committed Nov 21, 2020
    Configuration menu
    Copy the full SHA
    468a811 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2020

  1. apply review feedback (1)

    girst committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    8af448b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b3c09d1 View commit details
    Browse the repository at this point in the history
  3. Move Spotify Web API specific stuff to web.py

    note that these functions are not part of the SpotifyOAuthClient class,
    so the web_client_mock will use them, instead of a mocked version of
    them.
    girst committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    6fd0a7b View commit details
    Browse the repository at this point in the history
  4. apply review feedback (2)

    girst committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    3ec1c44 View commit details
    Browse the repository at this point in the history
  5. Don't hide unplayable tracks

    Comment from @kingosticks:
    > Tracks might be currently unplayable if unavailable in the geo region
    > where the user is logged in (but may be playable from elsewhere and/or
    > in the future). These unplayable tracks will clutter the
    > queue/playlist listing and might be confusing to users when they try
    > to play them. But I don't see another way to avoid losing them when we
    > use save().
    girst committed Nov 23, 2020
    Configuration menu
    Copy the full SHA
    6237b5c View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2020

  1. Refuse outright if spotify:local tracks are present

    Since the Spotify Web API does not support adding tracks, we can't make
    use of the 'replace' strategy. And removing local tracks by URL+position
    doesn't work either (according to some vague docs), so we'd have to
    rework not just the DELETE API call, but also delta counting and
    implement fetching of additional playlist metadata.
    
    further reading:
    https://community.spotify.com/t5/Spotify-for-Developers/API-Get-a-Playlist-s-Items-Incorrect-tracks/td-p/4990167
    https://developer.spotify.com/documentation/general/guides/local-files-spotify-playlists/
    girst committed Nov 29, 2020
    Configuration menu
    Copy the full SHA
    79317af View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2020

  1. Configuration menu
    Copy the full SHA
    609795f View commit details
    Browse the repository at this point in the history

Commits on Jan 2, 2021

  1. apply review feedback (3)

    girst committed Jan 2, 2021
    Configuration menu
    Copy the full SHA
    47c553f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f8c69f7 View commit details
    Browse the repository at this point in the history

Commits on Jan 4, 2021

  1. Configuration menu
    Copy the full SHA
    fc11efe View commit details
    Browse the repository at this point in the history
  2. optimize MOV finding a bit

    girst committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    0d596ed View commit details
    Browse the repository at this point in the history
  3. more tests for check_playable

    girst committed Jan 4, 2021
    Configuration menu
    Copy the full SHA
    400060e View commit details
    Browse the repository at this point in the history

Commits on Jan 10, 2021

  1. Configuration menu
    Copy the full SHA
    50f1ab3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1c0358a View commit details
    Browse the repository at this point in the history