Do you need this to be blocking/synchronous? I know this is hatstand's code and not yours, but maybe clementine had a different requirement. Remember that any blocking call in JS in our resolvers will block the main UI thread because QtWebkit is run on the main thread.

Any net requests (especially slow ones like this!) have the potential to lock up the UI so should be async :)