Container & Object Types (Legacy API)
These are available for older-style plugins. Modern plugins should use the types in Container & Object Types (Modern API).
MediaContainer
MediaContainer(art=None, viewGroup=None, title1=None, title2=None, noHistory=False, replaceParent=False, disabledViewModes=None, **kwargs)
Legacy XML container.
Append(obj)
Adds a child object.
Count(x) → int
Counts occurrences.
Index(x) → int
Returns index of item.
Extend(x)
Extends with a list.
Insert(i, x)
Inserts at index.
Pop(i) → item
Removes and returns item at index.
Remove(x)
Removes first occurrence.
Reverse()
Reverses in place.
Sort(attr, descending=False)
Sorts by attribute.
Clear()
Removes all items.
DirectoryItem
DirectoryItem(key, title, subtitle=None, summary=None, thumb=None, art=None)
Navigable directory.
PopupDirectoryItem
PopupDirectoryItem(key, title, subtitle=None, summary=None, thumb=None, art=None)
Popup directory.
InputDirectoryItem
InputDirectoryItem(key, title, prompt, subtitle=None, summary=None, thumb=None, art=None)
Input / search directory.
VideoItem
VideoItem(key=None, title=None, subtitle=None, summary=None, duration=None, thumb=None, art=None, items=[])
Video item.
WebVideoItem
WebVideoItem(url, title=None, subtitle=None, summary=None, duration=None, thumb=None)
Web video item (WebKit playback).
RTMPVideoItem
RTMPVideoItem(url, clip=None, clips=None, width=None, height=None, live=False, title=None, subtitle=None, summary=None, duration=None, thumb=None)
RTMP video item.
PhotoItem
PhotoItem(key, title, subtitle=None, summary=None, thumb=None)
Photo item.
TrackItem
TrackItem(key, title, artist=None, album=None, index=None, rating=None, duration=None, size=None)
Audio track item.
PrefsItem
PrefsItem(title=None, subtitle=None, thumb=None)
Preferences link.
Function
Function(obj, ext=None, **kwargs)
Wraps an object so its key attribute calls a function with the provided arguments.
IndirectFunction
IndirectFunction(obj, ext=None, **kwargs)
Same as Function but marks the response as indirect.
MessageContainer
MessageContainer(header, message, title1=None, title2=None)
Displays a simple message to the user.
Redirect
Redirect(url, temporary=True)
Returns an HTTP redirect response.
Parameter |
Type |
Description |
|---|---|---|
url |
str |
The URL to redirect to. |
temporary |
bool |
If True, uses HTTP 302; if False, uses HTTP 301. |
DataObject
DataObject(data, contentType)
Returns raw binary data with a specified MIME type.
Parameter |
Type |
Description |
|---|---|---|
data |
str |
The binary data. |
contentType |
str |
MIME type (e.g. |