Skip to content

Querying for a single ZIM URLs gives wrong results #254

@benoit74

Description

@benoit74

Querying for two ZIMs (latest one and the one before on a single title) gives expected results:

https://api.cms.openzim.org/v1/books/zims?zim_ids=8ec5b0b8-a8ce-acd9-e414-5a97d8187617&zim_ids=0ff05730-3ead-f792-b942-f0884feb70c2

{
  "urls": {
    "8ec5b0b8-a8ce-acd9-e414-5a97d8187617": [
      {
        "kind": "download",
        "url": "https://download.kiwix.org/zim/ted/ted_mul_diversity_2026-01.zim",
        "collection": "Kiwix"
      }
    ],
    "0ff05730-3ead-f792-b942-f0884feb70c2": [
      {
        "kind": "download",
        "url": "https://download.kiwix.org/zim/ted/ted_mul_diversity_2026-04.zim",
        "collection": "Kiwix"
      },
      {
        "kind": "view",
        "url": "https://browse.library.kiwix.org/viewer#ted_mul_diversity_2026-04",
        "collection": "Kiwix"
      }
    ]
  }
}

Querying for a single ZIM does not work as expected: it should give "consistent" (and accurate) results without a view link:

Currently:

https://api.cms.openzim.org/v1/books/zims?zim_ids=8ec5b0b8-a8ce-acd9-e414-5a97d8187617

{
  "urls": {
    "8ec5b0b8-a8ce-acd9-e414-5a97d8187617": [
      {
        "kind": "download",
        "url": "https://download.kiwix.org/zim/ted/ted_mul_diversity_2026-01.zim",
        "collection": "Kiwix"
      },
      {
        "kind": "view",
        "url": "https://browse.library.kiwix.org/viewer#ted_mul_diversity_2026-01",
        "collection": "Kiwix"
      }
    ]
  }
}

Expected:

{
  "urls": {
    "8ec5b0b8-a8ce-acd9-e414-5a97d8187617": [
      {
        "kind": "download",
        "url": "https://download.kiwix.org/zim/ted/ted_mul_diversity_2026-01.zim",
        "collection": "Kiwix"
      }
    ]
  }
}

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions