Skip to content
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

[PeerTube] channels support #308

Merged
merged 3 commits into from
Apr 10, 2020
Merged

Conversation

Royosef
Copy link
Contributor

@Royosef Royosef commented Apr 9, 2020

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

add support for peertube channels

* Rename PeertubeUserExtractor to PeertubeAccountExtractor
* Add test for video-channels in PeertubeChannelLinkHandlerFactoryTest
* Compatibility support for older versions (use "accounts/" as default)
@Royosef Royosef requested a review from wb9688 April 10, 2020 13:45
@wb9688
Copy link
Contributor

wb9688 commented Apr 10, 2020

@Royosef: You forgot to address #308 (comment)

@Royosef
Copy link
Contributor Author

Royosef commented Apr 10, 2020

@Royosef: You forgot to address #308 (comment)

I added the following test:
assertEquals("video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa", linkHandler.fromUrl("https://peertube.mastodon.host/video-channels/7682d9f2-07be-4622-862e-93ec812e2ffa/videos").getId());

Was I supposed to add something else?

@wb9688
Copy link
Contributor

wb9688 commented Apr 10, 2020

@Royosef: You was supposed to add that, but also tests for getting the URL from the ID. Those tests are for getting the ID from the URL.

@Royosef
Copy link
Contributor Author

Royosef commented Apr 10, 2020

@Royosef: You was supposed to add that, but also tests for getting the URL from the ID.

Oh, do you mean the acceptUrlTest function in PeertubeChannelLinkHandlerFactoryTest? I will add a test for video-channels there.

@wb9688
Copy link
Contributor

wb9688 commented Apr 10, 2020

@Royosef: No, I meant that you should add something like:

    @Test
    public void getUrlFromId() throws ParsingException {
        assertEquals("https://peertube.mastodon.host/accounts/[email protected]", linkHandler.fromId("[email protected]").getUrl());
    }

Note that I didn't test whether this example works, and you should add all 3 cases.

You're correct in that you also need to add a video channel to the acceptUrlTest.

@wb9688 wb9688 merged commit 1b52230 into TeamNewPipe:dev Apr 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants