feat(Thumbnail): Support sources in Thumbnail.fromResponse (#552)

This commit is contained in:
absidue
2023-12-04 17:50:08 +01:00
committed by GitHub
parent 37ae55a7c3
commit 48a5d4e7c3
6 changed files with 30 additions and 35 deletions

View File

@@ -10,7 +10,7 @@ export default class ContentPreviewImageView extends YTNode {
constructor(data: RawNode) {
super();
this.image = data.image.sources.map((x: any) => new Thumbnail(x)).sort((a: Thumbnail, b: Thumbnail) => b.width - a.width);
this.image = Thumbnail.fromResponse(data.image);
this.style = data.style;
}
}