Merge pull request #5836 from BaronGreenback/comparisons

This commit is contained in:
Cody Robibero 2021-12-24 02:43:18 +00:00 committed by GitHub
commit 599fc9e671
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 9 additions and 14 deletions

View File

@ -180,7 +180,7 @@ namespace Emby.Server.Implementations.HttpServer
} }
WebSocketMessage<object>? stub; WebSocketMessage<object>? stub;
long bytesConsumed = 0; long bytesConsumed;
try try
{ {
stub = DeserializeWebSocketMessage(buffer, out bytesConsumed); stub = DeserializeWebSocketMessage(buffer, out bytesConsumed);

View File

@ -84,7 +84,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
Logger.LogInformation("Opening HDHR UDP Live stream from {Host}", uri.Host); Logger.LogInformation("Opening HDHR UDP Live stream from {Host}", uri.Host);
var remoteAddress = IPAddress.Parse(uri.Host); var remoteAddress = IPAddress.Parse(uri.Host);
IPAddress localAddress = null; IPAddress localAddress;
using (var tcpClient = new TcpClient()) using (var tcpClient = new TcpClient())
{ {
try try

View File

@ -732,7 +732,7 @@ namespace Jellyfin.Api.Controllers
else else
{ {
// For non series and movie types these columns are typically null // For non series and movie types these columns are typically null
isSeries = null; // isSeries = null;
isMovie = null; isMovie = null;
includeItemTypes.Add(item.GetBaseItemKind()); includeItemTypes.Add(item.GetBaseItemKind());
} }

View File

@ -365,7 +365,7 @@ namespace Jellyfin.Api.Controllers
} }
else if (string.Equals(segmentFormat, "mp4", StringComparison.OrdinalIgnoreCase)) else if (string.Equals(segmentFormat, "mp4", StringComparison.OrdinalIgnoreCase))
{ {
var outputFmp4HeaderArg = string.Empty; string outputFmp4HeaderArg;
if (OperatingSystem.IsWindows()) if (OperatingSystem.IsWindows())
{ {
// on Windows, the path of fmp4 header file needs to be configured // on Windows, the path of fmp4 header file needs to be configured

View File

@ -107,9 +107,7 @@ namespace MediaBrowser.Controller.LiveTv
{ {
if (!string.IsNullOrEmpty(Number)) if (!string.IsNullOrEmpty(Number))
{ {
double number = 0; if (double.TryParse(Number, NumberStyles.Any, CultureInfo.InvariantCulture, out double number))
if (double.TryParse(Number, NumberStyles.Any, CultureInfo.InvariantCulture, out number))
{ {
return string.Format(CultureInfo.InvariantCulture, "{0:00000.0}", number) + "-" + (Name ?? string.Empty); return string.Format(CultureInfo.InvariantCulture, "{0:00000.0}", number) + "-" + (Name ?? string.Empty);
} }

View File

@ -196,7 +196,7 @@ namespace MediaBrowser.LocalMetadata.Images
added = AddImage(files, images, "logo", imagePrefix, isInMixedFolder, ImageType.Logo); added = AddImage(files, images, "logo", imagePrefix, isInMixedFolder, ImageType.Logo);
if (!added) if (!added)
{ {
added = AddImage(files, images, "clearlogo", imagePrefix, isInMixedFolder, ImageType.Logo); AddImage(files, images, "clearlogo", imagePrefix, isInMixedFolder, ImageType.Logo);
} }
} }
@ -213,7 +213,7 @@ namespace MediaBrowser.LocalMetadata.Images
if (!added) if (!added)
{ {
added = AddImage(files, images, "disc", imagePrefix, isInMixedFolder, ImageType.Disc); AddImage(files, images, "disc", imagePrefix, isInMixedFolder, ImageType.Disc);
} }
} }
else if (item is Video || item is BoxSet) else if (item is Video || item is BoxSet)
@ -227,7 +227,7 @@ namespace MediaBrowser.LocalMetadata.Images
if (!added) if (!added)
{ {
added = AddImage(files, images, "discart", imagePrefix, isInMixedFolder, ImageType.Disc); AddImage(files, images, "discart", imagePrefix, isInMixedFolder, ImageType.Disc);
} }
} }
@ -243,7 +243,7 @@ namespace MediaBrowser.LocalMetadata.Images
added = AddImage(files, images, "landscape", imagePrefix, isInMixedFolder, ImageType.Thumb); added = AddImage(files, images, "landscape", imagePrefix, isInMixedFolder, ImageType.Thumb);
if (!added) if (!added)
{ {
added = AddImage(files, images, "thumb", imagePrefix, isInMixedFolder, ImageType.Thumb); AddImage(files, images, "thumb", imagePrefix, isInMixedFolder, ImageType.Thumb);
} }
} }

View File

@ -78,21 +78,18 @@ namespace MediaBrowser.Providers.MediaInfo
string[] subtitleDownloadLanguages; string[] subtitleDownloadLanguages;
bool skipIfEmbeddedSubtitlesPresent; bool skipIfEmbeddedSubtitlesPresent;
bool skipIfAudioTrackMatches; bool skipIfAudioTrackMatches;
bool requirePerfectMatch;
if (libraryOptions.SubtitleDownloadLanguages == null) if (libraryOptions.SubtitleDownloadLanguages == null)
{ {
subtitleDownloadLanguages = options.DownloadLanguages; subtitleDownloadLanguages = options.DownloadLanguages;
skipIfEmbeddedSubtitlesPresent = options.SkipIfEmbeddedSubtitlesPresent; skipIfEmbeddedSubtitlesPresent = options.SkipIfEmbeddedSubtitlesPresent;
skipIfAudioTrackMatches = options.SkipIfAudioTrackMatches; skipIfAudioTrackMatches = options.SkipIfAudioTrackMatches;
requirePerfectMatch = options.RequirePerfectMatch;
} }
else else
{ {
subtitleDownloadLanguages = libraryOptions.SubtitleDownloadLanguages; subtitleDownloadLanguages = libraryOptions.SubtitleDownloadLanguages;
skipIfEmbeddedSubtitlesPresent = libraryOptions.SkipSubtitlesIfEmbeddedSubtitlesPresent; skipIfEmbeddedSubtitlesPresent = libraryOptions.SkipSubtitlesIfEmbeddedSubtitlesPresent;
skipIfAudioTrackMatches = libraryOptions.SkipSubtitlesIfAudioTrackMatches; skipIfAudioTrackMatches = libraryOptions.SkipSubtitlesIfAudioTrackMatches;
requirePerfectMatch = libraryOptions.RequirePerfectSubtitleMatch;
} }
foreach (var lang in subtitleDownloadLanguages) foreach (var lang in subtitleDownloadLanguages)