From 2015eb374a314b9b3726e19210d46933b4e0205e Mon Sep 17 00:00:00 2001 From: litetex <40789489+litetex@users.noreply.github.com> Date: Mon, 9 May 2022 21:05:03 +0200 Subject: [PATCH] Removed more unused methods --- .../java/org/schabi/newpipe/extractor/NewPipe.java | 10 ---------- .../java/org/schabi/newpipe/extractor/NewPipeTest.java | 5 ----- 2 files changed, 15 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/NewPipe.java b/extractor/src/main/java/org/schabi/newpipe/extractor/NewPipe.java index f5ca070c6..7e2906771 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/NewPipe.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/NewPipe.java @@ -93,16 +93,6 @@ public final class NewPipe { throw new ExtractionException("No service can handle the url = \"" + url + "\""); } - public static String getNameOfService(final int id) { - try { - return getService(id).getServiceInfo().getName(); - } catch (final Exception e) { - System.err.println("Service id not known"); - e.printStackTrace(); - return ""; - } - } - /*////////////////////////////////////////////////////////////////////////// // Localization //////////////////////////////////////////////////////////////////////////*/ diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/NewPipeTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/NewPipeTest.java index 67c456e6b..127442b48 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/NewPipeTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/NewPipeTest.java @@ -43,9 +43,4 @@ public class NewPipeTest { assertEquals(getServiceByUrl("https://soundcloud.com/pegboardnerds"), SoundCloud); assertEquals(getServiceByUrl("https://www.google.com/url?sa=t&url=https%3A%2F%2Fsoundcloud.com%2Fciaoproduction&rct=j&q=&esrc=s&source=web&cd="), SoundCloud); } - - @Test - public void getServiceNameWithId() throws Exception { - assertEquals(NewPipe.getNameOfService(YouTube.getServiceId()), YouTube.getServiceInfo().getName()); - } }