| |
- addDirectoryItem(...)
- addDirectoryItem(handle, url, listitem [,isFolder, totalItems]) -- Callback function to pass directory contents back to XBMC.
- Returns a bool for successful completion.
handle : Integer - handle the plugin was started with.
url : string - url of the entry. would be plugin:// for another virtual directory
listitem : ListItem - item to add.
isFolder : [opt] bool - True=folder / False=not a folder(default).
totalItems : [opt] Integer - Total number of items that will be passed.(used for progressbar)
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- if not xbmcplugin.addDirectoryItem(int(sys.argv[1]), 'F:\\Trailers\\300.mov', listitem, totalItems=50): break
- addSortMethod(...)
- addSortMethod(handle, sortMethod) -- Adds a sorting method for the media list.
handle : Integer - handle the plugin was started with.
sortMethod : Integer - Number for sortmethod see FileItem.h.
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- xbmcplugin.addSortMethod(int(sys.argv[1]), xbmcplugin.SORT_METHOD_TITLE)
- endOfDirectory(...)
- endOfDirectory(handle[, succeeded, updateListing]) -- Callback function to tell XBMC that the end of the directory listing in a virtualPythonFolder module is reached.
handle : Integer - handle the plugin was started with.
succeeded : [opt] bool - True=script completed successfully(Default)/False=Script did not.
updateListing : [opt] bool - True=this folder should update the current listing/False=Folder is a subfolder(Default).
*Note, You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
example:
- xbmcplugin.endOfDirectory(int(sys.argv[1]))
- getSetting(...)
- getSetting(id) -- Returns the value of a setting as a string.
id : string - id of the setting that the module needs to access.
*Note, You can use the above as a keyword.
example:
- apikey = xbmcplugin.getSetting('apikey')
- setContent(...)
- setContent(handle, content) -- Sets the plugins content.
handle : Integer - handle the plugin was started with.
content : string - content type (eg. movies)
*Note, You can use the above as keywords for arguments.
content: files, songs, artists, albums, movies, tvshows, episodes, musicvideos
example:
- xbmcplugin.setContent(int(sys.argv[1]), 'movies')
|