Skip to content

Commit

Permalink
Merge pull request #387 from kingosticks/temp-compatible-hack
Browse files Browse the repository at this point in the history
Temporary hack for Mopidy v4 installations
  • Loading branch information
kingosticks authored Apr 29, 2024
2 parents d432ba4 + 7f8dac0 commit 4fa9cb8
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
@@ -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")

0 comments on commit 4fa9cb8

Please sign in to comment.