From 06b2c8e2aaaf8eeca144a709a183c68e153a6b49 Mon Sep 17 00:00:00 2001 From: AudricV <74829229+AudricV@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:20:40 +0100 Subject: [PATCH] [YouTube] Fix Shorts' thumbnails extraction in their channel tab Wrong methods were used to access and extract the thumbnails' data. This has been fixed with this commit. --- .../extractors/YoutubeShortsLockupInfoItemExtractor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeShortsLockupInfoItemExtractor.java b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeShortsLockupInfoItemExtractor.java index eeaa82a5a..939d609b6 100644 --- a/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeShortsLockupInfoItemExtractor.java +++ b/extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeShortsLockupInfoItemExtractor.java @@ -14,7 +14,7 @@ import javax.annotation.Nullable; import java.util.List; -import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getThumbnailsFromInfoItem; +import static org.schabi.newpipe.extractor.services.youtube.YoutubeParsingHelper.getImagesFromThumbnailsArray; import static org.schabi.newpipe.extractor.utils.Utils.isNullOrEmpty; /** @@ -78,8 +78,8 @@ public class YoutubeShortsLockupInfoItemExtractor implements StreamInfoItemExtra @Nonnull @Override public List getThumbnails() throws ParsingException { - return getThumbnailsFromInfoItem(shortsLockupViewModel.getObject("thumbnail") - .getObject("sources")); + return getImagesFromThumbnailsArray(shortsLockupViewModel.getObject("thumbnail") + .getArray("sources")); } @Override