HermesApp / Hermes

Compact macOS Pandora client that doesn’t use Flash
http://hermesapp.org/
MIT License
381 stars 99 forks source link

Fix user.canSubscribe method code 1000, "An unexpected error occurred… #298

Closed yerke closed 7 years ago

yerke commented 7 years ago

…" error

Several users (including myself) experience an issue where Pandora API user.canSubscribe method throws error with code 1000 and message "An unexpected error occurred". user.canSubscribe method is called in checkSubscriberStatus function, the sole purpose of which is to determine whether the user is a subscriber.

It is possible to get the same information just by passing additional parameter returnIsSubscriber: true in auth.userLogin, which is called before checkSubscriberStatus anyway.

I have removed checkSubscriberStatus function (which was called in 1 place only) and replaced the functionality of getting subscriber status by passing additional parameter returnIsSubscriber: true in auth.userLogin.

Tested with both free and paid accounts.

Please let me know if you need me to do anything else.

This is my first pull request, so I am sorry if I missed anything.

nriley commented 7 years ago

Thanks! Will try to get to it this weekend.

nriley commented 7 years ago

I've made a beta release; let me know if it still works :-)

yerke commented 7 years ago

Works fine. Thanks