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

Temporary hack for Mopidy v4 installations #387

Merged
merged 1 commit into from
Apr 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mopidy_spotify/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ def get_distinct(self, field, query=None):
def get_images(self, uris):
return images.get_images(self._backend._web_client, uris)

def lookup(self, uri):
return lookup.lookup(self._config, self._backend._web_client, [uri])

def lookup_many(self, uris):
return lookup.lookup(self._config, self._backend._web_client, uris)

Expand Down
7 changes: 7 additions & 0 deletions tests/test_lookup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import copy
from unittest import mock

import mopidy
import pytest
from mopidy_spotify import lookup

Expand Down Expand Up @@ -322,3 +323,9 @@ def test_lookup_no_cache_artist(web_client_mock, web_album_mock, provider):
assert len(results3) == 2
assert results3["spotify:album:def"][0].uri == "spotify:track:abc"
assert results3["spotify:track:abc"][0].uri == "spotify:track:abc"


def test_lookup_v4_compatible(provider):
# TODO: Remove this once we release the major version
provider.lookup("foo")
assert mopidy.__version__.startswith("4.0.0a")