Skip to content

Commit

Permalink
Merge branch 'main' into fix-pageorder
Browse files Browse the repository at this point in the history
  • Loading branch information
hadro committed Oct 19, 2023
2 parents 0822862 + 46eff1e commit 9dec13f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iiify/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,15 @@ def create_manifest3(identifier, domain=None, page=None):
for format in ['VBR MP3', '32Kbps MP3', '56Kbps MP3', '64Kbps MP3', '96Kbps MP3', '128Kbps MP3', 'MPEG-4 Audio', 'Flac', 'AIFF', 'Apple Lossless Audio', 'Ogg Vorbis', 'WAVE', '24bit Flac', 'Shorten']:
if format in derivatives[file['name']]:
r = ResourceItem(id=f"https://archive.org/download/{identifier}/{derivatives[file['name']][format]['name'].replace(' ', '%20')}",
type='Audio',
type='Sound',
format=to_mimetype(format),
label={"none": [format]},
duration=float(file['length']))
body.items.append(r)
elif file['format'] == format:
r = ResourceItem(
id=f"https://archive.org/download/{identifier}/{file['name'].replace(' ', '%20')}",
type='Audio',
type='Sound',
format=to_mimetype(format),
label={"none": [format]},
duration=float(file['length']))
Expand Down
1 change: 1 addition & 0 deletions tests/test_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def test_v3_etree_mediatype(self):
manifest = resp.json

self.assertEqual(len(manifest['items']),36,f"Expected 36 canvases but got: {len(manifest['items'])}")
self.assertEqual(manifest['items'][0]['items'][0]['items'][0]['body']['items'][0]['type'],"Sound",f"Expected 'Sound' but got: {manifest['items'][0]['items'][0]['items'][0]['body']['items'][0]['type']}")


def test_v3_64Kbps_MP3(self):
Expand Down

0 comments on commit 9dec13f

Please sign in to comment.