-
Notifications
You must be signed in to change notification settings - Fork 38
changing imagedir without reloading fotos to flickr #13
Comments
Weeeellll, that's fine, but the problem I see is that it would mess up people who have already uploaded stuff and have a big history file with relative paths. I think I agree that absolute paths are probably a better solution. It's easier to retag things alread uploaded that spend your life re-uploading everything. The whole history file thing is a pain TBH. I wish it were more transparent - right now it is a big binary blob that you can fiddle with if you use python's shelve, but it isn't very user friendly. I am loathed to add a flag like "relative path" to the ini file, but that would be one solution. i.e. by default it is assumed to be a relative path, but if you like it can be an abs path. Although that wouldn't even help out in your case. Gah, it's tricky!! |
A flag in the ini file would be a good solution I think. I am happy not having loaded up all my pics til now. Never trust a software you have not tested before ;-) |
The other flag problem is that I have uploaded photos already with this relative path, so I wouldn't really be able to well-test the absolute path solution. So it'd be likely to break. I trust this for myself, as I've tested it for my use cases, but... you're right: software not tested is the same as software that's broken :) |
Because I got bad tags when using absolute path I looked at the code again.
old: folderTag = image[len(IMAGE_DIR):] That's all but read the comments from Richard above because your directory will be lost. |
Due to the large collection of fotos I have I played with different settings of "imagedir" in uploadr.ini:
imagedir = d:\CamPics\aaa
--> all fotos of aaa and subdirectories of aaa were loaded
imagedir = d:\CamPics\aaa\bbb
--> all fotos of aaa\bbb were loaded again and appear twice in flickr
It seems as if the identifier in the history files contains not the full path of the image but a relative path. So the check against double loading fails when you change the starting point in the directory.
I did 2 changes in uploafr.py to use the full path and to avoid the double uplaod to fickr when changing imagedir:
Line 319:
old: if self.uploaded.has_key(folderTag):
new: if self.uploaded.has_key(image):
Line 388:
old: self.logUpload( res.photoid, folderTag )
new: self.logUpload( res.photoid, image )
Being new with python I am not sure if there are any side effects and ask myself if that patch is a good idea.
The text was updated successfully, but these errors were encountered: