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

Make sure the stream backend playback/library handle URIs the same way #1447

Merged
merged 7 commits into from Feb 15, 2016

Conversation

@adamcik
Copy link
Member

@adamcik adamcik commented Feb 14, 2016

Probably replaces #1446. Main thing missing for 2.0 is a changelog, but it's time for bed now...

adamcik added 5 commits Feb 14, 2016
This allows us to start unifying how we handle playlists in the library and
playback cases.
We don't bother with this inside the unwrap code as if something redirects us
so be it.
library = actor.StreamLibraryProvider(backend, [])
def test_lookup_ignores_unknown_scheme(audio, config):
backend = actor.StreamBackend(audio=audio, config=config)
backend.library.lookup('http://example.com') == []

This comment has been minimized.

@jodal

jodal Feb 15, 2016
Member

Missing assert

logger.debug('URI matched metadata lookup blacklist: %s', uri)
return [Track(uri=uri)]

try:
result = self._scanner.scan(uri)
result = _unwrap_stream(

This comment has been minimized.

@jodal

jodal Feb 15, 2016
Member

Wouldn't it be nicer with _, scan_result = ... ?

if self.backend._blacklist_re.match(uri):
logger.debug('URI matched metadata lookup blacklist: %s', uri)
return uri

return _unwrap_stream(

This comment has been minimized.

@jodal

jodal Feb 15, 2016
Member

Wouldn't it be nicer with uri, _ = ... and then return uri ?

@jodal
Copy link
Member

@jodal jodal commented Feb 15, 2016

👍 with comments and a changelog entry

@adamcik
Copy link
Member Author

@adamcik adamcik commented Feb 15, 2016

Should get to it this evening.

jodal added a commit that referenced this pull request Feb 15, 2016
Make sure the stream backend playback/library handle URIs the same way
@jodal jodal merged commit 9a6636a into mopidy:develop Feb 15, 2016
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@adamcik adamcik deleted the adamcik:fix/1445-unify-stream-uri-handling branch Feb 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants