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

core: Add uris argument to library.lookup (Fixes #1008) #1047

Merged
merged 3 commits into from Mar 18, 2015

Conversation

2 participants
@adamcik
Member

adamcik commented Mar 17, 2015

For now this doesn't add any corresponding APIs to backends, or for that matter
tracklist.add(uris). This is just to get the API in for clients in 0.20.

@adamcik adamcik added this to the v0.20 - Audio cleanup 1 milestone Mar 17, 2015

@@ -31,6 +31,9 @@ v0.20.0 (UNRELEASED)
- Add :class:`mopidy.core.MixerController` which keeps track of volume and
mute. (Fixes: :issue:`962`)
- Add ``uris`` argument to :method:`mopidy.core.LibraryController.lookup`
which also for simpler lookup of multiple URIs. (Fixes: :issue:`1008`)

This comment has been minimized.

@jodal

jodal Mar 17, 2015

Member

Sentence does not compute.

This comment has been minimized.

@adamcik

adamcik Mar 17, 2015

Member

Fixed with an amend+force.

core: Add uris argument to library.lookup (Fixes #1008)
For now this doesn't add any corresponding APIs to backends, or for that matter
tracklist.add(uris). This is just to get the API in for clients in 0.20.

@adamcik adamcik force-pushed the adamcik:fix/1008-add-uris-to-lookup branch from 42b5098 to fdc84c3 Mar 17, 2015

:param uris: track URIs
:type uris: list of string or :class:`None`
:rtype: list of :class:`mopidy.models.Track` if uri was set or a
``{uri: list of tracks}`` if uris was set.

This comment has been minimized.

@jodal

jodal Mar 17, 2015

Member

Since there's different return structures here, we might as well go all in with core-cleanup in the docs and say {uri: list of models}. As in, don't promise tracks.

@jodal jodal self-assigned this Mar 17, 2015

@jodal jodal added the 2 - Working label Mar 18, 2015

@@ -31,6 +31,9 @@ v0.20.0 (UNRELEASED)
- Add :class:`mopidy.core.MixerController` which keeps track of volume and
mute. (Fixes: :issue:`962`)
- Add ``uris`` argument to :method:`mopidy.core.LibraryController.lookup`
which allows for simpler lookup of multiple URIs. (Fixes: :issue:`1008`)

This comment has been minimized.

@jodal

jodal Mar 18, 2015

Member

Add PR #1047

:type uri: string or :class:`None`
:param uris: track URIs
:type uris: list of string or :class:`None`
:rtype: {uri: list of :class:`mopidy.models.Track`}

This comment has been minimized.

@jodal

jodal Mar 18, 2015

Member

Keep docs of return type if uri is given in addition to this.

:type uris: list of string or :class:`None`
:rtype: {uri: list of :class:`mopidy.models.Track`}
.. versionadded:: 0.20

This comment has been minimized.

@jodal

jodal Mar 18, 2015

Member

Change to 1.0

.. versionadded:: 0.20
The ``uris`` argument.
.. deprecated:: 0.20

This comment has been minimized.

@jodal

jodal Mar 18, 2015

Member

Change to 1.0

@jodal

This comment has been minimized.

Member

jodal commented Mar 18, 2015

Four trivial fixes, and this is ready to go in.

@adamcik

This comment has been minimized.

Member

adamcik commented Mar 18, 2015

Done.

jodal added a commit that referenced this pull request Mar 18, 2015

Merge pull request #1047 from adamcik/fix/1008-add-uris-to-lookup
core: Add uris argument to library.lookup (Fixes #1008)

@jodal jodal merged commit dc982cd into mopidy:develop Mar 18, 2015

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Scrutinizer 3 updated code elements
Details

@jodal jodal removed the 2 - Working label Mar 18, 2015

@adamcik adamcik deleted the adamcik:fix/1008-add-uris-to-lookup branch Mar 18, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment