Disabling view modes

Does anyone know the string associated with all the view modes? I want to disable specific view modes which are not appropriate within my plugin; specifically, the media preview. I’ve seen the following code:



<br />
    dir = MediaContainer(disabledViewModes=["Coverflow"], title1 = Locale.LocalString('Title'))<br />




but what's the different specific names for the modes that can be disabled?

http://dev.plexapp.com/docs/mod_Plugin.html

I’ve tried some stuff using the link provided but still not got anything working. I thought that I could do the following:



<br />
def Start():<br />
    Plugin.AddViewGroup("Basic", viewMode = "InfoList", mediaType = "items")<br />
    Plugin.AddViewGroup("Basic", viewMode = "List", mediaType = "items")<br />
    ...<br />
<br />
<br />
def Other():<br />
    dir = MediaContainer(<br />
        viewGroup = "Basic",<br />
        title1 = Locale.LocalString('DetailsTitle'),<br />
        title2 = t['title'])<br />
    ...<br />
    return dir<br />




I was hoping that the MediaContainer used by Other, would only allow the user to view it in InfoList and List mode. However, it's still possible to view it in all modes. Any ideas?

I tried this:


dir = MediaContainer(viewGroup="List", disabledViewModes=["Coverflow", "InfoList"])



Strangely, Coverflow and InfoList were still options, but when you select them, nothing happens.
not optimal, but...

Yeah, it seems that if the user selects a view mode which is “disabled”, Plex will just revert to a List view mode. Not ideal.

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