Reverse sorting of MediaFileMap keys
svn: r1499
This commit is contained in:
parent
2ed5ca6390
commit
64f34ccfec
@ -115,7 +115,10 @@ def importData(database, filename, callback):
|
|||||||
|
|
||||||
# Rename media files if they were conflicting with existing ones
|
# Rename media files if they were conflicting with existing ones
|
||||||
ObjectMap = parser.db.getObjectMap()
|
ObjectMap = parser.db.getObjectMap()
|
||||||
for OldMediaID in parser.MediaFileMap.keys():
|
MediaFileMapKeys = parser.MediaFileMap.keys()
|
||||||
|
MediaFileMapKeys.sort()
|
||||||
|
MediaFileMapKeys.reverse()
|
||||||
|
for OldMediaID in MediaFileMapKeys:
|
||||||
NewMediaID = parser.MediaFileMap[OldMediaID]
|
NewMediaID = parser.MediaFileMap[OldMediaID]
|
||||||
if NewMediaID != OldMediaID:
|
if NewMediaID != OldMediaID:
|
||||||
oldfile = ObjectMap[NewMediaID].getPath()
|
oldfile = ObjectMap[NewMediaID].getPath()
|
||||||
|
Loading…
Reference in New Issue
Block a user