Skip to content

Commit 451bb13

Browse files
committed
YouTube channel mixes no longer exist
It looks like YT removed this around autumn 2024 Other mentions: https://www.reddit.com/r/youtube/comments/1dhuvyo/channel_mixes_disappeared/
1 parent ee7d8b0 commit 451bb13

File tree

4 files changed

+0
-98
lines changed

4 files changed

+0
-98
lines changed

extractor/src/main/java/org/schabi/newpipe/extractor/playlist/PlaylistInfo.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,6 @@ public enum PlaylistType {
4242
*/
4343
MIX_MUSIC,
4444

45-
/**
46-
* A mix made only of streams from (or related to) the same channel, for example YouTube
47-
* channel mixes
48-
*/
49-
MIX_CHANNEL,
50-
5145
/**
5246
* A mix made only of streams related to a particular (musical) genre, for example YouTube
5347
* genre mixes

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/YoutubeParsingHelper.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -359,16 +359,6 @@ public static boolean isYoutubeMusicMixId(@Nonnull final String playlistId) {
359359
return playlistId.startsWith("RDAMVM") || playlistId.startsWith("RDCLAK");
360360
}
361361

362-
/**
363-
* Checks if the given playlist id is a YouTube Channel Mix (auto-generated playlist)
364-
* Ids from a YouTube channel Mix start with "RDCM"
365-
*
366-
* @return Whether given id belongs to a YouTube Channel Mix
367-
*/
368-
public static boolean isYoutubeChannelMixId(@Nonnull final String playlistId) {
369-
return playlistId.startsWith("RDCM");
370-
}
371-
372362
/**
373363
* Checks if the given playlist id is a YouTube Genre Mix (auto-generated playlist)
374364
* Ids from a YouTube Genre Mix start with "RDGMEM"
@@ -399,11 +389,6 @@ public static String extractVideoIdFromMixId(final String playlistId)
399389
} else if (isYoutubeMusicMixId(playlistId)) {
400390
return playlistId.substring(6);
401391

402-
} else if (isYoutubeChannelMixId(playlistId)) {
403-
// Channel mixes are of the form RMCM{channelId}, so videoId can't be determined
404-
throw new ParsingException("Video id could not be determined from channel mix id: "
405-
+ playlistId);
406-
407392
} else if (isYoutubeGenreMixId(playlistId)) {
408393
// Genre mixes are of the form RDGMEM{garbage}, so videoId can't be determined
409394
throw new ParsingException("Video id could not be determined from genre mix id: "
@@ -438,8 +423,6 @@ public static PlaylistInfo.PlaylistType extractPlaylistTypeFromPlaylistId(
438423
throw new ParsingException("Could not extract playlist type from empty playlist id");
439424
} else if (isYoutubeMusicMixId(playlistId)) {
440425
return PlaylistInfo.PlaylistType.MIX_MUSIC;
441-
} else if (isYoutubeChannelMixId(playlistId)) {
442-
return PlaylistInfo.PlaylistType.MIX_CHANNEL;
443426
} else if (isYoutubeGenreMixId(playlistId)) {
444427
return PlaylistInfo.PlaylistType.MIX_GENRE;
445428
} else if (isYoutubeMixId(playlistId)) { // normal mix

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/linkHandler/YoutubePlaylistLinkHandlerFactory.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.schabi.newpipe.extractor.services.youtube.linkHandler;
22

3-
import org.schabi.newpipe.extractor.exceptions.ContentNotSupportedException;
43
import org.schabi.newpipe.extractor.exceptions.ParsingException;
54
import org.schabi.newpipe.extractor.linkhandler.LinkHandler;
65
import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler;
@@ -57,14 +56,6 @@ public String getId(final String url) throws ParsingException, UnsupportedOperat
5756
"the list-ID given in the URL does not match the list pattern");
5857
}
5958

60-
if (YoutubeParsingHelper.isYoutubeChannelMixId(listID)
61-
&& Utils.getQueryValue(urlObj, "v") == null) {
62-
// Video id can't be determined from the channel mix id.
63-
// See YoutubeParsingHelper#extractVideoIdFromMixId
64-
throw new ContentNotSupportedException(
65-
"Channel Mix without a video id are not supported");
66-
}
67-
6859
return listID;
6960
} catch (final Exception exception) {
7061
throw new ParsingException("Error could not parse URL: " + exception.getMessage(),

extractor/src/test/java/org/schabi/newpipe/extractor/services/youtube/YoutubeMixPlaylistExtractorTest.java

Lines changed: 0 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -336,72 +336,6 @@ void invalidVideoId() throws Exception {
336336
}
337337
}
338338

339-
public static class ChannelMix {
340-
private static final String CHANNEL_ID = "UCXuqSBlHAE6Xw-yeJA0Tunw";
341-
private static final String VIDEO_ID_OF_CHANNEL = "mnk6gnOBYIo";
342-
private static final String CHANNEL_TITLE = "Linus Tech Tips";
343-
344-
345-
@BeforeAll
346-
public static void setUp() throws Exception {
347-
YoutubeTestsUtils.ensureStateless();
348-
YoutubeParsingHelper.setConsentAccepted(true);
349-
NewPipe.init(DownloaderFactory.getDownloader(RESOURCE_PATH + "channelMix"));
350-
extractor = (YoutubeMixPlaylistExtractor) YouTube
351-
.getPlaylistExtractor("https://www.youtube.com/watch?v=" + VIDEO_ID_OF_CHANNEL
352-
+ "&list=RDCM" + CHANNEL_ID);
353-
extractor.fetchPage();
354-
}
355-
356-
@Test
357-
void getName() throws Exception {
358-
final String name = extractor.getName();
359-
ExtractorAsserts.assertContains("Mix", name);
360-
ExtractorAsserts.assertContains(CHANNEL_TITLE, name);
361-
}
362-
363-
@Test
364-
void getThumbnails() throws Exception {
365-
YoutubeTestsUtils.testImages(extractor.getThumbnails());
366-
extractor.getThumbnails().forEach(thumbnail ->
367-
ExtractorAsserts.assertContains(VIDEO_ID_OF_CHANNEL, thumbnail.getUrl()));
368-
}
369-
370-
@Test
371-
void getInitialPage() throws Exception {
372-
final InfoItemsPage<StreamInfoItem> streams = extractor.getInitialPage();
373-
assertFalse(streams.getItems().isEmpty());
374-
assertTrue(streams.hasNextPage());
375-
}
376-
377-
@Test
378-
void getPage() throws Exception {
379-
final byte[] body = JsonWriter.string(prepareDesktopJsonBuilder(
380-
NewPipe.getPreferredLocalization(), NewPipe.getPreferredContentCountry())
381-
.value("videoId", VIDEO_ID_OF_CHANNEL)
382-
.value("playlistId", "RDCM" + CHANNEL_ID)
383-
.value("params", "OAE%3D")
384-
.done())
385-
.getBytes(StandardCharsets.UTF_8);
386-
387-
final InfoItemsPage<StreamInfoItem> streams = extractor.getPage(new Page(
388-
YOUTUBEI_V1_URL + "next?" + DISABLE_PRETTY_PRINT_PARAMETER,
389-
null, null, dummyCookie, body));
390-
assertFalse(streams.getItems().isEmpty());
391-
assertTrue(streams.hasNextPage());
392-
}
393-
394-
@Test
395-
void getStreamCount() {
396-
assertEquals(ListExtractor.ITEM_COUNT_INFINITE, extractor.getStreamCount());
397-
}
398-
399-
@Test
400-
void getPlaylistType() throws ParsingException {
401-
assertEquals(PlaylistInfo.PlaylistType.MIX_CHANNEL, extractor.getPlaylistType());
402-
}
403-
}
404-
405339
public static class GenreMix {
406340
private static final String VIDEO_ID = "kINJeTNFbpg";
407341
private static final String MIX_TITLE = "Mix – Electronic music";

0 commit comments

Comments
 (0)