mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-31 07:28:26 +00:00
Make MediaBrowser.MediaEncoding warnings free
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
@@ -48,7 +49,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
/// <returns>System.String.</returns>
|
||||
private static string GetFileInputArgument(string path)
|
||||
{
|
||||
if (path.IndexOf("://") != -1)
|
||||
if (path.IndexOf("://", StringComparison.Ordinal) != -1)
|
||||
{
|
||||
return string.Format(CultureInfo.InvariantCulture, "\"{0}\"", path);
|
||||
}
|
||||
@@ -67,7 +68,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
private static string NormalizePath(string path)
|
||||
{
|
||||
// Quotes are valid path characters in linux and they need to be escaped here with a leading \
|
||||
return path.Replace("\"", "\\\"");
|
||||
return path.Replace("\"", "\\\"", StringComparison.Ordinal);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
var args = extractChapters
|
||||
? "{0} -i {1} -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
|
||||
: "{0} -i {1} -threads 0 -v warning -print_format json -show_streams -show_format";
|
||||
args = string.Format(args, probeSizeArgument, inputPath).Trim();
|
||||
args = string.Format(CultureInfo.InvariantCulture, args, probeSizeArgument, inputPath).Trim();
|
||||
|
||||
var process = new Process
|
||||
{
|
||||
@@ -856,7 +856,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
||||
// https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping
|
||||
// We need to double escape
|
||||
|
||||
return path.Replace('\\', '/').Replace(":", "\\:").Replace("'", "'\\\\\\''");
|
||||
return path.Replace('\\', '/').Replace(":", "\\:", StringComparison.Ordinal).Replace("'", "'\\\\\\''", StringComparison.Ordinal);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user