mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2025-04-27 15:30:34 +05:30
add original url for share
This commit is contained in:
parent
d7582734e7
commit
193442d01c
@ -179,5 +179,10 @@ public class PeertubeChannelExtractor extends ChannelExtractor {
|
||||
public String getName() throws ParsingException {
|
||||
return JsonUtils.getString(json, "displayName");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOriginalUrl() throws ParsingException {
|
||||
return ServiceList.PeerTube.getBaseUrl() + "/accounts/" + getId();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -291,4 +291,9 @@ public class PeertubeStreamExtractor extends StreamExtractor {
|
||||
return JsonUtils.getString(json, "name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getOriginalUrl() throws ParsingException {
|
||||
return ServiceList.PeerTube.getBaseUrl() + "/videos/watch/" + getId();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ public class PeertubeChannelExtractorTest {
|
||||
|
||||
@Test
|
||||
public void testOriginalUrl() throws ParsingException {
|
||||
assertEquals("https://peertube.mastodon.host/api/v1/accounts/kde", extractor.getOriginalUrl());
|
||||
assertEquals("https://peertube.mastodon.host/accounts/kde", extractor.getOriginalUrl());
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user