[web API] for determining if a single image is a favorite #966

Closed
opened 2026-10-05 00:25:54 +02:00 by adam · 4 comments
Owner

When previewing images of an album, one after the other, the iOS app suggests a list of actions to copy, move, delete, edit, etc. the current image. To propose to add or remove that image from the favorites, the app needs to know whether the current image is in the list of favorites.

The method pwg.users.favorites.getList is very useful to present the complete list of favorites but too heavy to determine if a single image is in the list of favorites. A method like pwg.users.favorites.getInfo with imageId as parameter would be highly preferable.

When previewing images of an album, one after the other, the iOS app suggests a list of actions to copy, move, delete, edit, etc. the current image. To propose to **add** or **remove** that image from the favorites, the app needs to know whether the current image is in the list of favorites. The method `pwg.users.favorites.getList` is very useful to present the complete list of favorites but too heavy to determine if a single image is in the list of favorites. A method like `pwg.users.favorites.getInfo` with `imageId` as parameter would be highly preferable. <!-- github-sync-id:512821775 -->
adam closed this issue 2026-10-05 00:25:54 +02:00
Author
Owner

After two years, I have decided to download all favorites in cache with the method pwg.users.favorites.getList.

After two years, I have decided to download all favorites in cache with the method `pwg.users.favorites.getList`. <!-- github-comment-id:933848134 -->
Author
Owner

Hey there @EddyLB

I pushed some changes to a branch I have in my fork that add an is_favorite property to both the pwg.categories.getImages and pwg.tags.getImages API calls. Does that seem like it would help your use case? I am considering adding this to pwg.images.getInfo as well then creating a PR for it.

Hey there @EddyLB I pushed some changes to [a branch I have in my fork](https://github.com/abrenoch/Piwigo/tree/incl_favorites) that add an `is_favorite` property to both the `pwg.categories.getImages` and `pwg.tags.getImages` API calls. Does that seem like it would help your use case? I am considering adding this to `pwg.images.getInfo` as well then creating a PR for it. <!-- github-comment-id:985227978 -->
Author
Owner

Hi @abrenoch
I have closed this issue because I have found a technique for downloading all favorites in the background. I thank you for the work but it is not necessary to add an is_favorite property.

Hi @abrenoch I have closed this issue because I have found a technique for downloading all favorites in the background. I thank you for the work but it is not necessary to add an `is_favorite` property. <!-- github-comment-id:999616294 -->
Author
Owner

Gotcha @EddyLB - I think I may make a PR for this anyways since it seems like it would be useful data to have in those calls, and would make any 3rd party development a little easier!

Gotcha @EddyLB - I think I may make a PR for this anyways since it seems like it would be useful data to have in those calls, and would make any 3rd party development a little easier! <!-- github-comment-id:999821160 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#966