def _get_xmp(self, fullpath): ############################### # get XMP infos # ############################### tags = {} try: xmpclass = XMP_Tags() tags = xmpclass.get_xmp(os.path.dirname(fullpath), os.path.basename(fullpath)) except Exception, msg: common.log("VFSScanner._get_xmp", 'Error reading XMP tags for "%s"'%(fullpath), xbmc.LOGERROR) common.log("VFSScanner._get_xmp", "%s - %s"%(Exception,msg), xbmc.LOGERROR )
def _get_xmp(self, fullpath): ############################### # get XMP infos # ############################### xmpclass = XMP_Tags() tags = xmpclass.get_xmp(os.path.dirname(fullpath), os.path.basename(fullpath)) for tagname in tags: if tagname == 'Iptc4xmpExt:PersonInImage': key = 'persons' if tags.has_key(key): tags[key] += '||' + tags[tagname] else: tags[key] = tags[tagname] if tags.has_key('Iptc4xmpExt:PersonInImage'): del(tags['Iptc4xmpExt:PersonInImage']) return tags