Add-on Help / Advice / Input

I have been looking into building an Add-on for Kodi and after reading over the links from the Wiki I managed to fumble my way though and get something that is most working. I am trying to polish it up now and get a better understand for some of the options. I am hoping that a wise someone here can either explain or point me towards some reading material to help me on my way.

What role does setting the content type play? I tried running though a couple of the different types and it didn’t seem like the display changed any.

Code:
xbmcplugin.setContent(PLUGIN_HANDLE, "episodes")

What does setting the category do?

Code:
xbmcplugin.setPluginCategory(PLUGIN_HANDLE, "Foo Category")

Is there a way to keep session state in the add-on with out persisting to disk or some other form of persistent storage? When I was working on my Roku add-on while the app was active you could hold state for the session in a global. When you exited the add-on that state would be lost and recreated when it was next launched.

Is there a way to set the second sub title of the page as shown below?

watch gallery

Is there a way on error to abort further execution of the plugin? Take the following example (pseudo code) below:

Code:
def display_menu():
    api_data = api.fetch(...)

    if api_data["error"]:
        show dialog(...)
        stop further execution leaving current UI as it

    ...

Is there a guide / documentation that states how the different artwork is used when displaying (thumb vs poster vs icon vs ect.)?

Can you set a default fanart that is always present unless override by a MenuItem so the add-on has a constant background? I noticed that when I used a mouse and mouseout or selected the “..” option the background would revert to the theme’s default.

Is there a way to hide the right side icon if it doesn’t make sense to have something there?

watch gallery

If one wanted to implement a Rendezvous style registration:

Code:
The register example demonstrates how to do rendezvous style
registration.  Rendezvous registration presents the user with
a code (like Netflix, Amazon, etc.) and the user goes to the
providers web site to establish a link between the user account
and the box by using a short link code.

Is there some existing flow to support this or would one need to write some form of looping code to display the code, loop until the user registers, and then continue. I trying doing something along these lines using the ProgressDialog but didn’t have much success.

Thanks again in advance for any and all help.