rivy/xbmc-script.audio.pandora — pull request #9 by robweber (2014-02-24 18:35:58+00:00)
Title: Multiple accounts

This should add some basic support for more than one Pandora account within the addon. Useful for households with more than one person where you might want to switch to someone else's station. Here is a brief breakdown of the code:

1) Refactored the settings.xml to allow for up the 3 accounts, and broke the addon configuration and the account setup into categories to make them easier to understand. The first account must be configured to allow the addon to login.

2) Added a context menu entry when in the main screen, only option now is to switch accounts. This is triggered off the context menu action from the XBMC main actions list. I did it this way so that in the future additional context menu action items could be easily added if desired.

3) Added functions for actually switching the account. This includes some variables for storing the last played account, especially useful if you only configure one so you never see the account switch screen. Also added a restart variable as this was the easiest way to reset the Pandora login and gui without a major code rewrite.

There are probably a lot of items that could be done better but this is a functional proof of concept for the testing I've done. It also opens the door to more updates in the future with the context menu addition. Specifically I was thinking of adding/removing stations if the Pandora API allows for this.

Let me know if you want anything changed. I think this could be a useful addition.