mirror of
https://github.com/TeamNewPipe/NewPipeExtractor.git
synced 2024-12-14 06:10:33 +05:30
Don't call getUploaderInfo() in onFetchPage() for playlists
This way YouTube Music playlists will keep working in NewPipe
This commit is contained in:
parent
2399d46ab0
commit
951ed9f0d8
@ -28,7 +28,6 @@ import javax.annotation.Nonnull;
|
|||||||
@SuppressWarnings("WeakerAccess")
|
@SuppressWarnings("WeakerAccess")
|
||||||
public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
||||||
private JsonObject initialData;
|
private JsonObject initialData;
|
||||||
private JsonObject uploaderInfo;
|
|
||||||
private JsonObject playlistInfo;
|
private JsonObject playlistInfo;
|
||||||
|
|
||||||
public YoutubePlaylistExtractor(StreamingService service, ListLinkHandler linkHandler) {
|
public YoutubePlaylistExtractor(StreamingService service, ListLinkHandler linkHandler) {
|
||||||
@ -57,7 +56,6 @@ public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initialData = ajaxJson.getObject(1).getObject("response");
|
initialData = ajaxJson.getObject(1).getObject("response");
|
||||||
uploaderInfo = getUploaderInfo();
|
|
||||||
playlistInfo = getPlaylistInfo();
|
playlistInfo = getPlaylistInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -140,7 +138,7 @@ public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
|||||||
public String getUploaderUrl() throws ParsingException {
|
public String getUploaderUrl() throws ParsingException {
|
||||||
try {
|
try {
|
||||||
return YoutubeChannelExtractor.CHANNEL_URL_BASE +
|
return YoutubeChannelExtractor.CHANNEL_URL_BASE +
|
||||||
uploaderInfo.getObject("navigationEndpoint").getObject("browseEndpoint").getString("browseId");
|
getUploaderInfo().getObject("navigationEndpoint").getObject("browseEndpoint").getString("browseId");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ParsingException("Could not get playlist uploader url", e);
|
throw new ParsingException("Could not get playlist uploader url", e);
|
||||||
}
|
}
|
||||||
@ -149,7 +147,7 @@ public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
|||||||
@Override
|
@Override
|
||||||
public String getUploaderName() throws ParsingException {
|
public String getUploaderName() throws ParsingException {
|
||||||
try {
|
try {
|
||||||
return uploaderInfo.getObject("title").getArray("runs").getObject(0).getString("text");
|
return getUploaderInfo().getObject("title").getArray("runs").getObject(0).getString("text");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ParsingException("Could not get playlist uploader name", e);
|
throw new ParsingException("Could not get playlist uploader name", e);
|
||||||
}
|
}
|
||||||
@ -158,7 +156,7 @@ public class YoutubePlaylistExtractor extends PlaylistExtractor {
|
|||||||
@Override
|
@Override
|
||||||
public String getUploaderAvatarUrl() throws ParsingException {
|
public String getUploaderAvatarUrl() throws ParsingException {
|
||||||
try {
|
try {
|
||||||
return uploaderInfo.getObject("thumbnail").getArray("thumbnails").getObject(0).getString("url");
|
return getUploaderInfo().getObject("thumbnail").getArray("thumbnails").getObject(0).getString("url");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ParsingException("Could not get playlist uploader avatar", e);
|
throw new ParsingException("Could not get playlist uploader avatar", e);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user