File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -179,17 +179,20 @@ export class SongAPI {
179179
180180 return search . recordings [ 0 ] ;
181181 }
182-
182+
183183 private async querySongCoverArt ( song : MBRecordingSearchResult ) : Promise < string | undefined > {
184184 for ( let i = 0 ; i < song . releases . length && i < 5 ; i ++ ) {
185185 const rel = song . releases [ i ] ;
186+ const sizes = [ "-small" , "-250" , "-500" , "" ]
186187
187188 try {
188- const url = `${ COVERARCH } /release/${ rel . id } /front` ;
189- const image = await this . httpGet ( url ) ;
189+ for ( const size of sizes ) {
190+ const url = `${ COVERARCH } /release/${ rel . id } /front${ size } ` ;
191+ const image = await this . httpGet ( url ) ;
190192
191- if ( image . ok )
192- return url ;
193+ if ( image . ok )
194+ return url ;
195+ }
193196 } catch {
194197
195198 }
You can’t perform that action at this time.
0 commit comments