Skip to content

Conversation

@DiegoPino
Copy link
Contributor

See #724

The way I approached is:

  • least intrusive/effort (to avoid modifying the N+1 places we access getSize(pageIndex) all over the place
  • Simplest to test by tapping into the Info Class itself, which is not V1/V2/V3 specific like all the other resources

Added a few basic tests. Funny enough, our resource tests don't really use the Info class many times ... but I hope this covers it

FYI: this works

Size (and image info) for the first frame bc there is not such thing as variable frame size Video and also a Video could possible contain 60fps by the length images, which would basically lead to a info.json of HUGE sizes.

By tapping into the getSize method and adding a helper function (isVideo) to the Info Class we avoid rewriting every v1/v2/v3 request for getSize(index) where a video could be involved. This seems cleaner
Makes sense to me to make it here so i can reuse the Video, itself. Will add another at the info Test class too
@DiegoPino DiegoPino added the bug label Feb 26, 2025
@DiegoPino DiegoPino added this to the 6.0 milestone Feb 26, 2025
@DiegoPino DiegoPino self-assigned this Feb 26, 2025
@DiegoPino
Copy link
Contributor Author

@glenrobson @jcoyne @ksclarke could any of you review my code style/sanity for this one? I feel it is a bit hack-ish so happy to address any concerns. All tests are passing now

Copy link
Contributor

@jcoyne jcoyne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@glenrobson glenrobson merged commit cf22dac into develop Feb 26, 2025
8 checks passed
@glenrobson glenrobson deleted the ISSUE-724 branch February 26, 2025 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants