mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-17 22:43:07 +03:00
Make MediaBrowser.MediaEncoding warnings free
This commit is contained in:
@@ -42,7 +42,8 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
var info = new MediaInfo
|
||||
{
|
||||
Path = path,
|
||||
Protocol = protocol
|
||||
Protocol = protocol,
|
||||
VideoType = videoType
|
||||
};
|
||||
|
||||
FFProbeHelpers.NormalizeFFProbeResult(data);
|
||||
@@ -1133,7 +1134,7 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
{
|
||||
// Only use the comma as a delimeter if there are no slashes or pipes.
|
||||
// We want to be careful not to split names that have commas in them
|
||||
var delimeter = !allowCommaDelimiter || _nameDelimiters.Any(i => val.IndexOf(i) != -1) ?
|
||||
var delimeter = !allowCommaDelimiter || _nameDelimiters.Any(i => val.IndexOf(i, StringComparison.Ordinal) != -1) ?
|
||||
_nameDelimiters :
|
||||
new[] { ',' };
|
||||
|
||||
@@ -1377,8 +1378,8 @@ namespace MediaBrowser.MediaEncoding.Probing
|
||||
if (subtitle.Contains('/', StringComparison.Ordinal)) // It contains a episode number and season number
|
||||
{
|
||||
string[] numbers = subtitle.Split(' ');
|
||||
video.IndexNumber = int.Parse(numbers[0].Replace(".", string.Empty, StringComparison.Ordinal).Split('/')[0]);
|
||||
int totalEpisodesInSeason = int.Parse(numbers[0].Replace(".", string.Empty, StringComparison.Ordinal).Split('/')[1]);
|
||||
video.IndexNumber = int.Parse(numbers[0].Replace(".", string.Empty, StringComparison.Ordinal).Split('/')[0], CultureInfo.InvariantCulture);
|
||||
int totalEpisodesInSeason = int.Parse(numbers[0].Replace(".", string.Empty, StringComparison.Ordinal).Split('/')[1], CultureInfo.InvariantCulture);
|
||||
|
||||
description = string.Join(" ", numbers, 1, numbers.Length - 1).Trim(); // Skip the first, concatenate the rest, clean up spaces and save it
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user