From 070a40e181be3bf37b2ac2d2112a47bc6990a104 Mon Sep 17 00:00:00 2001 From: TobiGr Date: Thu, 25 Mar 2021 21:47:10 +0100 Subject: [PATCH] [YouTube] Mix Playlist - Fix getting name --- .../youtube/extractors/YoutubeMixPlaylistExtractor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeMixPlaylistExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeMixPlaylistExtractor.java index 1957f2cc..140392cc 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeMixPlaylistExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeMixPlaylistExtractor.java @@ -13,6 +13,7 @@ import org.schabi.newpipe.extractor.exceptions.ParsingException; import org.schabi.newpipe.extractor.linkhandler.ListLinkHandler; import org.schabi.newpipe.extractor.localization.TimeAgoParser; import org.schabi.newpipe.extractor.playlist.PlaylistExtractor; +import org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper; import org.schabi.newpipe.extractor.stream.StreamInfoItem; import org.schabi.newpipe.extractor.stream.StreamInfoItemsCollector; import org.schabi.newpipe.extractor.utils.JsonUtils; @@ -67,8 +68,8 @@ public class YoutubeMixPlaylistExtractor extends PlaylistExtractor { @Nonnull @Override public String getName() throws ParsingException { - final String name = playlistData.getString("title"); - if (name == null) { + final String name = YoutubeParsingHelper.getTextAtKey(playlistData, "title"); + if (isNullOrEmpty(name)) { throw new ParsingException("Could not get playlist name"); } return name;