Skip to content

Commit a99af9b

Browse files
authored
Merge pull request #927 from Stypox/fix-feed-thumbnail
[YouTube] Return mqdefault thumbnails in fast feed
2 parents 14ef430 + 93ef73e commit a99af9b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

extractor/src/main/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeFeedInfoItemExtractor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ public String getUrl() {
9191

9292
@Override
9393
public String getThumbnailUrl() {
94-
return entryElement.getElementsByTag("media:thumbnail").first().attr("url");
94+
// The hqdefault thumbnail has some black bars at the top and at the bottom, while the
95+
// mqdefault doesn't, so return the mqdefault one. It should always exist, according to
96+
// https://stackoverflow.com/a/20542029/9481500.
97+
return entryElement.getElementsByTag("media:thumbnail").first().attr("url")
98+
.replace("hqdefault", "mqdefault");
9599
}
96100
}

0 commit comments

Comments
 (0)