diff options
-rw-r--r-- | addons/xbmc.python/addon.xml | 2 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/ListItem.cpp | 16 | ||||
-rw-r--r-- | xbmc/interfaces/legacy/ListItem.h | 12 | ||||
-rw-r--r-- | xbmc/interfaces/python/PythonSwig.cpp.template | 2 | ||||
-rw-r--r-- | xbmc/interfaces/swig/AddonModuleXbmcgui.i | 2 |
5 files changed, 32 insertions, 2 deletions
diff --git a/addons/xbmc.python/addon.xml b/addons/xbmc.python/addon.xml index b5530fe74c..0bd7128eac 100644 --- a/addons/xbmc.python/addon.xml +++ b/addons/xbmc.python/addon.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<addon id="xbmc.python" version="2.19.0" provider-name="Team-Kodi"> +<addon id="xbmc.python" version="2.20.0" provider-name="Team-Kodi"> <backwards-compatibility abi="2.1.0"/> <requires> <import addon="xbmc.core" version="0.1.0"/> diff --git a/xbmc/interfaces/legacy/ListItem.cpp b/xbmc/interfaces/legacy/ListItem.cpp index 30ebe9158c..97385d43b8 100644 --- a/xbmc/interfaces/legacy/ListItem.cpp +++ b/xbmc/interfaces/legacy/ListItem.cpp @@ -622,5 +622,21 @@ namespace XBMCAddon item->SetProperty(property, *it); } } + + xbmc::InfoTagVideo* ListItem::getVideoInfoTag() + { + LOCKGUI; + if (item->HasVideoInfoTag()) + return new xbmc::InfoTagVideo(*item->GetVideoInfoTag()); + return new xbmc::InfoTagVideo(); + } + + xbmc::InfoTagMusic* ListItem::getMusicInfoTag() + { + LOCKGUI; + if (item->HasMusicInfoTag()) + return new xbmc::InfoTagMusic(*item->GetMusicInfoTag()); + return new xbmc::InfoTagMusic(); + } } } diff --git a/xbmc/interfaces/legacy/ListItem.h b/xbmc/interfaces/legacy/ListItem.h index 0d59172084..804ee14c18 100644 --- a/xbmc/interfaces/legacy/ListItem.h +++ b/xbmc/interfaces/legacy/ListItem.h @@ -36,6 +36,8 @@ #include "AddonString.h" #include "Tuple.h" #include "commons/Exception.h" +#include "InfoTagVideo.h" +#include "InfoTagMusic.h" namespace XBMCAddon @@ -369,6 +371,16 @@ namespace XBMCAddon * getfilename() -- Returns the filename of this PlayListItem.\n */ String getfilename(); + + /** + * getVideoInfoTag() -- returns the VideoInfoTag for this item. + */ + xbmc::InfoTagVideo* getVideoInfoTag(); + + /** + * getMusicInfoTag() -- returns the MusicInfoTag for this item. + */ + xbmc::InfoTagMusic* getMusicInfoTag(); }; typedef std::vector<ListItem*> ListItemList; diff --git a/xbmc/interfaces/python/PythonSwig.cpp.template b/xbmc/interfaces/python/PythonSwig.cpp.template index 891e96d003..7b77dc2adc 100644 --- a/xbmc/interfaces/python/PythonSwig.cpp.template +++ b/xbmc/interfaces/python/PythonSwig.cpp.template @@ -939,7 +939,7 @@ namespace PythonBindings // constants PyModule_AddStringConstant(module, (char*)"__author__", (char*)"Team XBMC <http://xbmc.org>"); PyModule_AddStringConstant(module, (char*)"__date__", (char*)"${new Date().toString()}"); - PyModule_AddStringConstant(module, (char*)"__version__", (char*)"2.19.0"); + PyModule_AddStringConstant(module, (char*)"__version__", (char*)"2.20.0"); PyModule_AddStringConstant(module, (char*)"__credits__", (char*)"Team XBMC"); PyModule_AddStringConstant(module, (char*)"__platform__", (char*)"ALL"); diff --git a/xbmc/interfaces/swig/AddonModuleXbmcgui.i b/xbmc/interfaces/swig/AddonModuleXbmcgui.i index 1a6f91d9e6..144a9844bb 100644 --- a/xbmc/interfaces/swig/AddonModuleXbmcgui.i +++ b/xbmc/interfaces/swig/AddonModuleXbmcgui.i @@ -43,6 +43,8 @@ using namespace xbmcgui; // not part of what swig parses. %feature("knownbasetypes") XBMCAddon::xbmcgui "AddonClass,AddonCallback" +%feature("knownapitypes") XBMCAddon::xbmcgui "XBMCAddon::xbmc::InfoTagVideo,xbmc::InfoTagMusic" + %include "interfaces/legacy/swighelper.h" %include "interfaces/legacy/AddonString.h" |