mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-09 17:28:48 +01:00
Fix some warnings
This commit is contained in:
@@ -237,7 +237,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||
|
||||
if (requiresRefresh)
|
||||
{
|
||||
await _libraryManager.ValidateMediaLibrary(new SimpleProgress<double>(), CancellationToken.None);
|
||||
await _libraryManager.ValidateMediaLibrary(new SimpleProgress<double>(), CancellationToken.None).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -501,7 +501,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
|
||||
public async Task<List<NameIdPair>> GetHeadends(ListingsProviderInfo info, string country, string location, CancellationToken cancellationToken)
|
||||
{
|
||||
var token = await GetToken(info, cancellationToken);
|
||||
var token = await GetToken(info, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var lineups = new List<NameIdPair>();
|
||||
|
||||
@@ -713,7 +713,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
|
||||
private async Task AddLineupToAccount(ListingsProviderInfo info, CancellationToken cancellationToken)
|
||||
{
|
||||
var token = await GetToken(info, cancellationToken);
|
||||
var token = await GetToken(info, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
@@ -738,7 +738,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
|
||||
httpOptions.RequestHeaders["token"] = token;
|
||||
|
||||
using (await _httpClient.SendAsync(httpOptions, "PUT"))
|
||||
using (await _httpClient.SendAsync(httpOptions, "PUT").ConfigureAwait(false))
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -750,7 +750,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
throw new ArgumentException("Listings Id required");
|
||||
}
|
||||
|
||||
var token = await GetToken(info, cancellationToken);
|
||||
var token = await GetToken(info, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
@@ -833,7 +833,7 @@ namespace Emby.Server.Implementations.LiveTv.Listings
|
||||
throw new Exception("ListingsId required");
|
||||
}
|
||||
|
||||
var token = await GetToken(info, cancellationToken);
|
||||
var token = await GetToken(info, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (string.IsNullOrEmpty(token))
|
||||
{
|
||||
|
||||
@@ -38,8 +38,8 @@ namespace Emby.Server.Implementations.LiveTv
|
||||
/// <returns>IEnumerable{BaseTaskTrigger}.</returns>
|
||||
public IEnumerable<TaskTriggerInfo> GetDefaultTriggers()
|
||||
{
|
||||
return new[] {
|
||||
|
||||
return new[]
|
||||
{
|
||||
// Every so often
|
||||
new TaskTriggerInfo { Type = TaskTriggerInfo.TriggerInterval, IntervalTicks = TimeSpan.FromHours(24).Ticks}
|
||||
};
|
||||
|
||||
@@ -185,7 +185,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
Url = string.Format("{0}/tuners.html", GetApiUrl(info)),
|
||||
CancellationToken = cancellationToken,
|
||||
BufferContent = false
|
||||
}, HttpMethod.Get))
|
||||
}, HttpMethod.Get).ConfigureAwait(false))
|
||||
using (var stream = response.Content)
|
||||
using (var sr = new StreamReader(stream, System.Text.Encoding.UTF8))
|
||||
{
|
||||
@@ -259,7 +259,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
for (int i = 0; i < model.TunerCount; ++i)
|
||||
{
|
||||
var name = string.Format("Tuner {0}", i + 1);
|
||||
var currentChannel = "none"; /// @todo Get current channel and map back to Station Id
|
||||
var currentChannel = "none"; // @todo Get current channel and map back to Station Id
|
||||
var isAvailable = await manager.CheckTunerAvailability(ipInfo, i, cancellationToken).ConfigureAwait(false);
|
||||
var status = isAvailable ? LiveTvTunerStatus.Available : LiveTvTunerStatus.LiveTv;
|
||||
tuners.Add(new LiveTvTunerInfo
|
||||
@@ -298,7 +298,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
|
||||
public async Task<List<LiveTvTunerInfo>> GetTunerInfos(TunerHostInfo info, CancellationToken cancellationToken)
|
||||
{
|
||||
// TODO Need faster way to determine UDP vs HTTP
|
||||
var channels = await GetChannels(info, true, cancellationToken);
|
||||
var channels = await GetChannels(info, true, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
var hdHomerunChannelInfo = channels.FirstOrDefault() as HdHomerunChannelInfo;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user