File tree Expand file tree Collapse file tree
extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,20 +226,20 @@ public static boolean isYoutubeChannelMixId(final String playlistId) {
226226 * @throws ParsingException If the playlistId is a Channel Mix or not a mix.
227227 */
228228 public static String extractVideoIdFromMixId (final String playlistId ) throws ParsingException {
229- if (playlistId .startsWith ("RDMM" )) { //My Mix
229+ if (playlistId .startsWith ("RDMM" )) { // My Mix
230230 return playlistId .substring (4 );
231231
232- } else if (playlistId . startsWith ( "RDAMVM" ) || playlistId . startsWith ( "RDCLAK" )) { //Music mix
232+ } else if (isYoutubeMusicMixId ( playlistId )) { // starts with "RDAMVM" or "RDCLAK"
233233 return playlistId .substring (6 );
234234
235- } else if (playlistId . startsWith ( "RMCM" )) { //Channel mix
236- //Channel mix are build with RMCM{channelId}, so videoId can't be determined
235+ } else if (isYoutubeChannelMixId ( playlistId )) { // starts with "RMCM"
236+ // Channel mix are build with RMCM{channelId}, so videoId can't be determined
237237 throw new ParsingException ("Video id could not be determined from mix id: " + playlistId );
238238
239- } else if (playlistId . startsWith ( "RD" )) { // Normal mix
239+ } else if (isYoutubeMixId ( playlistId )) { // normal mix, starts with "RD"
240240 return playlistId .substring (2 );
241241
242- } else { //not a mix
242+ } else { // not a mix
243243 throw new ParsingException ("Video id could not be determined from mix id: " + playlistId );
244244 }
245245 }
You can’t perform that action at this time.
0 commit comments