File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -4,22 +4,26 @@ interface ThumbnailData {
4
4
}
5
5
export interface HasThumbnails {
6
6
thumbURL200 ?: string ;
7
+ thumbUrl200 ?: string ;
7
8
thumbnail256 ?: string ;
8
9
thumbURL500 ?: string ;
10
+ thumbUrl500 ?: string ;
9
11
thumbURL1000 ?: string ;
12
+ thumbUrl1000 ?: string ;
10
13
thumbURL2000 ?: string ;
14
+ thumbUrl2000 ?: string ;
11
15
}
12
16
13
17
export function GetThumbnailInfo (
14
18
item : HasThumbnails ,
15
19
minimumSize : number ,
16
20
) : ThumbnailData | undefined {
17
21
const thumbnails : ThumbnailData [ ] = [
18
- { size : 200 , url : item . thumbURL200 } ,
22
+ { size : 200 , url : item . thumbUrl200 ?? item . thumbURL200 } ,
19
23
{ size : 256 , url : item . thumbnail256 } ,
20
- { size : 500 , url : item . thumbURL500 } ,
21
- { size : 1000 , url : item . thumbURL1000 } ,
22
- { size : 2000 , url : item . thumbURL2000 } ,
24
+ { size : 500 , url : item . thumbUrl500 ?? item . thumbURL500 } ,
25
+ { size : 1000 , url : item . thumbUrl1000 ?? item . thumbURL1000 } ,
26
+ { size : 2000 , url : item . thumbUrl2000 ?? item . thumbURL2000 } ,
23
27
] . filter ( ( thumb ) => thumb . url ) ;
24
28
const biggestAvailableThumbnail = thumbnails [ thumbnails . length - 1 ] ;
25
29
if ( minimumSize > biggestAvailableThumbnail ?. size ) {
You can’t perform that action at this time.
0 commit comments