# 		ListPictureDelay.py
# List for each picture in the album its display time

App.ClearTrace()

alb = App.GetCurrentAlbum
nb = alb.nbPicture
App.Trace( "Pictures in this album: " + `nb`)

for i in range(0, nb, 1):
    pic = alb.GetPicture(i)
    d = pic.lTransition & 65535
    if d == 65535:
      s = "<default album value>"
    else:
      s = `d / 10.` + ' s'
      #s = `d`
    text = `i+1` + "\t" + pic.sShortFileName + "\t"
    n = len(pic.sShortFileName)
    for k in range (0, 2 - n/10, 1):
      text = text + "\t"
    App.Trace( text + s )

App.Trace( "Done !" )
