mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Merge pull request #3983 from Bond-009/useragent
Fix incorrect adding of user agent
This commit is contained in:
commit
8510333bcc
@ -740,11 +740,11 @@ namespace MediaBrowser.Providers.Music
|
|||||||
|
|
||||||
// MusicBrainz request a contact email address is supplied, as comment, in user agent field:
|
// MusicBrainz request a contact email address is supplied, as comment, in user agent field:
|
||||||
// https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting#User-Agent
|
// https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting#User-Agent
|
||||||
options.Headers.UserAgent.Add(new ProductInfoHeaderValue(string.Format(
|
options.Headers.UserAgent.ParseAdd(string.Format(
|
||||||
CultureInfo.InvariantCulture,
|
CultureInfo.InvariantCulture,
|
||||||
"{0} ( {1} )",
|
"{0} ( {1} )",
|
||||||
_appHost.ApplicationUserAgent,
|
_appHost.ApplicationUserAgent,
|
||||||
_appHost.ApplicationUserAgentAddress)));
|
_appHost.ApplicationUserAgentAddress));
|
||||||
|
|
||||||
HttpResponseMessage response;
|
HttpResponseMessage response;
|
||||||
var attempts = 0u;
|
var attempts = 0u;
|
||||||
|
@ -382,7 +382,7 @@ namespace MediaBrowser.Providers.Plugins.Tmdb.Movies
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
internal Task<HttpResponseMessage> GetMovieDbResponse(HttpRequestMessage message)
|
internal Task<HttpResponseMessage> GetMovieDbResponse(HttpRequestMessage message)
|
||||||
{
|
{
|
||||||
message.Headers.UserAgent.Add(new ProductInfoHeaderValue(_appHost.ApplicationUserAgent));
|
message.Headers.UserAgent.ParseAdd(_appHost.ApplicationUserAgent);
|
||||||
return _httpClientFactory.CreateClient().SendAsync(message);
|
return _httpClientFactory.CreateClient().SendAsync(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user