-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding v2 tests and updating canvas identifier #129
Conversation
iiify/app.py
Outdated
@@ -139,6 +139,10 @@ def manifest3(identifier): | |||
|
|||
@app.route('/iiif/<identifier>/manifest.json') | |||
def manifest(identifier): | |||
return manifest2(identifier) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default to v3.
iiify/app.py
Outdated
return manifest2(identifier) | ||
|
||
@app.route('/iiif/2/<identifier>/manifest.json') | ||
def manifest2(identifier): | ||
domain = purify_domain(request.args.get('domain', request.url_root)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcode this to iiif.archivelab.org
Make v2 use cantaloupe. |
iiify/resolver.py
Outdated
@@ -394,12 +396,12 @@ def create_manifest3(identifier, domain=None, page=None): | |||
for file in [f for f in originals if f['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']]: | |||
normalised_id = file['name'].rsplit(".", 1)[0] | |||
slugged_id = normalised_id.replace(" ", "-") | |||
c_id = f"https://iiif.archivelab.org/iiif/{identifier}/{slugged_id}/canvas" | |||
c_id = f"https://iiif.archive.org/iiif/{identifier}/{slugged_id}/canvas" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use URI prefix.
* Defaulting to 3 * use URI prefix * hardcode iiif.archivelabs for v2
@digitaldogsbody I was having a look a the v2 manifest and although we don't directly link to cantaloupe the manifest points to the local server iiiify server e.g:
Which calls your code that redirects to cantaloupe so I don't thing there is anything to do here. |
Ok good stuff! We can revisit in the future to update the v2 code to get the cantaloupe address directly rather than having to make the client make an additional request just to get the redirect |
Unless of course we want to obscure the canteloupe address in the manifests and serve a redirect also for v3, which would allow the address of the canteloupe deployment to move while keeping the |
I think it's nice to leave the iiif.archive.labs url there for now and update it if we move to iiif.archive.org/iiif/image. |
Agreed. Presumably when the production service goes live with the DNS, the current Canteloupe instance (or whatever production version replaces it) will be reverse-proxied behind iiif.archive.org/iiif/image as well, so we should make a reminder to update the URL served in v3 manifests away from the current https://services-ia-iiif-cantaloupe-experiment.dev.archive.org/iiif/ that is returned. |
No description provided.