@@ -80,30 +80,26 @@ private async void MoreInfoForm_Shown(object sender, EventArgs e)
8080 lblGenre . Text = string . Join ( ", " , data . GenreList . Select ( cx => cx . Key ) ) ;
8181 if ( Properties . Settings . Default . ClientOptions . ResizeImagesAndPosters )
8282 {
83- var imageBytes = await _apiLib . ResizeImageBytesAsync ( "224x308" , data . Image ) ;
83+ var imageBytes = await _apiLib . ResizeImageAsync ( "224x308" , data . Image ) ;
8484 picPoster . Image = ClientUtils . BytesToImage ( imageBytes ) ;
8585 }
8686 else
8787 {
88- using ( var webClient = new WebClient ( ) )
89- {
90- picPoster . Image = ClientUtils . BytesToImage ( await webClient . DownloadDataTaskAsync ( data . Image ) ) ;
91- }
88+ var imageBytes = await ApiUtils . GetBytesAsync ( data . Image ) ;
89+ picPoster . Image = ClientUtils . BytesToImage ( imageBytes ) ;
9290 }
9391 foreach ( var act in data . ActorList . Take ( 6 ) )
9492 {
9593 var uc = new CastUserControl ( ) ;
9694 if ( Properties . Settings . Default . ClientOptions . ResizeImagesAndPosters )
9795 {
98- var imageBytes = await _apiLib . ResizeImageBytesAsync ( "96x132" , act . Image ) ;
96+ var imageBytes = await _apiLib . ResizeImageAsync ( "96x132" , act . Image ) ;
9997 uc . CastImage = ClientUtils . BytesToImage ( imageBytes ) ;
10098 }
10199 else
102100 {
103- using ( var webClient = new WebClient ( ) )
104- {
105- uc . CastImage = ClientUtils . BytesToImage ( await webClient . DownloadDataTaskAsync ( act . Image ) ) ;
106- }
101+ var imageBytes = await ApiUtils . GetBytesAsync ( act . Image ) ;
102+ uc . CastImage = ClientUtils . BytesToImage ( imageBytes ) ;
107103 }
108104 uc . CastName = act . Name ;
109105 uc . CastAsCharacter = act . AsCharacter ;
@@ -121,7 +117,7 @@ private void EnableControlls(bool enabled)
121117
122118 private void btnIMDb_Click ( object sender , EventArgs e )
123119 {
124- System . Diagnostics . Process . Start ( "https://imdb-api .com/title/" + _id ) ;
120+ System . Diagnostics . Process . Start ( $ "https://www. imdb.com/title/{ _id } " ) ;
125121 }
126122 }
127123}
0 commit comments