Announcement

#1 2016-03-28 12:00:38

piwigoer
Member
2016-03-28
2

Import Piwigo Import Tree only adds new pictures, but not changed ones

Hello/Hi/Greetings,

I am using the Piwigo Import Tree script and it is working fine. The only problem I have is, that it only adds new albums/pictures, but does not update changed pictures, nor deletes  them if they do not exist any more.

Maybe I am using it in the wrong way. What I try to achieve is this:
I have some IP cameras, that take pictures, which I store in a folder structure. The pictures are stored in a round robin way (new pictures are added up to a max number, then the oldest will be deleted). I then import the pictures to piwigo using the script.  The script will add the pictures, but once they had been added, they won't be updated. Since the names of the pictures in the folder structure remains the same, the script will not update them even if the pictures change.

Is there a way to force the import, or look at the meta data to decide if the pictures should be updated or not? This seems to be possible in the web interface where you can check "Synchronize metadata"

Thanks,
piwigoer

Piwigo version: 2.8.0
PHP version:  5.6.17-0+deb8u1
MySQL version: 5.5.47-0+deb7u1

Offline

 

#2 2016-03-31 11:24:42

piwigoer
Member
2016-03-28
2

Re: Import Piwigo Import Tree only adds new pictures, but not changed ones

I have figured this out myself.
I modified the Piwigo import tree script in a way that it does not skip any pictures. Instead the script will now again send the picture using the pwg.images.addSimple method but adding the existing image id. This way, the pictures get updated.
I also noticed, that the script only works correct, when the script is located in a directory that the user has write access to. The reason for this is, that the log files (.piwigo_import_script.txt) will be created in the directory where the script is started.
The solution for me was to copy the script to the root of the --diretory parameter given to the script. In this case the log files will be located where the pictures are.

Only two things I noticed with the script:
- The script always performs a login before attempting to send data, but it never logs out.
- could not make it work with sites using self signed certificates.

Offline

 

#3 2021-06-15 23:39:17

jose1711
Member
2021-06-07
12

Re: Import Piwigo Import Tree only adds new pictures, but not changed ones

piwigoer wrote:

- could not make it work with sites using self signed certificates.

perhaps this could help: https://stackoverflow.com/questions/476 … t#47662850

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact