Closed willmorrison1 closed 4 years ago
@kitbenjamin if I add a new function remove_last_image() which .. removes the last image created, and make it work here
do you think that is the most appropriate way to solve this issue?
I could remove the last image in e.g. get_toBeDoneNext()
but there is no is_rerun
flag - so it would always remove the last image even if GE didn't crash. By putting it in L229 (linked above) I know that it is a rerun. Am I missing anything?
Google earth for some reason creates a duplicate image at the end of the run. The program deletes the final image taken (trying to find the function now).
So maybe if we took out the currently existing function and added your proposal it would kill two birds with one stone I think.
Here is the part that deletes the duplicated final image https://github.com/kitbenjamin/googleEarthImageCollection/blob/bd91ffa83f2a11697431bb8b74d4450117b39124/basefiles/scripts/functions.py#L274
ok. looks like that one removes a consistent duplicate within the GoogleEarthOut/run#/
subdirectory. We need something that deletes the last file in GoogleEarthOut
. I have just added that function quickly and am putting it where I think it is needed, then I will try branch
But the two functions could probably be merged in some way (low prio)
e.g.
suggest: starting from
n_pics - 1
when restarting GE.