diff --git a/iiify/resolver.py b/iiify/resolver.py index fbdd81c..93679c2 100644 --- a/iiify/resolver.py +++ b/iiify/resolver.py @@ -710,7 +710,7 @@ def create_manifest3(identifier, domain=None, page=None): vttfiles[sourceFilename].append(f) # create the canvases for each original - for file in [f for f in originals if f['format'] in ['MPEG4', 'h.264 MPEG4', '512Kb MPEG4', 'HiRes MPEG4', 'MPEG2', 'h.264', 'Matroska', 'Ogg Video', 'Ogg Theora', 'WebM', 'Windows Media', 'Cinepack']]: + for file in [f for f in originals if f['format'] in ['MPEG4', 'h.264 HD', 'h.264 MPEG4', '512Kb MPEG4', 'HiRes MPEG4', 'MPEG2', 'h.264', 'Matroska', 'Ogg Video', 'Ogg Theora', 'WebM', 'Windows Media', 'Cinepack','QuickTime']]: normalised_id = file['name'].rsplit(".", 1)[0] slugged_id = normalised_id.replace(" ", "-") c_id = f"{URI_PRIFIX}/{identifier}/{slugged_id}/canvas" diff --git a/tests/test_manifests.py b/tests/test_manifests.py index 2e4bfdf..e2ff62d 100644 --- a/tests/test_manifests.py +++ b/tests/test_manifests.py @@ -149,9 +149,18 @@ def test_encoded_thumb(self): resp = self.test_app.get("/iiif/3/steamboat-willie-16mm-film-scan-4k-lossless/manifest.json") self.assertEqual(resp.status_code, 200) manifest = resp.json - self.assertEqual(len(manifest['thumbnail']),15, f"Expected 15 thumbnails, but got {len(manifest['items'])}") + self.assertEqual(len(manifest['thumbnail']),15, f"Expected 15 thumbnails, but got {len(manifest['thumbnail'])}") self.assertEqual(manifest['thumbnail'][0]['id'],"https://archive.org/download/steamboat-willie-16mm-film-scan-4k-lossless/steamboat-willie-16mm-film-scan-4k-lossless.thumbs/Steamboat%20Willie%20%5B16mm%20Film%20Scan%5D_ProRes%20%283400x2550%29_000001.jpg", f"Expected URL to be encoded") + self.assertEqual(len(manifest['items']),1, f"Expected 1 canvas, but got {len(manifest['items'])}") + + def test_hd_manifest(self): + resp = self.test_app.get("/iiif/3/cc4ia-Polar_Plunge_Promo_-_2018/manifest.json") + self.assertEqual(resp.status_code, 200) + manifest = resp.json + + self.assertEqual(len(manifest['items']),1, f"Expected 1 canvas, but got {len(manifest['items'])}") + ''' to test: