Fix styling

This commit is contained in:
crobibero 2020-09-01 07:58:05 -06:00
parent 39041019e7
commit b111b9e2c9
2 changed files with 17 additions and 13 deletions

View File

@ -785,10 +785,16 @@ namespace Emby.Server.Implementations.LiveTv.Listings
var station = allStations.FirstOrDefault(item => string.Equals(item.stationID, map.stationID, StringComparison.OrdinalIgnoreCase)); var station = allStations.FirstOrDefault(item => string.Equals(item.stationID, map.stationID, StringComparison.OrdinalIgnoreCase));
if (station == null) if (station == null)
{ {
station = new ScheduleDirect.Station {stationID = map.stationID}; station = new ScheduleDirect.Station { stationID = map.stationID };
} }
var channelInfo = new ChannelInfo {Id = station.stationID, CallSign = station.callsign, Number = channelNumber, Name = string.IsNullOrWhiteSpace(station.name) ? channelNumber : station.name}; var channelInfo = new ChannelInfo
{
Id = station.stationID,
CallSign = station.callsign,
Number = channelNumber,
Name = string.IsNullOrWhiteSpace(station.name) ? channelNumber : station.name
};
if (station.logo != null) if (station.logo != null)
{ {

View File

@ -128,17 +128,15 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
try try
{ {
Logger.LogInformation("Beginning {0} stream to {1}", GetType().Name, TempFilePath); Logger.LogInformation("Beginning {0} stream to {1}", GetType().Name, TempFilePath);
using (response) using var message = response;
await using (var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) await using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);
await using (var fileStream = new FileStream(TempFilePath, FileMode.Create, FileAccess.Write, FileShare.Read)) await using var fileStream = new FileStream(TempFilePath, FileMode.Create, FileAccess.Write, FileShare.Read);
{ await StreamHelper.CopyToAsync(
await StreamHelper.CopyToAsync( stream,
stream, fileStream,
fileStream, IODefaults.CopyToBufferSize,
IODefaults.CopyToBufferSize, () => Resolve(openTaskCompletionSource),
() => Resolve(openTaskCompletionSource), cancellationToken).ConfigureAwait(false);
cancellationToken).ConfigureAwait(false);
}
} }
catch (OperationCanceledException ex) catch (OperationCanceledException ex)
{ {