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 {
|
public String getName() throws ParsingException {
|
||||||
return JsonUtils.getString(json, "displayName");
|
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");
|
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
|
@Test
|
||||||
public void testOriginalUrl() throws ParsingException {
|
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…
Reference in New Issue