From 82746d172f470dec6f88ff49c0815b8041d9f2d7 Mon Sep 17 00:00:00 2001 From: "Bri@n" Date: Sun, 1 Nov 2020 17:34:34 -0500 Subject: [PATCH] Fix typo in DonationLinkHelper and rewrote swtich statement --- .../schabi/newpipe/extractor/utils/DonationLinkHelper.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/DonationLinkHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/DonationLinkHelper.java index 817595ad0..eb7f35b1e 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/utils/DonationLinkHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/utils/DonationLinkHelper.java @@ -15,16 +15,14 @@ public class DonationLinkHelper { AMAZON, } - public static DonationService getDonatoinServiceByLink(String link) throws MalformedURLException { + public static DonationService getDonationServiceByLink(String link) throws MalformedURLException { URL url = new URL(fixLink(link)); switch (url.getHost()) { case "www.patreon.com": - return DonationService.PATREON; case "patreon.com": return DonationService.PATREON; - case "paypal.me": - return DonationService.PAYPAL; case "www.paypal.me": + case "paypal.me": return DonationService.PAYPAL; default: return DonationService.NO_DONATION;