Skip to content

Commit a376792

Browse files
committed
[Youtube] Handle case where url is in "youtube.com/playlist?list=listID" format.
This occurs when sharing a mix from the official youtube app.
1 parent 327a573 commit a376792

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ public boolean onAcceptUrl(final String url) {
7575
* If it is a mix (auto-generated playlist) url, return a Linkhandler where the url is like
7676
* youtube.com/watch?v=videoId&list=playlistId
7777
* <p>Otherwise use super</p>
78-
* @param url
79-
* @return
80-
* @throws ParsingException
8178
*/
8279
@Override
8380
public ListLinkHandler fromUrl(String url) throws ParsingException {
@@ -86,6 +83,9 @@ public ListLinkHandler fromUrl(String url) throws ParsingException {
8683
String listID = Utils.getQueryValue(urlObj, "list");
8784
if (listID != null && YoutubeParsingHelper.isYoutubeMixId(listID)) {
8885
String videoID = Utils.getQueryValue(urlObj, "v");
86+
if (videoID == null) {
87+
videoID = listID.substring(2);
88+
}
8989
String newUrl = "https://www.youtube.com/watch?v=" + videoID + "&list=" + listID;
9090
return new ListLinkHandler(new LinkHandler(url, newUrl, listID), getContentFilter(url),
9191
getSortFilter(url));

0 commit comments

Comments
 (0)