xbmcplugin (version 1.0, 20 August 2007)
index
(built-in)

 
Functions
       
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
addDirectoryItems(...)
addDirectoryItems(handle, items [,totalItems]) -- Callback function to pass directory contents back to XBMC as a list.
 - Returns a bool for successful completion.
 
handle      : integer - handle the plugin was started with.
items       : List - list of (url, listitem[, isFolder]) as a tuple to add.
totalItems  : [opt] integer - total number of items that will be passed.(used for progressbar)
 
*Note, You can use the above as keywords for arguments.
 
       Large lists benefit over using the standard addDirectoryItem()
       You may call this more than once to add items in chunks
 
example:
  - if not xbmcplugin.addDirectoryItems(int(sys.argv[1]), [(url, listitem, False,)]: raise
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, cacheToDisc]) -- 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).
cacheToDisc      : [opt] bool - True=Folder will cache if extended time(default)/False=this folder will never cache to disc.
 
*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]), cacheToDisc=False)
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')
openSettings(...)
openSettings(url[, reload]) -- Opens this plugins settings.
 
url         : string or unicode - url of plugin. (plugin://pictures/picasa/)
reload      : [opt] bool - reload language strings and settings (default=True)
 
*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.
       reload is only necessary if calling openSettings() from the plugin.
 
example:
  - xbmcplugin.openSettings(url=sys.argv[0])
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')
setPluginCategory(...)
setPluginCategory(handle, category) -- Sets the plugins name for skins to display.
 
handle      : integer - handle the plugin was started with.
category    : string or unicode - plugins sub category.
 
*Note, You can use the above as keywords for arguments.
 
example:
  - xbmcplugin.setPluginCategory(int(sys.argv[1]), 'Comedy')
setPluginFanart(...)
setPluginFanart(handle, image, color1, color2, color3) -- Sets the plugins fanart and color for skins to display.
 
handle      : integer - handle the plugin was started with.
image       : [opt] string - path to fanart image.
color1      : [opt] hexstring - color1. (e.g. '0xFFFFFFFF')
color2      : [opt] hexstring - color2. (e.g. '0xFFFF3300')
color3      : [opt] hexstring - color3. (e.g. '0xFF000000')
 
*Note, You can use the above as keywords for arguments.
 
example:
  - xbmcplugin.setPluginFanart(int(sys.argv[1]), 'special://home/plugins/video/Apple movie trailers II/fanart.png', color2='0xFFFF3300')
setProperty(...)
setProperty(handle, key, value) -- Sets a container property for this plugin.
 
handle      : integer - handle the plugin was started with.
key         : string - property name.
value       : string or unicode - value of property.
 
*Note, Key is NOT case sensitive.
       You can use the above as keywords for arguments.
 
example:
  - xbmcplugin.setProperty(int(sys.argv[1]), 'Emulator', 'M.A.M.E.')
setResolvedUrl(...)
setResolvedUrl(handle, succeeded, listitem) -- Callback function to tell XBMC that the file plugin has been resolved to a url
 
handle           : integer - handle the plugin was started with.
succeeded        : bool - True=script completed successfully/False=Script did not.
listitem         : ListItem - item the file plugin resolved to for playback.
 
*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.setResolvedUrl(int(sys.argv[1]), True, listitem)
setSetting(...)
setSetting(id, value) -- Sets a plugin setting for the current running plugin.
 
id        : string - id of the setting that the module needs to access.
value     : string or unicode - value of the setting.
 
*Note, You can use the above as keywords for arguments.
 
example:
  - xbmcplugin.setSetting(id='username', value='teamxbmc')

 
Data
        SORT_METHOD_ALBUM = 13
SORT_METHOD_ALBUM_IGNORE_THE = 14
SORT_METHOD_ARTIST = 11
SORT_METHOD_ARTIST_IGNORE_THE = 12
SORT_METHOD_DATE = 3
SORT_METHOD_DRIVE_TYPE = 6
SORT_METHOD_DURATION = 8
SORT_METHOD_EPISODE = 20
SORT_METHOD_FILE = 5
SORT_METHOD_GENRE = 15
SORT_METHOD_LABEL = 1
SORT_METHOD_LABEL_IGNORE_THE = 2
SORT_METHOD_MPAA_RATING = 24
SORT_METHOD_NONE = 0
SORT_METHOD_PLAYLIST_ORDER = 19
SORT_METHOD_PRODUCTIONCODE = 22
SORT_METHOD_PROGRAM_COUNT = 18
SORT_METHOD_SIZE = 4
SORT_METHOD_SONG_RATING = 23
SORT_METHOD_STUDIO = 26
SORT_METHOD_STUDIO_IGNORE_THE = 27
SORT_METHOD_TITLE = 9
SORT_METHOD_TITLE_IGNORE_THE = 10
SORT_METHOD_TRACKNUM = 7
SORT_METHOD_UNSORTED = 29
SORT_METHOD_VIDEO_RATING = 17
SORT_METHOD_VIDEO_RUNTIME = 25
SORT_METHOD_VIDEO_TITLE = 21
SORT_METHOD_VIDEO_YEAR = 16
__author__ = 'J. Mulder <darkie@xbmc.org>'
__credits__ = 'XBMC TEAM.'
__date__ = '20 August 2007'
__platform__ = 'XBOX'
__version__ = '1.0'

 
Author
        J. Mulder <darkie@xbmc.org>

 
Credits
        XBMC TEAM.