From 399b4f2eefba49c83fe98e627497401bc892e52b Mon Sep 17 00:00:00 2001 From: Connectety-L Date: Thu, 24 Jan 2019 10:53:03 +0100 Subject: [PATCH] added support for "vnd.youtube.launch" URI-scheme --- .../youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java | 2 +- .../services/youtube/YoutubeStreamLinkHandlerFactoryTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java index d9d9e93a0..e73bd969e 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java @@ -60,7 +60,7 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory { URI uri = new URI(urlString); 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(); if (schemeSpecificPart.startsWith("//")) { urlString = "https:" + schemeSpecificPart; diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamLinkHandlerFactoryTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamLinkHandlerFactoryTest.java index 167735f3c..aca774210 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamLinkHandlerFactoryTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamLinkHandlerFactoryTest.java @@ -99,7 +99,7 @@ public class YoutubeStreamLinkHandlerFactoryTest { 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.launch:jZViOEv90dI")); } @Test