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: Make lookup() ignore tracks without URI #1381

Merged
merged 2 commits into from Jan 3, 2016

Conversation

2 participants
@jodal
Member

jodal commented Jan 1, 2016

Fixes #1340

@jodal jodal added the A-core label Jan 1, 2016

@jodal jodal added this to the v1.1.2 - Bugfixes milestone Jan 1, 2016

@jodal jodal force-pushed the jodal:fix/1340 branch from f7b3fc9 to 094a874 Jan 1, 2016

@@ -236,7 +236,7 @@ def lookup(self, uri=None, uris=None):
result = future.get()
if result is not None:
validation.check_instances(result, models.Track)
results[u] = result
results[u] = [r for r in result if r.uri]

This comment has been minimized.

@adamcik

adamcik Jan 1, 2016

Member

Maybe add a note or TODO to revisit this if we make the URI mandatory. So maybe just # Silently drop tracks without URIs as this crashes some clients. And on a side note should we log what backend sent the bad data?

This comment has been minimized.

@jodal

jodal Jan 3, 2016

Member

I'm adding a note about making Track.uri mandatory instead. When we do that, backend's will fail to create the broken objects and will thus quickly get feedback and get fixed. Don't want to add too much logic in an inner loop.

@adamcik

This comment has been minimized.

Member

adamcik commented Jan 1, 2016

Other than that optional comment this looks good to merge.

jodal added a commit that referenced this pull request Jan 3, 2016

Merge pull request #1381 from jodal/fix/1340
core: Make lookup() ignore tracks without URI

@jodal jodal merged commit b2860eb into mopidy:release-1.1 Jan 3, 2016

0 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@jodal jodal deleted the jodal:fix/1340 branch Jan 3, 2016

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