Fix seekbar crashing on drag with faulty frameset
What is it?
- [x] Bugfix (user facing)
- [ ] Feature (user facing)
- [ ] Codebase improvement (dev facing)
- [ ] Meta improvement to the project (dev facing)
Description of the changes in your PR
Youtubes api seems to have VERY rarely "broken" preview storyboards i.e. storyboards that are too small for the given amount of frames on the x axis and width of frames. In the linked issue only the width seems to be affected but i assume the same could happen to the height. As an example for this video https://www.youtube.com/watch?v=sxl4DJXCDzA (jumpscare/loud sound warning) the api returns this storyboard https://i.ytimg.com/sb/sxl4DJXCDzA/storyboard3_L2/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgiPyu6jBg==&sigh=rs$AOn4CLD0HwvNS2nXMr9JYlzeuRbC1ubbtg which should have 5 160 pixel wide frames (which is 800 pixels). The image is only 795 pixels wide so it breaks at some point when trying to create a bitmap for the preview. For this video https://www.youtube.com/watch?v=CH50zuS8DD0 the storyboard is correctly sized: https://i.ytimg.com/sb/CH50zuS8DD0/storyboard3_L2/M0.jpg?sqp=-oaymwENSDfyq4qpAwVwAcABBqLzl_8DBgikqp23Bg==&sigh=rs$AOn4CLBG_KgXP0R2Z1DI9hg-Ntn7xCnrXA. Seems to be a youtube sided thing, i don't see any issues on the extractor side (but I could be wrong about that of course). The only "solution" i found was to catch these cases and "manually" and adjust the bounds of the preview, even though i am not super happy with that approach. There seems to be no pattern (same video length for example) behind this behaviour but this statement comes with a very small sample size so I might have missed something.
Fixes the following issue(s)
- Fixes #10477
Relies on the following changes
- https://github.com/TeamNewPipe/NewPipe/pull/11584 (could also be added to this PR if you prefer that) For this PR only line 171-181 are relevant
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.
Due diligence
- [x] I read the contribution guidelines.
LGTM, but needs a rebase due to resolve the conflict caused by your other PR.
I currently lost track of all the contributions that are part of courses at universities. Please let me know if you are an ANU student for internal statistics and because I am writing my master thesis about open source contributions as part of learning computer science and computer science education at university.
@TobiGr Ah forgot about that, should be fine now? Am not an ANU student so you can cross me of your list, good luck with your thesis anyway!
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code