@@ -95,11 +95,15 @@ public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(SeriesInfo s
95
95
96
96
if ( metadata . HasMetadata )
97
97
{
98
+ var seriesId = metadata . Item . ProviderIds . GetOrDefault ( ProviderNames . AniDb ) ;
99
+ var imageProvider = new AniDbImageProvider ( _httpClient , _appPaths ) ;
100
+ var images = await imageProvider . GetImages ( seriesId , cancellationToken ) ;
98
101
var res = new RemoteSearchResult
99
102
{
100
103
Name = metadata . Item . Name ,
101
104
PremiereDate = metadata . Item . PremiereDate ,
102
105
ProductionYear = metadata . Item . ProductionYear ,
106
+ ImageUrl = images . Any ( ) ? images . First ( ) . Url : null ,
103
107
ProviderIds = metadata . Item . ProviderIds ,
104
108
SearchProviderName = Name
105
109
} ;
@@ -114,6 +118,7 @@ public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken can
114
118
{
115
119
return _httpClient . GetResponse ( new HttpRequestOptions
116
120
{
121
+ UserAgent = Constants . UserAgent ,
117
122
CancellationToken = cancellationToken ,
118
123
Url = url
119
124
} ) ;
@@ -518,6 +523,7 @@ private static async Task DownloadSeriesData(string aid, string seriesDataPath,
518
523
519
524
var requestOptions = new HttpRequestOptions
520
525
{
526
+ UserAgent = Constants . UserAgent ,
521
527
Url = string . Format ( SeriesQueryUrl , ClientName , aid ) ,
522
528
CancellationToken = cancellationToken
523
529
} ;
0 commit comments