Fixed photo paths
svn: r311
This commit is contained in:
parent
da4c3c2612
commit
82f8074e7d
@ -379,8 +379,10 @@ def exportData(database, filename, callback):
|
|||||||
|
|
||||||
for photo in family.getPhotoList():
|
for photo in family.getPhotoList():
|
||||||
path = photo.getPath()
|
path = photo.getPath()
|
||||||
if os.path.dirname(path) == fileroot:
|
l = len(fileroot)
|
||||||
path = os.path.basename(path)
|
if len(path) >= l:
|
||||||
|
if fileroot == path[0:l]:
|
||||||
|
path = path[l+1:]
|
||||||
g.write(" <img src=\"" + fix(path) + "\"")
|
g.write(" <img src=\"" + fix(path) + "\"")
|
||||||
g.write(" descrip=\"" + fix(photo.getDescription()) + "\"")
|
g.write(" descrip=\"" + fix(photo.getDescription()) + "\"")
|
||||||
proplist = photo.getPropertyList()
|
proplist = photo.getPropertyList()
|
||||||
@ -416,14 +418,17 @@ def exportData(database, filename, callback):
|
|||||||
writeNote(g,"note",source.getNote(),3)
|
writeNote(g,"note",source.getNote(),3)
|
||||||
for photo in source.getPhotoList():
|
for photo in source.getPhotoList():
|
||||||
path = photo.getPath()
|
path = photo.getPath()
|
||||||
if os.path.dirname(path) == fileroot:
|
l = len(fileroot)
|
||||||
path = os.path.basename(path)
|
if len(path) >= l:
|
||||||
g.write(" <img src=\"" + fix(path) + "\"")
|
if fileroot == path[0:l]:
|
||||||
g.write(" descrip=\"" + fix(photo.getDescription()) + "\"")
|
path = path[l+1:]
|
||||||
proplist = photo.getPropertyList()
|
g.write(" <img src=\"" + fix(path) + "\"")
|
||||||
if proplist:
|
g.write(" descrip=\"" + fix(photo.getDescription()) + "\"")
|
||||||
for key in proplist.keys():
|
proplist = photo.getPropertyList()
|
||||||
g.write(' %s="%s"' % (key,proplist[key]))
|
if proplist:
|
||||||
|
for key in proplist.keys():
|
||||||
|
g.write(' %s="%s"' % (key,proplist[key]))
|
||||||
|
g.write("/>\n")
|
||||||
g.write(" </source>\n")
|
g.write(" </source>\n")
|
||||||
g.write(" </sources>\n")
|
g.write(" </sources>\n")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user