Fix for duplicate images that would cause multiple realtions...
... to the same image on the same product.
Solves one part of https://github.com/dweeves/magmi-git/issues/471 which is about image 'exclude' flags not being set correctly. As it turns out the problem was a combination between duplicate images by magmi and evil Magento that would clean up the table/relations as soon as you'd view the product in adminhtml.
This solution works for us as well. We use external url's for importing Images.
Our CSV looks like this for example:
We had the bug that it created 3 times a binding in the Database for image, small_image and thumbnail.
But the backend would not see the bindings as they are duplicates, only you would see the created additional positions (starting from 3 now in stead of 1):
We then had to run the update in Magmi in order to "unset the database binding" for position 1 and 2.
With this update we do not have to run the update in Magmi. It creates one binding and finds the same binding for the small_image and thumbnail in stead of creating new once.