don't buffer responses by default
This commit is contained in:
parent
3d4d2212f3
commit
345ad10665
|
@ -116,7 +116,6 @@ namespace MediaBrowser.Common.Net
|
|||
public HttpRequestOptions()
|
||||
{
|
||||
EnableHttpCompression = true;
|
||||
BufferContent = true;
|
||||
|
||||
RequestHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
|
|
|
@ -162,8 +162,7 @@ namespace MediaBrowser.Providers.BoxSets
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -319,8 +319,7 @@ namespace MediaBrowser.Providers.BoxSets
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,7 +129,8 @@ namespace MediaBrowser.Providers.Manager
|
|||
{
|
||||
CancellationToken = cancellationToken,
|
||||
ResourcePool = resourcePool,
|
||||
Url = url
|
||||
Url = url,
|
||||
BufferContent = false
|
||||
|
||||
}).ConfigureAwait(false);
|
||||
|
||||
|
|
|
@ -222,8 +222,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = FanartArtistProvider.Current.FanArtResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -286,7 +285,8 @@ namespace MediaBrowser.Providers.Movies
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = FanartArtistProvider.Current.FanArtResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
|
|
@ -220,8 +220,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -434,6 +434,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
options.ResourcePool = MovieDbResourcePool;
|
||||
_lastRequestTicks = DateTime.UtcNow.Ticks;
|
||||
|
||||
options.BufferContent = true;
|
||||
options.UserAgent = "Emby/" + _appHost.ApplicationVersion;
|
||||
|
||||
return await _httpClient.Get(options).ConfigureAwait(false);
|
||||
|
|
|
@ -46,8 +46,7 @@ namespace MediaBrowser.Providers.Movies
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,8 +87,7 @@ namespace MediaBrowser.Providers.Music
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = AudioDbArtistProvider.Current.AudioDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -164,7 +164,6 @@ namespace MediaBrowser.Providers.Music
|
|||
using (var response = await _httpClient.Get(new HttpRequestOptions
|
||||
{
|
||||
Url = url,
|
||||
ResourcePool = AudioDbArtistProvider.Current.AudioDbResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
|
|
|
@ -129,8 +129,7 @@ namespace MediaBrowser.Providers.Music
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = AudioDbArtistProvider.Current.AudioDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -152,7 +152,8 @@ namespace MediaBrowser.Providers.Music
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = AudioDbResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
|
|
@ -211,8 +211,7 @@ namespace MediaBrowser.Providers.Music
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = FanartArtistProvider.Current.FanArtResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -256,7 +256,8 @@ namespace MediaBrowser.Providers.Music
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = FanArtResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
|
|
@ -70,9 +70,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = OmdbProvider.ResourcePool
|
||||
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -131,7 +131,8 @@ namespace MediaBrowser.Providers.Omdb
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = OmdbProvider.ResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
@ -296,8 +297,7 @@ namespace MediaBrowser.Providers.Omdb
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = OmdbProvider.ResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -300,7 +300,8 @@ namespace MediaBrowser.Providers.Omdb
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = ResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
@ -340,7 +341,8 @@ namespace MediaBrowser.Providers.Omdb
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = ResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
|
|
@ -135,8 +135,7 @@ namespace MediaBrowser.Providers.People
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -408,8 +408,7 @@ namespace MediaBrowser.Providers.People
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -216,8 +216,7 @@ namespace MediaBrowser.Providers.People
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = TvdbSeriesProvider.Current.TvDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -224,8 +224,7 @@ namespace MediaBrowser.Providers.TV
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = FanartArtistProvider.Current.FanArtResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -320,7 +320,8 @@ namespace MediaBrowser.Providers.TV
|
|||
{
|
||||
Url = url,
|
||||
ResourcePool = FanartArtistProvider.Current.FanArtResourcePool,
|
||||
CancellationToken = cancellationToken
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = true
|
||||
|
||||
}).ConfigureAwait(false))
|
||||
{
|
||||
|
|
|
@ -121,8 +121,7 @@ namespace MediaBrowser.Providers.TV
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -194,8 +194,7 @@ namespace MediaBrowser.Providers.TV
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -656,8 +656,7 @@ namespace MediaBrowser.Providers.TV
|
|||
return _httpClient.GetResponse(new HttpRequestOptions
|
||||
{
|
||||
CancellationToken = cancellationToken,
|
||||
Url = url,
|
||||
ResourcePool = MovieDbProvider.Current.MovieDbResourcePool
|
||||
Url = url
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user