Fix bug lower case id

This method was passing the lowercase url
This commit is contained in:
Mauricio Colli 2017-02-25 18:15:50 -03:00
parent 319d769233
commit 07f6d0f149

View file

@ -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;