(Solved) Mopidy-soundcloud not working for utf-8 queries

The soundcloud backend seems not to like Björk. :wink:
When searching for artist Björk on the soundcloud backend no results are returned. (there are tracks when searched on the soundcloud web page).
What makes this so irritable is the fact that in a client like rompr, when the soundcloud backend is checked or the specific backend option is unchecked the other backends return no results either.
This means that when the soundcloud backend is activated no search containing utf-8 characters is possible.

Also tested this with Dälek, Motörhead and Amon Düül in rompr.
Please let me know when you need more information.

There is already an open issue, that i think is related.
https://github.com/mopidy/mopidy-soundcloud/issues/42

Sorry for crossposting this, but the issue list seems to see not much attention since august.
Anyway i came up with this this little patch that fixes the issue for me.

--- mopidy_soundcloud/library.py.org    2014-12-30 08:14:25.996540248 +0100
+++ mopidy_soundcloud/library.py        2014-12-30 11:28:10.330904494 +0100
@@ -170,11 +170,11 @@
                     tracks=self.backend.remote.resolve_url(search_query)
                 )
         else:
-            search_query = ' '.join(query.values()[0])
+            search_query = ' '.join([' '.join(value) for value in query.values()])
             logger.info('Searching SoundCloud for \'%s\'', search_query)
             return SearchResult(
                 uri='soundcloud:search',
-                tracks=self.backend.remote.search(search_query)
+                tracks=self.backend.remote.search(search_query.encode('utf8'))
             )

     def lookup(self, uri):

This also takes care of usecases where more than one search key is queried.

query = {u'artist': [u'Bj\xf6rk'],u'title': [u'Vespertine']}

works now as expected.

HTH