internetarchive / iiif

The official Internet Archive IIIF service
GNU General Public License v3.0
21 stars 4 forks source link

Image type object only showing first image. #52

Open glenrobson opened 5 months ago

glenrobson commented 5 months ago

Transfering from: https://github.com/ArchiveLabs/iiif.archivelab.org/issues/137

The following item should have three images but only has one:

The logic in the app resolve right now only takes the last image in the file list and creates a manifest for that single image.

We'll need a way to check for multiple valid images, and then add those as canvases individually.

glenrobson commented 5 months ago

@digitaldogsbody you were right. The book reader returns

{
      "error": {
            "string": "Couldn't find image stack.",
            "itemid": "arkivkopia.se-lms-G70-48.3",
            "server": "ia800802.us.archive.org",
            "request_uri": "/BookReader/BookReaderJSIA.php?id=arkivkopia.se-lms-G70-48.3&itemPath=/1/items/arkivkopia.se-lms-G70-48.3&server=ia800802.us.archive.org&format=jsonp&subPrefix=arkivkopia.se-lms-G70-48.3"
      }
}

from: https://ia800802.us.archive.org/BookReader/BookReaderJSIA.php?id=arkivkopia.se-lms-G70-48.3&itemPath=/1/items/arkivkopia.se-lms-G70-48.3&server=ia800802.us.archive.org&format=jsonp&subPrefix=arkivkopia.se-lms-G70-48.3

glenrobson commented 5 months ago

Original files in object:

__ia_thumb.jpg format: 'Item Tile'
arkivkopia.se-lms-G70-48.3_files.xml format: 'Metadata'
arkivkopia.se-lms-G70-48.3_meta.sqlite format: 'Metadata'
arkivkopia.se-lms-G70-48.3_meta.xml format: 'Metadata'
original_lms2_4c4d535f4737302d34383a33.index.1.tiff.jpg format: 'JPEG'
original_lms2_4c4d535f4737302d34383a33.index.2.tiff.jpg format: 'JPEG'
original_lms2_4c4d535f4737302d34383a33.index.3.tiff.jpg format: 'JPEG'

Maybe use count(format in valid_filetypes) > 1

digitaldogsbody commented 5 months ago

@digitaldogsbody you were right. The book reader returns

{
      "error": {
            "string": "Couldn't find image stack.",
            "itemid": "arkivkopia.se-lms-G70-48.3",
            "server": "ia800802.us.archive.org",
            "request_uri": "/BookReader/BookReaderJSIA.php?id=arkivkopia.se-lms-G70-48.3&itemPath=/1/items/arkivkopia.se-lms-G70-48.3&server=ia800802.us.archive.org&format=jsonp&subPrefix=arkivkopia.se-lms-G70-48.3"
      }
}

from: https://ia800802.us.archive.org/BookReader/BookReaderJSIA.php?id=arkivkopia.se-lms-G70-48.3&itemPath=/1/items/arkivkopia.se-lms-G70-48.3&server=ia800802.us.archive.org&format=jsonp&subPrefix=arkivkopia.se-lms-G70-48.3

It occurs to me there is a situation where this might not occur - if there is a file called <identifier>_images.zip then the BookReader may well find an "image stack" regardless of the mediatype in the metadata (based on Hank's comment here rather than any testing).

I think it won't affect us if we go with the counting of originals with valid formats you outlined above, but we should be aware of it for items such as mareful which have multiple book stacks (#12).

glenrobson commented 1 week ago

Can this be closed?