Skip to content

Commit

Permalink
[YouTube] Fix Shorts' thumbnails extraction in their channel tab
Browse files Browse the repository at this point in the history
Wrong methods were used to access and extract the thumbnails' data.
This has been fixed with this commit.
  • Loading branch information
AudricV committed Nov 6, 2024
1 parent c343e31 commit 06b2c8e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

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;

/**
Expand Down Expand Up @@ -78,8 +78,8 @@ public String getUrl() throws ParsingException {
@Nonnull
@Override
public List<Image> getThumbnails() throws ParsingException {
return getThumbnailsFromInfoItem(shortsLockupViewModel.getObject("thumbnail")
.getObject("sources"));
return getImagesFromThumbnailsArray(shortsLockupViewModel.getObject("thumbnail")
.getArray("sources"));
}

@Override
Expand Down

0 comments on commit 06b2c8e

Please sign in to comment.