diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java index 48589cc3..40d15288 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java @@ -226,20 +226,20 @@ public class YoutubeParsingHelper { * @throws ParsingException If the playlistId is a Channel Mix or not a mix. */ public static String extractVideoIdFromMixId(final String playlistId) throws ParsingException { - if (playlistId.startsWith("RDMM")) { //My Mix + if (playlistId.startsWith("RDMM")) { // My Mix return playlistId.substring(4); - } else if (playlistId.startsWith("RDAMVM") || playlistId.startsWith("RDCLAK")) { //Music mix + } else if (isYoutubeMusicMixId(playlistId)) { // starts with "RDAMVM" or "RDCLAK" return playlistId.substring(6); - } else if (playlistId.startsWith("RMCM")) { //Channel mix - //Channel mix are build with RMCM{channelId}, so videoId can't be determined + } else if (isYoutubeChannelMixId(playlistId)) { // starts with "RMCM" + // Channel mix are build with RMCM{channelId}, so videoId can't be determined throw new ParsingException("Video id could not be determined from mix id: " + playlistId); - } else if (playlistId.startsWith("RD")) { // Normal mix + } else if (isYoutubeMixId(playlistId)) { // normal mix, starts with "RD" return playlistId.substring(2); - } else { //not a mix + } else { // not a mix throw new ParsingException("Video id could not be determined from mix id: " + playlistId); } }