Skip to content

Mobile app: fine-tuning needed for 'image_to_update' #9226

Description

Problem

In the latest Smoothie POC (openfoodfacts/smooth-app#4674), we want to display an additional icon for pictures that are outdated - let's say more than 1 year old.

There are two problems.

First, we expect seconds in images_to_update_fr. But looking at https://world.openfoodfacts.org/api/v3/product/3017620422003?fields=code,product_name,images_to_update_fr, we get

  • "front_fr":91593030 (1060 days)
  • "ingredients_fr":200038598 (2315 days)

Which does not match what we find in history about last modification for https://fr.openfoodfacts.org/produit/3017620422003/nutella-ferrero:

  • 2023/08/24-06:31:01 CEST for "front_fr"
  • 2023/08/14-13:53:56 CEST for "ingredients_fr"

Is there something wrong? (possibly, my interpretation of how to read the data)

Second, AFAIK we get the image freshness only for the specified languages.
And we would like the image freshness for all languages, a bit like what we have for product name ("product_name_languages").
A typical use case would be: "I query the data in French, but I would like an access to all languages' image freshness data, so that in my image screen I can display the freshness of images not only for French images but Italian images".
Something like 'image_to_update_languages'?

Proposed solution

  1. check the exact meaning of the int values of 'image_to_update_xx'.
  2. implement 'image_to_update_languages' or specify the already existing field.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    • Status

      To discuss and validate

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions