-
Notifications
You must be signed in to change notification settings - Fork 1
Prefer Archivematica access copies over older ones #488
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
Conversation
3cfdd25 to
d6bb9a5
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #488 +/- ##
==========================================
+ Coverage 42.53% 42.71% +0.17%
==========================================
Files 357 359 +2
Lines 10984 10974 -10
Branches 1795 1793 -2
==========================================
+ Hits 4672 4687 +15
+ Misses 6151 6130 -21
+ Partials 161 157 -4 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
liam-lloyd
left a comment
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.
In testing this, it looks like the Archivematica access copy is available via the download button in the record info panel on the right of the screen, but not via the download button at the top of the file list.
I believe this should be fixed now |
|
I decided to refactor the "cursed" pattern I was using earlier since it ended up being used in two places now. This should make those calls easier to read while allowing us to continue to use this same prioritization behavior in each case, and hopefully future cases if they arise. |
|
@yeslikesolo to test this, please check all formats listed as accepted file types in this KB article to make sure they are 1. viewable (in both the preview info tab and full screen!) and 2. downloadable (from the button at the top and the button in the info tab). If you need test files, you can find some here. |
|
To clarify a bit, you probably only need to test the various general types of files ("Photo, Audio, Video, Document" etc) and not each specific format (though different kinds of documents might be helpful since they go through multiple processing steps) |
dee55c2 to
7aa07eb
Compare
Create a helper method that fetches the access file for a given record. Also finally create an internal type for FileVO, which is called `PermanentFile`. This algorithm prioritizes Archivematica copies first, then other coverted copies (where it prioritizes PDFs over other formats since documents have intermediate conversion formats), before falling back to the original file. PER-9873: Update clients to favor Archivematica access copies
Use the `GetAccessFile` method in various file viewer components. In particular: - The code that fetches the PDF url in the file-viewer component - The code that fetches the proper audio file - The code that fetches the proper video file - The code that fetches which image to use in OpenSeaDragon PER-9873: Update clients to favor Archivematica access copies
This is a small adjustment to look for Archivematica Access files in download options. It is part of the same branch as PER-9873 so we can use the new enum for file formats. PER-9902: Include Archivematica access copies in the download options
Add a method onto RecordVO that gets a list of info about download options from its list of FileVOs. This function is duplicated across the codebase for each of the download button components so adding this as a method onto RecordVO centralizes this logic in one place. Then use this method in both download buttons. PER-9902: Include Archivematica access copies in the download options
When sorting through FileVOs a hard-to-read pattern emerged multiple times that involved subtracting booleans that were converted to numbers. Extract this logic into its own helper function so we can continue to use this helpful pattern but it also is more readable and more reusable. PER-9902: Include Archivematica access copies in the download options
7aa07eb to
284ae00
Compare
Prefer archivematica access copies over older converted access copies in the file viewer. This is accomplished with a centralized helper function that picks the proper access copy in our specific priority order. This function is then used in various file viewer components.
This also includes the change to the download options, since it depends on the new FileVO type definitions.
Resolves PER-9873 + PER-9902.
Steps to test: