[YouTube] Return mqdefault thumbnails in feed
The hqdefault thumbnails, which are used by default, have black bars at the top and at the bottom, and are thus not optimal.
This commit is contained in:
parent
884da40f65
commit
93ef73e2f2
|
@ -91,6 +91,10 @@ public class YoutubeFeedInfoItemExtractor implements StreamInfoItemExtractor {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getThumbnailUrl() {
|
public String getThumbnailUrl() {
|
||||||
return entryElement.getElementsByTag("media:thumbnail").first().attr("url");
|
// The hqdefault thumbnail has some black bars at the top and at the bottom, while the
|
||||||
|
// mqdefault doesn't, so return the mqdefault one. It should always exist, according to
|
||||||
|
// https://stackoverflow.com/a/20542029/9481500.
|
||||||
|
return entryElement.getElementsByTag("media:thumbnail").first().attr("url")
|
||||||
|
.replace("hqdefault", "mqdefault");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue