From 07f6d0f14975aa7c0e5eddf441337754f80ef824 Mon Sep 17 00:00:00 2001 From: Mauricio Colli Date: Sat, 25 Feb 2017 18:15:50 -0300 Subject: [PATCH] Fix bug lower case id This method was passing the lowercase url --- .../services/youtube/YoutubeStreamUrlIdHandler.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamUrlIdHandler.java b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamUrlIdHandler.java index 355da0402..0d52612da 100644 --- a/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamUrlIdHandler.java +++ b/app/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeStreamUrlIdHandler.java @@ -15,7 +15,6 @@ import java.io.UnsupportedEncodingException; import java.net.URI; import java.net.URISyntaxException; import java.net.URLDecoder; -import java.util.regex.Matcher; /** * Created by Christian Schabesberger on 02.02.16. @@ -149,12 +148,14 @@ public class YoutubeStreamUrlIdHandler implements UrlIdHandler { @Override public boolean acceptUrl(String videoUrl) { + String originalUrl = videoUrl; + videoUrl = videoUrl.toLowerCase(); if(videoUrl.contains("youtube") || videoUrl.contains("youtu.be")) { // bad programming I know try { - getId(videoUrl); + getId(originalUrl); return true; } catch (Exception e) { return false;