Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
InfoTagPicture

Kodi's picture info tag class. More...

Classes

class  XBMCAddon::xbmc::InfoTagPicture
 

Functions

 XBMCAddon::xbmc::InfoTagPicture::InfoTagPicture (const CPictureInfoTag *tag)
 
 XBMCAddon::xbmc::InfoTagPicture::InfoTagPicture (CPictureInfoTag *tag, bool offscreen=false)
 
 XBMCAddon::xbmc::InfoTagPicture::InfoTagPicture (...)
 

Function: xbmc.InfoTagPicture([offscreen])


Create a picture info tag.
 
 XBMCAddon::xbmc::InfoTagPicture::~InfoTagPicture () override
 
 XBMCAddon::xbmc::InfoTagPicture::getResolution ()
 

Function: getResolution()


Get the resolution of the picture in the format "w x h".
 
 XBMCAddon::xbmc::InfoTagPicture::getDirector ()
 

Function: getDateTimeTaken()


Get the date and time at which the picture was taken in W3C format.
 
 XBMCAddon::xbmc::InfoTagPicture::setResolution (...)
 

Function: setResolution(width, height)


Sets the resolution of the picture.
 
 XBMCAddon::xbmc::InfoTagPicture::setDateTimeTaken (...)
 

Function: setDateTimeTaken(datetimetaken)


Sets the date and time at which the picture was taken in W3C format. The following formats are supported:
 
static void XBMCAddon::xbmc::InfoTagPicture::setResolutionRaw (CPictureInfoTag *infoTag, const String &resolution)
 
static void XBMCAddon::xbmc::InfoTagPicture::setResolutionRaw (CPictureInfoTag *infoTag, int width, int height)
 
static void XBMCAddon::xbmc::InfoTagPicture::setDateTimeTakenRaw (CPictureInfoTag *infoTag, String datetimetaken)
 

Detailed Description

Kodi's picture info tag class.

Class: InfoTagPicture()

Access and / or modify the picture metadata of a ListItem.


v20 Python API changes
New class added.

Example:

...
tag = item.getPictureInfoTag()
datetime_taken = tag.getDateTimeTaken()
tag.setResolution(1920, 1080)
...

Function Documentation

◆ getDirector()

XBMCAddon::xbmc::InfoTagPicture::getDirector ( )

Function: getDateTimeTaken()


Get the date and time at which the picture was taken in W3C format.

Returns
[string] Date and time at which the picture was taken in W3C format.

v20 Python API changes
New function added.

◆ getResolution()

String XBMCAddon::xbmc::InfoTagPicture::getResolution ( )

Function: getResolution()


Get the resolution of the picture in the format "w x h".

Returns
[string] Resolution of the picture in the format "w x h".

v20 Python API changes
New function added.

◆ InfoTagPicture() [1/3]

XBMCAddon::xbmc::InfoTagPicture::InfoTagPicture ( ...)

Function: xbmc.InfoTagPicture([offscreen])


Create a picture info tag.

Parameters
offscreen[opt] bool (default False) - if GUI based locks should be avoided. Most of the times listitems are created offscreen and added later to a container for display (e.g. plugins) or they are not even displayed (e.g. python scrapers). In such cases, there is no need to lock the GUI when creating the items (increasing your addon performance). Note however, that if you are creating listitems and managing the container itself (e.g using WindowXML or WindowXMLDialog classes) subsquent modifications to the item will require locking. Thus, in such cases, use the default value (False).

v20 Python API changes
New function added.

Example:

...
pictureinfo = xbmc.InfoTagPicture(offscreen=False)
...

◆ InfoTagPicture() [2/3]

XBMCAddon::xbmc::InfoTagPicture::InfoTagPicture ( const CPictureInfoTag * tag)
explicit

◆ InfoTagPicture() [3/3]

XBMCAddon::xbmc::InfoTagPicture::InfoTagPicture ( CPictureInfoTag * tag,
bool offscreen = false )
explicit

◆ setDateTimeTaken()

void XBMCAddon::xbmc::InfoTagPicture::setDateTimeTaken ( ...)

Function: setDateTimeTaken(datetimetaken)


Sets the date and time at which the picture was taken in W3C format. The following formats are supported:

  • YYYY
  • YYYY-MM-DD
  • YYYY-MM-DDThh:mm[TZD]
  • YYYY-MM-DDThh:mm:ss[TZD] where the timezone (TZD) is always optional and can be in one of the following formats:
  • Z (for UTC)
  • +hh:mm
  • -hh:mm
Parameters
datetimetakenstring - Date and time at which the picture was taken in W3C format.

v20 Python API changes
New function added.

◆ setDateTimeTakenRaw()

void XBMCAddon::xbmc::InfoTagPicture::setDateTimeTakenRaw ( CPictureInfoTag * infoTag,
String datetimetaken )
static

◆ setResolution()

void XBMCAddon::xbmc::InfoTagPicture::setResolution ( ...)

Function: setResolution(width, height)


Sets the resolution of the picture.

Parameters
widthint - Width of the picture in pixels.
heightint - Height of the picture in pixels.

v20 Python API changes
New function added.

◆ setResolutionRaw() [1/2]

void XBMCAddon::xbmc::InfoTagPicture::setResolutionRaw ( CPictureInfoTag * infoTag,
const String & resolution )
static

◆ setResolutionRaw() [2/2]

void XBMCAddon::xbmc::InfoTagPicture::setResolutionRaw ( CPictureInfoTag * infoTag,
int width,
int height )
static

◆ ~InfoTagPicture()

XBMCAddon::xbmc::InfoTagPicture::~InfoTagPicture ( )
override