NewPipe icon indicating copy to clipboard operation
NewPipe copied to clipboard

Calculate cache key based on info type instead of item type

Open Stypox opened this issue 1 year ago • 1 comments

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

It didn't really make sense to consider two cache keys as equal based on the type of items contained within that list. The proper way is to distinguish the actual kind of Info being saved/retrieved, so I created a new enum independent from the extractor's one

This PR includes the extractor from https://github.com/TeamNewPipe/NewPipeExtractor/pull/1148 to showcase that the problem is fixed, since there MediaCCC channels and channel tabs have the same url.

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

Stypox avatar Dec 30 '23 22:12 Stypox

InfoCache does not need to be reset after applying these changes because it has a lifetime of one session. Is this correct?

Yes, and also if it wasn't correct, all cache keys would have changed so there won't be conflicts

Stypox avatar Mar 28 '24 12:03 Stypox