mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-05-30 19:55:08 -04:00
Remove some warnings
This commit is contained in:
parent
cf7e365610
commit
c99b45dbe0
@ -136,19 +136,15 @@ namespace Emby.Common.Implementations.Serialization
|
|||||||
return ServiceStack.Text.JsonSerializer.DeserializeFromStream<T>(stream);
|
return ServiceStack.Text.JsonSerializer.DeserializeFromStream<T>(stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<T> DeserializeFromStreamAsync<T>(Stream stream)
|
public Task<T> DeserializeFromStreamAsync<T>(Stream stream)
|
||||||
{
|
{
|
||||||
if (stream == null)
|
if (stream == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException("stream");
|
throw new ArgumentNullException("stream");
|
||||||
}
|
}
|
||||||
|
|
||||||
using (var reader = new StreamReader(stream))
|
|
||||||
{
|
|
||||||
var json = await reader.ReadToEndAsync().ConfigureAwait(false);
|
|
||||||
|
|
||||||
return ServiceStack.Text.JsonSerializer.DeserializeFromString<T>(json);
|
return ServiceStack.Text.JsonSerializer.DeserializeFromStreamAsync<T>(stream);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -41,13 +41,11 @@ namespace MediaBrowser.Common.Updates
|
|||||||
}
|
}
|
||||||
|
|
||||||
using (var response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false))
|
using (var response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false))
|
||||||
|
using (var stream = response.Content)
|
||||||
{
|
{
|
||||||
using (var stream = response.Content)
|
var obj = await _jsonSerializer.DeserializeFromStreamAsync<RootObject[]>(stream).ConfigureAwait(false);
|
||||||
{
|
|
||||||
var obj = _jsonSerializer.DeserializeFromStream<RootObject[]>(stream);
|
|
||||||
|
|
||||||
return CheckForUpdateResult(obj, minVersion, updateLevel, assetFilename, packageName, targetFilename);
|
return CheckForUpdateResult(obj, minVersion, updateLevel, assetFilename, packageName, targetFilename);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,19 +112,17 @@ namespace MediaBrowser.Common.Updates
|
|||||||
};
|
};
|
||||||
|
|
||||||
using (var response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false))
|
using (var response = await _httpClient.SendAsync(options, "GET").ConfigureAwait(false))
|
||||||
|
using (var stream = response.Content)
|
||||||
{
|
{
|
||||||
using (var stream = response.Content)
|
var obj = await _jsonSerializer.DeserializeFromStreamAsync<RootObject[]>(stream).ConfigureAwait(false);
|
||||||
{
|
|
||||||
var obj = _jsonSerializer.DeserializeFromStream<RootObject[]>(stream);
|
|
||||||
|
|
||||||
obj = obj.Where(i => (i.assets ?? new List<Asset>()).Any(a => IsAsset(a, assetFilename, i.tag_name))).ToArray();
|
obj = obj.Where(i => (i.assets ?? new List<Asset>()).Any(a => IsAsset(a, assetFilename, i.tag_name))).ToArray();
|
||||||
|
|
||||||
list.AddRange(obj.Where(i => MatchesUpdateLevel(i, PackageVersionClass.Release)).OrderByDescending(GetVersion).Take(1));
|
list.AddRange(obj.Where(i => MatchesUpdateLevel(i, PackageVersionClass.Release)).OrderByDescending(GetVersion).Take(1));
|
||||||
list.AddRange(obj.Where(i => MatchesUpdateLevel(i, PackageVersionClass.Beta)).OrderByDescending(GetVersion).Take(1));
|
list.AddRange(obj.Where(i => MatchesUpdateLevel(i, PackageVersionClass.Beta)).OrderByDescending(GetVersion).Take(1));
|
||||||
list.AddRange(obj.Where(i => MatchesUpdateLevel(i, PackageVersionClass.Dev)).OrderByDescending(GetVersion).Take(1));
|
list.AddRange(obj.Where(i => MatchesUpdateLevel(i, PackageVersionClass.Dev)).OrderByDescending(GetVersion).Take(1));
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
using MediaBrowser.Controller.Providers;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.Configuration;
|
using MediaBrowser.Model.Configuration;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Model.Serialization;
|
||||||
using System;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities
|
namespace MediaBrowser.Controller.Entities
|
||||||
{
|
{
|
||||||
|
@ -11,13 +11,10 @@ namespace MediaBrowser.Controller.MediaEncoding
|
|||||||
{
|
{
|
||||||
public string OutputDirectory { get; set; }
|
public string OutputDirectory { get; set; }
|
||||||
|
|
||||||
public string DeviceId { get; set; }
|
|
||||||
public string ItemId { get; set; }
|
public string ItemId { get; set; }
|
||||||
public string MediaSourceId { get; set; }
|
public string MediaSourceId { get; set; }
|
||||||
public string AudioCodec { get; set; }
|
public string AudioCodec { get; set; }
|
||||||
|
|
||||||
public DeviceProfile DeviceProfile { get; set; }
|
|
||||||
|
|
||||||
public bool ReadInputAtNativeFramerate { get; set; }
|
public bool ReadInputAtNativeFramerate { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1,18 +1,10 @@
|
|||||||
using MediaBrowser.Controller.Library;
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.MediaEncoding;
|
using MediaBrowser.Controller.MediaEncoding;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
using MediaBrowser.Model.Drawing;
|
|
||||||
using MediaBrowser.Model.Dto;
|
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using MediaBrowser.Model.MediaInfo;
|
|
||||||
using MediaBrowser.Model.Net;
|
using MediaBrowser.Model.Net;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.MediaEncoding.Encoder
|
namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
@ -153,7 +145,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
{
|
{
|
||||||
var ticks = transcodingPosition.HasValue ? transcodingPosition.Value.Ticks : (long?)null;
|
var ticks = transcodingPosition.HasValue ? transcodingPosition.Value.Ticks : (long?)null;
|
||||||
|
|
||||||
// job.Framerate = framerate;
|
//job.Framerate = framerate;
|
||||||
|
|
||||||
if (!percentComplete.HasValue && ticks.HasValue && RunTimeTicks.HasValue)
|
if (!percentComplete.HasValue && ticks.HasValue && RunTimeTicks.HasValue)
|
||||||
{
|
{
|
||||||
@ -166,8 +158,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
Progress.Report(percentComplete.Value);
|
Progress.Report(percentComplete.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
// job.TranscodingPositionTicks = ticks;
|
/*
|
||||||
// job.BytesTranscoded = bytesTranscoded;
|
job.TranscodingPositionTicks = ticks;
|
||||||
|
job.BytesTranscoded = bytesTranscoded;
|
||||||
|
|
||||||
var deviceId = Options.DeviceId;
|
var deviceId = Options.DeviceId;
|
||||||
|
|
||||||
@ -176,21 +169,21 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
var audioCodec = ActualOutputVideoCodec;
|
var audioCodec = ActualOutputVideoCodec;
|
||||||
var videoCodec = ActualOutputVideoCodec;
|
var videoCodec = ActualOutputVideoCodec;
|
||||||
|
|
||||||
// SessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
SessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
||||||
// {
|
{
|
||||||
// Bitrate = job.TotalOutputBitrate,
|
Bitrate = job.TotalOutputBitrate,
|
||||||
// AudioCodec = audioCodec,
|
AudioCodec = audioCodec,
|
||||||
// VideoCodec = videoCodec,
|
VideoCodec = videoCodec,
|
||||||
// Container = job.Options.OutputContainer,
|
Container = job.Options.OutputContainer,
|
||||||
// Framerate = framerate,
|
Framerate = framerate,
|
||||||
// CompletionPercentage = percentComplete,
|
CompletionPercentage = percentComplete,
|
||||||
// Width = job.OutputWidth,
|
Width = job.OutputWidth,
|
||||||
// Height = job.OutputHeight,
|
Height = job.OutputHeight,
|
||||||
// AudioChannels = job.OutputAudioChannels,
|
AudioChannels = job.OutputAudioChannels,
|
||||||
// IsAudioDirect = string.Equals(job.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase),
|
IsAudioDirect = string.Equals(job.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase),
|
||||||
// IsVideoDirect = string.Equals(job.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)
|
IsVideoDirect = string.Equals(job.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)
|
||||||
// });
|
});
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,12 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
using MediaBrowser.Common.Configuration;
|
using MediaBrowser.Common.Configuration;
|
||||||
|
|
||||||
using MediaBrowser.Common.Net;
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Common.Progress;
|
using MediaBrowser.Common.Progress;
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using MediaBrowser.Model.Net;
|
using MediaBrowser.Model.Net;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.MediaEncoding.Encoder
|
namespace MediaBrowser.MediaEncoding.Encoder
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ using MediaBrowser.Controller.MediaEncoding;
|
|||||||
using MediaBrowser.Controller.Session;
|
using MediaBrowser.Controller.Session;
|
||||||
using MediaBrowser.MediaEncoding.Probing;
|
using MediaBrowser.MediaEncoding.Probing;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
using MediaBrowser.Model.Dto;
|
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
@ -550,7 +549,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||||||
{
|
{
|
||||||
//process.BeginErrorReadLine();
|
//process.BeginErrorReadLine();
|
||||||
|
|
||||||
var result = _jsonSerializer.DeserializeFromStream<InternalMediaInfoResult>(process.StandardOutput.BaseStream);
|
var result = await _jsonSerializer.DeserializeFromStreamAsync<InternalMediaInfoResult>(process.StandardOutput.BaseStream).ConfigureAwait(false);
|
||||||
|
|
||||||
if (result == null || (result.streams == null && result.format == null))
|
if (result == null || (result.streams == null && result.format == null))
|
||||||
{
|
{
|
||||||
|
@ -1,20 +1,17 @@
|
|||||||
using MediaBrowser.Model.Dto;
|
using System;
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using MediaBrowser.Model.Extensions;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using MediaBrowser.Model.IO;
|
|
||||||
|
|
||||||
using MediaBrowser.Controller.IO;
|
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Model.Dto;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
using MediaBrowser.Model.Extensions;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using MediaBrowser.Model.MediaInfo;
|
using MediaBrowser.Model.MediaInfo;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MediaBrowser.MediaEncoding.Probing
|
namespace MediaBrowser.MediaEncoding.Probing
|
||||||
{
|
{
|
||||||
|
@ -1,31 +1,29 @@
|
|||||||
using MediaBrowser.Common.Net;
|
using System;
|
||||||
using MediaBrowser.Controller;
|
|
||||||
using MediaBrowser.Controller.Configuration;
|
|
||||||
using MediaBrowser.Controller.Entities;
|
|
||||||
using MediaBrowser.Controller.Entities.Audio;
|
|
||||||
using MediaBrowser.Controller.Entities.Movies;
|
|
||||||
using MediaBrowser.Controller.Entities.TV;
|
|
||||||
using MediaBrowser.Controller.Library;
|
|
||||||
using MediaBrowser.Controller.LiveTv;
|
|
||||||
using MediaBrowser.Controller.Providers;
|
|
||||||
using MediaBrowser.Model.Configuration;
|
|
||||||
using MediaBrowser.Model.Entities;
|
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
using MediaBrowser.Model.Providers;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Common.Net;
|
||||||
using MediaBrowser.Common.Progress;
|
using MediaBrowser.Common.Progress;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Controller;
|
||||||
|
using MediaBrowser.Controller.Configuration;
|
||||||
using MediaBrowser.Controller.Dto;
|
using MediaBrowser.Controller.Dto;
|
||||||
using MediaBrowser.Model.Events;
|
using MediaBrowser.Controller.Entities;
|
||||||
using MediaBrowser.Model.Serialization;
|
using MediaBrowser.Controller.Entities.Audio;
|
||||||
using Priority_Queue;
|
using MediaBrowser.Controller.Entities.Movies;
|
||||||
using MediaBrowser.Model.Extensions;
|
using MediaBrowser.Controller.Entities.TV;
|
||||||
|
using MediaBrowser.Controller.Library;
|
||||||
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Controller.Subtitles;
|
using MediaBrowser.Controller.Subtitles;
|
||||||
|
using MediaBrowser.Model.Configuration;
|
||||||
|
using MediaBrowser.Model.Entities;
|
||||||
|
using MediaBrowser.Model.Events;
|
||||||
|
using MediaBrowser.Model.IO;
|
||||||
|
using MediaBrowser.Model.Providers;
|
||||||
|
using MediaBrowser.Model.Serialization;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Priority_Queue;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.Manager
|
namespace MediaBrowser.Providers.Manager
|
||||||
{
|
{
|
||||||
@ -827,7 +825,7 @@ namespace MediaBrowser.Providers.Manager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
// Logged at lower levels
|
// Logged at lower levels
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using MediaBrowser.Controller.Entities;
|
using System.IO;
|
||||||
using MediaBrowser.Controller.Providers;
|
|
||||||
using MediaBrowser.XbmcMetadata.Savers;
|
|
||||||
using System.IO;
|
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
using MediaBrowser.Controller.Providers;
|
||||||
using MediaBrowser.Model.IO;
|
using MediaBrowser.Model.IO;
|
||||||
|
using MediaBrowser.XbmcMetadata.Savers;
|
||||||
|
|
||||||
namespace MediaBrowser.XbmcMetadata.Providers
|
namespace MediaBrowser.XbmcMetadata.Providers
|
||||||
{
|
{
|
||||||
@ -13,7 +13,7 @@ namespace MediaBrowser.XbmcMetadata.Providers
|
|||||||
{
|
{
|
||||||
protected IFileSystem FileSystem;
|
protected IFileSystem FileSystem;
|
||||||
|
|
||||||
public async Task<MetadataResult<T>> GetMetadata(ItemInfo info,
|
public Task<MetadataResult<T>> GetMetadata(ItemInfo info,
|
||||||
IDirectoryService directoryService,
|
IDirectoryService directoryService,
|
||||||
CancellationToken cancellationToken)
|
CancellationToken cancellationToken)
|
||||||
{
|
{
|
||||||
@ -23,7 +23,7 @@ namespace MediaBrowser.XbmcMetadata.Providers
|
|||||||
|
|
||||||
if (file == null)
|
if (file == null)
|
||||||
{
|
{
|
||||||
return result;
|
return Task.FromResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
var path = file.FullName;
|
var path = file.FullName;
|
||||||
@ -44,7 +44,7 @@ namespace MediaBrowser.XbmcMetadata.Providers
|
|||||||
result.HasMetadata = false;
|
result.HasMetadata = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return Task.FromResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void Fetch(MetadataResult<T> result, string path, CancellationToken cancellationToken);
|
protected abstract void Fetch(MetadataResult<T> result, string path, CancellationToken cancellationToken);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user