For piwigo 2.6 I have in mind to rewrite partially the encoding of web service output (json/php/xml). Today it is slow and sometimes you have a _content member in json/php appearing out of nowhere.
The impact will be minimal, but there will be an impact in the output. For example today if you get a list of images (for album/tag or search) you will get something like
stat
result
images
page=0
per_page=100
count=100
_content
0
Object { id=4039, width=2832, height=4248, more...}
1
Object { id=4040, width=4224, height=2816, more...}What you will be getting:
stat
result
paging
page=0
per_page=100
count=100
images
0
Object { id=4039, width=2832, height=4248, more...}
1
Object { id=4040, width=4224, height=2816, more...}Is it ok to go for it ?
Last edited by rvelices (2013-05-14 09:02:00)
Offline
It means that remote software (pLoader, Lightroom, digiKam, shotwell, PiwigoMedia, PiwigoPress, iPhoto...) will be broken :-/ The impact is absolutely huge and I'm not sure it is absolutely necessary (considering that all remote software will need rewrite).
Can't we add a parameter like outputFormat=v2 with the new structure?
Offline
(pLoader won't be modified, so if we break it, pLoader dies)
Offline
Agree, the second version is obviously better but we can't break the API
I like the idea of a version (or format_version or 'v') parameter
(but the scripts will be even more big, well actually no if you code it :-) )
Offline
It's too complicated to keep the two versions because in order to do it properly some changes would be required in some ws_xxx functions ( those using WS_XML_CONTENT, WS_XML_ATTRIBUTES ...)
I'll try to make changes without breaking things.
Is it possible to get a list of used methods by shotwell, digikam, lightroom, piwigomedia ? (ploader and piwigopress are in svn) Just to make sure I don't break those ...
Offline
Here is what I have found:
1) pLoader
http://piwigo.org/dev/browser/extension … ervices.pm
pwg.categories.getAdminList, pwg.categories.getList, pwg.tags.getAdminList, pwg.images.checkUpload, pwg.session.login, pwg.tags.add, pwg.images.add, pwg.images.setInfo, pwg.images.setPrivacyLevel, pwg.images.checkFiles, pwg.images.addFile, pwg.images.exist, pwg.categories.add, pwg.categories.setInfo, pwg.images.addChunk
2) Shotwell
http://redmine.yorba.org/projects/shotw … shing.vala
pwg.session.login, pwg.session.getStatus, pwg.categories.getList, pwg.session.logout, pwg.categories.add, pwg.images.addSimple
3) digiKam
https://github.com/rtsisyk/kipi-plugins … talker.cpp
pwg.session.login, pwg.categories.getList, pwg.images.exist, pwg.getVersion, pwg.images.getInfo, pwg.images.addChunk, pwg.images.setInfo, pwg.images.add
4) PiwigoMedia
pwg.categories.getList, pwg.categories.getImages, pwg.images.getInfo
Offline
I think I could do the change without impact if it was not
plg wrote:
Here is what I have found:
...4) PiwigoMedia
pwg.categories.getImages, pwg.images.getInfo
What's piwigomedia by the way ?
Offline
WP extension
Offline
Offline
I think I can do everything properly with impacting only used pwg.categories.getImages . It means that piwigomedia, piwigopress only will need to be changed. The others will work.
Are you ok ?
Offline
That should be fine :-)
Offline
Here is what's being used in the Piwigo Plugin for Adobe Lightroom:
pwg.getVersion
pwg.session.login
pwg.session.getStatus
pwg.tags.getAdminList
pwg.tags.add
pwg.session.logout
pwg.categories.getList
pwg.categories.getAdminList
pwg.categories.add
pwg.categories.delete
pwg.categories.getImages
pwg.categories.setInfo
pwg.categories.move
pwg.categories.setRepresentative
pwg.images.setInfo
pwg.images.checkUpload
pwg.images.addChunk
pwg.images.add
pwg.images.resizeThumbnail
pwg.images.resizeWebsize
pwg.images.addSimple
pwg.images.delete
pwg.images.getInfo
pwg.images.addComment
pwg.images.setRank
Offline
alloyphoto wrote:
Here is what's being used in the Piwigo Plugin for Adobe Lightroom:
Thanks alloy, I already commited the new code. FYI pwg.categories.getImages has slightly changed, but I believe the others are ok (not sure about addComment now that I read your list ...)
Offline