mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-17 23:56:44 +00:00
ReSharper conform to 'var' settings
This commit is contained in:
@@ -152,7 +152,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
|
||||
private string GetProcessOutput(string path, string arguments)
|
||||
{
|
||||
IProcess process = _processFactory.Create(new ProcessOptions
|
||||
var process = _processFactory.Create(new ProcessOptions
|
||||
{
|
||||
CreateNoWindow = true,
|
||||
UseShellExecute = false,
|
||||
|
||||
@@ -457,7 +457,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
/// <param name="inputFiles">The input files.</param>
|
||||
/// <param name="protocol">The protocol.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
/// <exception cref="System.ArgumentException">Unrecognized InputType</exception>
|
||||
/// <exception cref="ArgumentException">Unrecognized InputType</exception>
|
||||
public string GetInputArgument(string[] inputFiles, MediaProtocol protocol)
|
||||
{
|
||||
return EncodingUtils.GetInputArgument(inputFiles.ToList(), protocol);
|
||||
|
||||
@@ -300,7 +300,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
private void ReadFromDictNode(XmlReader reader, MediaInfo info)
|
||||
{
|
||||
string currentKey = null;
|
||||
List<NameValuePair> pairs = new List<NameValuePair>();
|
||||
var pairs = new List<NameValuePair>();
|
||||
|
||||
reader.MoveToContent();
|
||||
reader.Read();
|
||||
@@ -360,7 +360,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
private List<NameValuePair> ReadValueArray(XmlReader reader)
|
||||
{
|
||||
|
||||
List<NameValuePair> pairs = new List<NameValuePair>();
|
||||
var pairs = new List<NameValuePair>();
|
||||
|
||||
reader.MoveToContent();
|
||||
reader.Read();
|
||||
@@ -881,7 +881,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
}
|
||||
}
|
||||
|
||||
private void SetSize(InternalMediaInfoResult data, Model.MediaInfo.MediaInfo info)
|
||||
private void SetSize(InternalMediaInfoResult data, MediaInfo info)
|
||||
{
|
||||
if (data.format != null)
|
||||
{
|
||||
@@ -901,7 +901,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
var composer = FFProbeHelpers.GetDictionaryValue(tags, "composer");
|
||||
if (!string.IsNullOrWhiteSpace(composer))
|
||||
{
|
||||
List<BaseItemPerson> peoples = new List<BaseItemPerson>();
|
||||
var peoples = new List<BaseItemPerson>();
|
||||
foreach (var person in Split(composer, false))
|
||||
{
|
||||
peoples.Add(new BaseItemPerson { Name = person, Type = PersonType.Composer });
|
||||
@@ -932,7 +932,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(writer))
|
||||
{
|
||||
List<BaseItemPerson> peoples = new List<BaseItemPerson>();
|
||||
var peoples = new List<BaseItemPerson>();
|
||||
foreach (var person in Split(writer, false))
|
||||
{
|
||||
peoples.Add(new BaseItemPerson { Name = person, Type = PersonType.Writer });
|
||||
@@ -1125,7 +1125,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
if (!string.IsNullOrEmpty(val))
|
||||
{
|
||||
var studios = Split(val, true);
|
||||
List<string> studioList = new List<string>();
|
||||
var studioList = new List<string>();
|
||||
|
||||
foreach (var studio in studios)
|
||||
{
|
||||
@@ -1160,7 +1160,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
|
||||
if (!string.IsNullOrEmpty(val))
|
||||
{
|
||||
List<string> genres = new List<string>(info.Genres);
|
||||
var genres = new List<string>(info.Genres);
|
||||
foreach (var genre in Split(val, true))
|
||||
{
|
||||
genres.Add(genre);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken)
|
||||
{
|
||||
var trackInfo = new SubtitleTrackInfo();
|
||||
List<SubtitleTrackEvent> trackEvents = new List<SubtitleTrackEvent>();
|
||||
var trackEvents = new List<SubtitleTrackEvent>();
|
||||
var eventIndex = 1;
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken)
|
||||
{
|
||||
var trackInfo = new SubtitleTrackInfo();
|
||||
List<SubtitleTrackEvent> trackEvents = new List<SubtitleTrackEvent>();
|
||||
var trackEvents = new List<SubtitleTrackEvent>();
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
string line;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
public SubtitleTrackInfo Parse(Stream stream, CancellationToken cancellationToken)
|
||||
{
|
||||
var trackInfo = new SubtitleTrackInfo();
|
||||
List<SubtitleTrackEvent> trackEvents = new List<SubtitleTrackEvent>();
|
||||
var trackEvents = new List<SubtitleTrackEvent>();
|
||||
|
||||
using (var reader = new StreamReader(stream))
|
||||
{
|
||||
|
||||
@@ -408,7 +408,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
/// <param name="outputPath">The output path.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">
|
||||
/// <exception cref="ArgumentNullException">
|
||||
/// inputPath
|
||||
/// or
|
||||
/// outputPath
|
||||
@@ -525,7 +525,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
/// <param name="outputPath">The output path.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentException">Must use inputPath list overload</exception>
|
||||
/// <exception cref="ArgumentException">Must use inputPath list overload</exception>
|
||||
private async Task ExtractTextSubtitle(
|
||||
string[] inputFiles,
|
||||
MediaProtocol protocol,
|
||||
@@ -734,7 +734,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
if (protocol == MediaProtocol.Http)
|
||||
{
|
||||
HttpRequestOptions opts = new HttpRequestOptions()
|
||||
var opts = new HttpRequestOptions()
|
||||
{
|
||||
Url = path,
|
||||
CancellationToken = cancellationToken
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
TimeSpan startTime = TimeSpan.FromTicks(trackEvent.StartPositionTicks);
|
||||
TimeSpan endTime = TimeSpan.FromTicks(trackEvent.EndPositionTicks);
|
||||
var startTime = TimeSpan.FromTicks(trackEvent.StartPositionTicks);
|
||||
var endTime = TimeSpan.FromTicks(trackEvent.EndPositionTicks);
|
||||
|
||||
// make sure the start and end times are different and seqential
|
||||
if (endTime.TotalMilliseconds <= startTime.TotalMilliseconds)
|
||||
|
||||
Reference in New Issue
Block a user