From 41f689b099347bf0b63ca444eafc5b55bbede18c Mon Sep 17 00:00:00 2001 From: bopol Date: Tue, 16 Feb 2021 19:07:24 +0100 Subject: [PATCH] Update extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java Co-authored-by: Stypox --- .../youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java index d17f5ec9e..bff9d8277 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubeStreamLinkHandlerFactory.java @@ -40,7 +40,7 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory { private static final Pattern YOUTUBE_VIDEO_ID_REGEX_PATTERN = Pattern.compile("^([a-zA-Z0-9_-]{11})"); private static final YoutubeStreamLinkHandlerFactory instance = new YoutubeStreamLinkHandlerFactory(); - private static final List subpaths = Arrays.asList("embed/", "shorts/", "watch/", "v/", "w/"); + private static final List SUBPATHS = Arrays.asList("embed/", "shorts/", "watch/", "v/", "w/"); private YoutubeStreamLinkHandlerFactory() { } @@ -223,7 +223,7 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory { } private String getIdFromSubpathsInPath(String path) throws ParsingException { - for (final String subpath : subpaths) { + for (final String subpath : SUBPATHS) { if (path.startsWith(subpath)) { String id = path.substring(subpath.length()); return assertIsId(id);