Skip to content

Commit

Permalink
Temporary hack for Mopidy v4 installations
Browse files Browse the repository at this point in the history
  • Loading branch information
kingosticks committed Apr 29, 2024
1 parent d432ba4 commit fa16246
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
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
Expand Up @@ -2,6 +2,7 @@
from unittest import mock

import pytest
import mopidy
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")

0 comments on commit fa16246

Please sign in to comment.