Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return album photo sort order with API pwg.categories.getList #917

Closed
EddyLB opened this issue Aug 20, 2018 · 8 comments
Closed

Return album photo sort order with API pwg.categories.getList #917

EddyLB opened this issue Aug 20, 2018 · 8 comments

Comments

@EddyLB
Copy link
Contributor

EddyLB commented Aug 20, 2018

The pwg.categories.getList method does not return the album photo sort order choosen by the user with the web UI and stored on the server, preventing external apps to adopt it. Could this be implemented as requested here ?

@Teatek
Copy link
Contributor

Teatek commented Jan 9, 2019

Hello, I don't understand why you would need to get the rank because we can already get the global rank therefore the rank. The global rank contains the rank. It is the last number of the global rank.

For example, if you're global rank is this : 1.2.10
Then the rank is : 10

However the idea of adding a function to set the rank through the API is good. So please open a issue.

@Teatek
Copy link
Contributor

Teatek commented Jan 9, 2019

Ok, sorry I see the #918 .

@EddyLB EddyLB closed this as completed Jan 9, 2019
@EddyLB EddyLB reopened this Jan 9, 2019
@EddyLB EddyLB closed this as completed Jan 9, 2019
@EddyLB EddyLB reopened this Jan 9, 2019
@plegall
Copy link
Member

plegall commented Feb 1, 2019

@EddyLB I would like your feeling about the answer of @Teatek : why do you need the rank when you already have the global_rank?

@Teatek has pushed a pull-request #955 which adds the rankin the output of method pwg.categories.getList and pwg.categories.getAdminList but I fear that some 3rd part apps are expecting N fields and if they receive N+1 it breaks their execution. If we can avoid this change, I would be "more relaxed" :-)

@EddyLB
Copy link
Contributor Author

EddyLB commented Feb 2, 2019

@plegall I guess there is some misunderstanding and the pull-request #955 I apologise if
Piwigo/Piwigo-Mobile#242 is unclear.

To my knowledge, a Piwigo server provides the order in which albums appear on the web interface with global_rank but not the option selected by the user for sorting photos inside each album (option set with the web interface in section Albums / Manage / Photos sort order). That is why I opened this issue.

Similarly, #918 requests the possibility to change that option from a third party app so that users get the same photos sort order when returning to the web interface.

@plegall
Copy link
Member

plegall commented Feb 3, 2019

Allright, my mistake, I understood wrong :-)

Teatek added a commit to Teatek/Piwigo that referenced this issue Feb 4, 2019
Teatek added a commit to Teatek/Piwigo that referenced this issue Feb 4, 2019
@plegall
Copy link
Member

plegall commented Jul 4, 2023

@EddyLB is this issue fixed?

@EddyLB
Copy link
Contributor Author

EddyLB commented Jul 4, 2023

@plegall , I have implemented the code shown in the commits in a test server in version 13.7.0 and this works well. The method returns in addition for example: "image_order":"date_creation ASC, file ASC, id ASC".

PS: Returning additional data is not an issue for routines parsing JSON data.

plegall pushed a commit that referenced this issue Jul 5, 2023
* returns an image_order for API methods pwg.categories.getList and pwg.categories.getAdminList
@plegall plegall added this to the 14.0.0beta2 milestone Jul 5, 2023
@plegall plegall self-assigned this Jul 5, 2023
@plegall
Copy link
Member

plegall commented Jul 5, 2023

OK, I've adapted the pull-request to recent code changes in pwg.categories.getAdminList and pwg.categories.getList and merged it.

@plegall plegall closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants