Prior99 / mopidy-subidy

Mopidy extension for playing music from Subsonic servers.
BSD 3-Clause "New" or "Revised" License
30 stars 12 forks source link

Some web clients cannot access artist page #18

Open michaelcadilhac opened 7 years ago

michaelcadilhac commented 7 years ago

musicbox 2.3.0 and moped 0.7.0 cannot access an artist page when it is selected through search. The quite uninformative error message is:

  File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 19, in _backend_error_handling
    yield
  File "/usr/lib/python2.7/site-packages/mopidy/core/library.py", line 236, in lookup
    result = future.get()
  File "/usr/lib/python2.7/site-packages/pykka/future.py", line 299, in get
    exec('raise exc_info[0], exc_info[1], exc_info[2]')
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 200, in _actor_loop
    response = self._handle_receive(message)
  File "/usr/lib/python2.7/site-packages/pykka/actor.py", line 294, in _handle_receive
    return callee(*message['args'], **message['kwargs'])
  File "/home/micha/src/mopidy-subidy/mopidy_subidy/library.py", line 117, in lookup
    return self.lookup_one(uri)
  File "/home/micha/src/mopidy-subidy/mopidy_subidy/library.py", line 103, in lookup_one
    return self.lookup_artist(uri.get_artist_id(lookup_uri))
  File "/home/micha/src/mopidy-subidy/mopidy_subidy/library.py", line 69, in lookup_artist
    return list(self.subsonic_api.get_artist_as_songs_as_tracks_iter(artist_id))
  File "/home/micha/src/mopidy-subidy/mopidy_subidy/subsonic_api.py", line 294, in get_artist_as_songs_as_tracks_iter
    albums = self.get_raw_albums(artist_id)
  File "/home/micha/src/mopidy-subidy/mopidy_subidy/subsonic_api.py", line 213, in get_raw_albums
    response = self.connection.getArtist(artist_id)
  File "build/bdist.linux-armv7l/egg/libsonic/connection.py", line 1669, in getArtist
    self._checkStatus(res)
  File "build/bdist.linux-armv7l/egg/libsonic/connection.py", line 2692, in _checkStatus
    raise exc(result['error']['message'])
DataNotFoundError: Artist not found.

Surprisingly, iris 3.2.0 works well, but seems to query a different artist ID.

Against mopidy-subidy git version.

Prior99 commented 7 years ago

Does this also happen if the artist you are looking for exists?

Prior99 commented 7 years ago

Apart from that I can not see any content on the artists page when entering via search in "Moped" I do not receive any error. It just shows me the LastFM description. (Which is undesireable enough)

How did you start and execute mopidy? Reproducing the error would help me very much.

Prior99 commented 7 years ago

I just tried this with iris myself and it took like 3 seconds and then the artist was loaded, at least when coming in via the "Browse" page.

michaelcadilhac commented 7 years ago

Iris does work, the others do not. It may well be that the bug is on their side, we'll have to sort that out.

In all interfaces, I'm searching for an actual, existing artist in my database.

The error is issued by the mopidy process, Moped itself does not display any error. The exception thrown by Subidy is in fact caught in get_raw_albums, and only the message "Connecting to subsonic failed when loading list of albums." is displayed.