mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-12-24 09:00:31 +00:00
Fix bug lower case id
This method was passing the lowercase url
This commit is contained in:
parent
319d769233
commit
07f6d0f149
@ -15,7 +15,6 @@ import java.io.UnsupportedEncodingException;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.util.regex.Matcher;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Christian Schabesberger on 02.02.16.
|
* Created by Christian Schabesberger on 02.02.16.
|
||||||
@ -149,12 +148,14 @@ public class YoutubeStreamUrlIdHandler implements UrlIdHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean acceptUrl(String videoUrl) {
|
public boolean acceptUrl(String videoUrl) {
|
||||||
|
String originalUrl = videoUrl;
|
||||||
|
|
||||||
videoUrl = videoUrl.toLowerCase();
|
videoUrl = videoUrl.toLowerCase();
|
||||||
if(videoUrl.contains("youtube") ||
|
if(videoUrl.contains("youtube") ||
|
||||||
videoUrl.contains("youtu.be")) {
|
videoUrl.contains("youtu.be")) {
|
||||||
// bad programming I know
|
// bad programming I know
|
||||||
try {
|
try {
|
||||||
getId(videoUrl);
|
getId(originalUrl);
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user