Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
dict comprehension
  • Loading branch information
cclauss committed Apr 23, 2016
1 parent c0bbd83 commit 3d9319e
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions IdentifyAlbumOfPhotos.py
Expand Up @@ -13,12 +13,8 @@ def main():
console.clear()
#p = photos.pick_image(show_albums=True, include_metadata=True, original=True, raw_data=False, multi=True)
# Build dictionary filename: index
fn_index = {}
for ip in range(photos.get_count()):
m = photos.get_metadata(ip)
#print m
fn = m.get('filename')
fn_index[fn] = (ip,'')
fn_index = {photos.get_metadata(i).get('filename'): (i, '')
for i in xrange(photos.get_count())}

# - type = 1: album
# - subtype = 2: regular album
Expand All @@ -38,4 +34,4 @@ def main():
# print filename -> album,index
print fn_index

main()
main()

0 comments on commit 3d9319e

Please sign in to comment.