Plugin UI Capabilities

I’m trying to write a plugin that does more than just play media and wondering what the UI capabilities of plex are. I’ve looked over the API documentation and think that they might be out of date since the release of Plex 9? Some of the things I would like to do are as follows:

[list]

[]Capture more input from the user than just text, e.g. ask them to rate the movie, or get them to select a preference from a list of items (like a combo box?)

[
]Read a review of a film, so displaying a lot of text (what is the best element to use?)

From a single DirectoryItem, can you place separators between elements. This would allow to display two separate lists in one, with different headings.

[/list]



Any thoughts?


I'm still pretty new to the plugin development game but, I'll offer my thoughts.

You could populate a PopupDirectoryItem with the options you want the user to choose from. Then the selection can be passed to whatever function handles the input.

The first thing that jumps to mind is the 'summary' field using the InfoList viewgroup. It's great for lengthy plot summaries, and scrolls automatically when necessary.

I'm not quite sure what you have in mind here but, I'll try to answer based on what I think you're asking. If I wanted to create separate lists within a single directory, I might add a signifier to the beginning of the title for each item in the list, such as '*'. Each header would stand out because it wouldn't have the '*'. I might even separate the lists using an item with a blank title "". So the code might look like this...

<br />
dir = MediaContainer()<br />
<br />
dir.Append(Function(DirectoryItem(NoAction, title='Header1')))<br />
dir.Append(Function(DirectoryItem(SomeFunction1, title='* List Item 1')))<br />
dir.Append(Function(DirectoryItem(SomeFunction2, title='* List Item 2')))<br />
dir.Append(Function(DirectoryItem(NoAction, title=" ")))<br />
dir.Append(Function(DirectoryItem(NoAction, title='Header2')))<br />
dir.Append(Function(DirectoryItem(SomeFunction1, title='* 2nd List Item 1')))<br />
dir.Append(Function(DirectoryItem(SomeFunction2, title='* 2nd List Item 2')))<br />
<br />
return dir<br />





I hope that makes sense. If I've completely missed the point of your queries, feel free to ignore this response as the ramblings of a mad man :)

Rate movie: Maybe [SetRating() in the Plex plug-in docs](http://dev.plexapp.com/docs/Functions.html) can help.

Thanks for the help

[list]

[]The use of the PopupDirectoryItem works like a dream. A nice simple way for the user to make a selection between a number of items.

[
]I decided to use the InfoLabel property of the DirectoryItem to display the different heading names, e.g. FILM NAME (DVD), FILM NAME (Blu Ray)

[]I’m still to try and sort out the ‘Reviews’ section but will definitely give the summary field of InfoList viewgroup. Unfortunately, i’m using the LoveFilm public API and it’s simply returning me no reviews. Not very helpful! Might need to contact them…

[
]Has anyone used the SetRating functionality before? I’d ideally like to have a DirectoryItem which pop something up for the user to rate the movie. I’m tempted to just put in a PopupDirectoryItem with selections from 0 - 10.

[/list]



Netflix uses it, FYI

I had a look over the code again and as I remembered, it’s actually commented out. I can’t play with the plugin since it’s restricted to North America but i’m guessing the UI doesn’t support this. I’ll implement something simple for now and the initial release and can explore other possibilities in the future.

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