mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 22:30:33 +05:30
added support for "vnd.youtube.launch" URI-scheme
This commit is contained in:
parent
ae23059d66
commit
399b4f2eef
@ -60,7 +60,7 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory {
|
|||||||
URI uri = new URI(urlString);
|
URI uri = new URI(urlString);
|
||||||
String scheme = uri.getScheme();
|
String scheme = uri.getScheme();
|
||||||
|
|
||||||
if (scheme != null && scheme.equals("vnd.youtube")) {
|
if (scheme != null && (scheme.equals("vnd.youtube") || scheme.equals("vnd.youtube.launch"))) {
|
||||||
String schemeSpecificPart = uri.getSchemeSpecificPart();
|
String schemeSpecificPart = uri.getSchemeSpecificPart();
|
||||||
if (schemeSpecificPart.startsWith("//")) {
|
if (schemeSpecificPart.startsWith("//")) {
|
||||||
urlString = "https:" + schemeSpecificPart;
|
urlString = "https:" + schemeSpecificPart;
|
||||||
|
@ -99,7 +99,7 @@ public class YoutubeStreamLinkHandlerFactoryTest {
|
|||||||
assertTrue(linkHandler.acceptUrl("vnd.youtube://www.youtube.com/watch?v=jZViOEv90dI"));
|
assertTrue(linkHandler.acceptUrl("vnd.youtube://www.youtube.com/watch?v=jZViOEv90dI"));
|
||||||
assertTrue(linkHandler.acceptUrl("vnd.youtube:jZViOEv90dI"));
|
assertTrue(linkHandler.acceptUrl("vnd.youtube:jZViOEv90dI"));
|
||||||
|
|
||||||
assertTrue(linkHandler.acceptUrl("vnd.youtube:jZViOEv90dI"));
|
assertTrue(linkHandler.acceptUrl("vnd.youtube.launch:jZViOEv90dI"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
Reference in New Issue
Block a user