def Start(): # # make this plugin show up in the 'Video' section # # in Plex. The L() function pulls the string out of the strings # # file in the Contents/Strings/ folder in the bundle # # see also: # # http://dev.plexapp.com/docs/mod_Plugin.html # # http://dev.plexapp.com/docs/Bundle.html#the-strings-directory Plugin.AddPrefixHandler(VIDEO_PREFIX, MainMenu, NAME, ICON, ART) Plugin.AddViewGroup("InfoList", viewMode="InfoList", mediaType="items") Plugin.AddViewGroup("List", viewMode="List", mediaType="items") # # set some defaults so that you don't have to # # pass these parameters to these object types # # every single time # # see also: # # http://dev.plexapp.com/docs/Objects.html MediaContainer.title1 = NAME MediaContainer.viewGroup = "List" MediaContainer.art = Resource.Load(ART) DirectoryItem.thumb = Resource.Load(ICON) VideoItem.thumb = Resource.Load(ICON) HTTP.CacheTime = CACHE_1HOUR check_login_token()
def pms_fwk_handler_wrapper(f): Plugin.AddPrefixHandler(prefix, f, L(name), thumb, art) return f