NewPipeExtractor icon indicating copy to clipboard operation
NewPipeExtractor copied to clipboard

Made YouTube service proxyable/pluggable and add support for invidious

Open litetex opened this issue 3 years ago • 0 comments

  • [x] I carefully read the contribution guidelines and agree to them.
  • [x] I have tested the API against NewPipe.
  • [x] I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.
    • 👉 https://github.com/TeamNewPipe/NewPipe/pull/8220

Fixes #427

Description

This PR make the YouTube service proxyable/pluggable. What does this mean? It means that the YouTubeService behaves as a proxy for a YouTubeLikeService, which can be set into there. Currently the following services are implemented:

  • YouTubeDirectService - Directly calls YouTube - was previously the YouTubeService
  • InvidiousService - Uses Invidious/an InvidiousInstance to access YouTube

The current implementation also allows implementing of further service like e.g. Piped that proxy YT.

The merging of these PR should avoid total "NewPipe blackouts" like e.g. https://github.com/TeamNewPipe/NewPipe/issues/8202 as it makes the user more independent to switch to a middleware in case YouTube fails.

Note: Also removed the checkstyle suppression file in favor of // CHECKSTYLE:OFF and // CHECKSTYLE:ON comments

TODO:

  • [ ] Tests

litetex avatar Apr 15 '22 13:04 litetex