Input dialogs

Confirmation (Yes, No) dialogs
Hello forum,

I am still very new to both Plex and Plex plugin development (and to Python as well!). But over the week-end I managed to implement a basic OAuth2.0 authentication for the Instagram service by simply sending HTTP GET/POST requests, using "implicit authentication". That means to "client secret" is necessary either, but the user has to "confirm" that the application accesses her account. It was a bit tricky and I did not manage it with the HTTP package, I had to use the urllib2 and ignore any redirection 30x HTTP messages - but more about this another time.

Anyway, the point is that I managed to do the OAuth 2.0 authorisation without actually displaying the (Instagram) login web page in a browser or have the user manually enter the OAuth token into my Plex plugin (e.g. the Token gathered from some other web site authentication mechanism, such as the "Facebook" plugin seems to require). All I need is the username and password stored in the Plex preferences.

However I would like to display a message informing the user about the consequences (and how to revoke the access to my plugin, if needed) and like her to confirm the login/authorisation process.

In other words: **A Yes/No confirmation dialog box is needed.**

But I did not find anything in the plugin development docs, and the only useful reference here in the forum seems to be:

http://forums.plexapp.com/index.php/topic/7089-input-dialogs/page__view__findpost__p__43756

There it is mentioned that "confirmation dialog boxes" are planned - so are they merely not documented yet (the last post is from June 2009)?


Anyone knows? Oh and by the way, I think the above post mentioned that there are at least "Message dialog boxes" (with just an OK button), but I did not even find anything about them either: http://dev.plexapp.com/docs/api/objectkit.html#generic-browsing-objects - is that the place to look for dialog messages?

Cheers, Oliver


Uh... anyone? Not even a "It's not possible"?

So the only way to display a user message seems to be passing the arguments 'header' and 'message' to the ObjectContainer object. I haven't tried it yet, but I guess the only option available for the user would be to simply confirm ("OK") that message.

But since no one replied to this question and the docs don't mention any other forms of "Confirmation" ("OK, Cancel") dialogs I take it it is not possible.

So my workaround will most likely be some sort of "Confirm" and "Go back" menu entry instead, and a dedicated new "login page" instead of just a single dialog.


With regards to "Go back": Is there a way to actually go back the "Navigation path" with a function like the JavaScript "history.back()" when the user selects a menu entry? Browsing through the docs by searching for "back" did not reveal any such funtion...


Thanks, Oliver

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.