From cf542db85395b9f8b5f0c6b2f43014482c8cfcfe Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Sun, 1 Jul 2018 18:50:21 +0200 Subject: [PATCH] getUIHandler() to getUIHFactory() --- .../java/org/schabi/newpipe/extractor/kiosk/KioskList.java | 2 +- .../services/youtube/YoutubeTrendingKioskInfoTest.java | 2 +- .../services/youtube/YoutubeTrendingUIHFactoryTest.java | 5 +---- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java b/extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java index 04d8d7bed..62c3acf6f 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/kiosk/KioskList.java @@ -92,7 +92,7 @@ public class KioskList { throw new ExtractionException("Could not find a kiosk that fits to the url: " + url); } - public UIHFactory getUrlIdHandlerByType(String type) { + public UIHFactory getUIHFactoryByType(String type) { return kioskList.get(type).handler; } } diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingKioskInfoTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingKioskInfoTest.java index b7f0a50bd..6f3fc38b2 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingKioskInfoTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingKioskInfoTest.java @@ -43,7 +43,7 @@ public class YoutubeTrendingKioskInfoTest { throws Exception { NewPipe.init(Downloader.getInstance()); StreamingService service = YouTube; - UIHFactory UIHFactory = service.getKioskList().getUrlIdHandlerByType("Trending"); + UIHFactory UIHFactory = service.getKioskList().getUIHFactoryByType("Trending"); kioskInfo = KioskInfo.getInfo(YouTube, UIHFactory.fromId("Trending").getUrl(), null); } diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingUIHFactoryTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingUIHFactoryTest.java index 3bbf7e949..9d1fd3b69 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingUIHFactoryTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeTrendingUIHFactoryTest.java @@ -24,13 +24,10 @@ import org.junit.BeforeClass; import org.junit.Test; import org.schabi.newpipe.Downloader; import org.schabi.newpipe.extractor.NewPipe; -import org.schabi.newpipe.extractor.exceptions.FoundAdException; import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.uih.UIHFactory; import org.schabi.newpipe.extractor.services.youtube.urlIdHandlers.YoutubeTrendingUIHFactory; -import java.text.ParseException; - import static junit.framework.TestCase.assertFalse; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -44,7 +41,7 @@ public class YoutubeTrendingUIHFactoryTest { @BeforeClass public static void setUp() throws Exception { - UIHFactory = YouTube.getKioskList().getUrlIdHandlerByType("Trending"); + UIHFactory = YouTube.getKioskList().getUIHFactoryByType("Trending"); NewPipe.init(Downloader.getInstance()); }