Browse Source

Fix warning: Qualifier is redundant (#2149)

KonH 3 years ago
parent
commit
e3fccd5ae6

+ 1 - 1
Jellyfin.Api/Helpers/AudioHelper.cs

@@ -147,7 +147,7 @@ namespace Jellyfin.Api.Helpers
             }
 
             var outputPath = state.OutputFilePath;
-            var outputPathExists = System.IO.File.Exists(outputPath);
+            var outputPathExists = File.Exists(outputPath);
 
             var transcodingJob = _transcodingJobHelper.GetTranscodingJob(outputPath, TranscodingJobType.Progressive);
             var isTranscodeCached = outputPathExists && transcodingJob != null;

+ 3 - 3
Jellyfin.Server/Program.cs

@@ -594,7 +594,7 @@ namespace Jellyfin.Server
             try
             {
                 // Serilog.Log is used by SerilogLoggerFactory when no logger is specified
-                Serilog.Log.Logger = new LoggerConfiguration()
+                Log.Logger = new LoggerConfiguration()
                     .ReadFrom.Configuration(configuration)
                     .Enrich.FromLogContext()
                     .Enrich.WithThreadId()
@@ -602,7 +602,7 @@ namespace Jellyfin.Server
             }
             catch (Exception ex)
             {
-                Serilog.Log.Logger = new LoggerConfiguration()
+                Log.Logger = new LoggerConfiguration()
                     .WriteTo.Console(outputTemplate: "[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}")
                     .WriteTo.Async(x => x.File(
                         Path.Combine(appPaths.LogDirectoryPath, "log_.log"),
@@ -613,7 +613,7 @@ namespace Jellyfin.Server
                     .Enrich.WithThreadId()
                     .CreateLogger();
 
-                Serilog.Log.Logger.Fatal(ex, "Failed to create/read logger configuration");
+                Log.Logger.Fatal(ex, "Failed to create/read logger configuration");
             }
         }
 

+ 1 - 1
MediaBrowser.Controller/Entities/BaseItem.cs

@@ -2997,7 +2997,7 @@ namespace MediaBrowser.Controller.Entities
         }
 
         /// <inheritdoc />
-        public bool Equals(BaseItem other) => object.Equals(Id, other?.Id);
+        public bool Equals(BaseItem other) => Equals(Id, other?.Id);
 
         /// <inheritdoc />
         public override int GetHashCode() => HashCode.Combine(Id);

+ 1 - 1
MediaBrowser.Controller/Entities/BaseItemExtensions.cs

@@ -44,7 +44,7 @@ namespace MediaBrowser.Controller.Entities
         /// <param name="file">The file.</param>
         public static void SetImagePath(this BaseItem item, ImageType imageType, string file)
         {
-            if (file.StartsWith("http", System.StringComparison.OrdinalIgnoreCase))
+            if (file.StartsWith("http", StringComparison.OrdinalIgnoreCase))
             {
                 item.SetImage(
                 new ItemImageInfo

+ 1 - 1
MediaBrowser.MediaEncoding/BdInfo/BdInfoDirectoryInfo.cs

@@ -75,7 +75,7 @@ namespace MediaBrowser.MediaEncoding.BdInfo
                 x => new BdInfoFileInfo(x));
         }
 
-        public static IDirectoryInfo FromFileSystemPath(Model.IO.IFileSystem fs, string path)
+        public static IDirectoryInfo FromFileSystemPath(IFileSystem fs, string path)
         {
             return new BdInfoDirectoryInfo(fs, path);
         }

+ 1 - 1
RSSDP/SsdpCommunicationsServer.cs

@@ -395,7 +395,7 @@ namespace Rssdp.Infrastructure
                         // Strange cannot convert compiler error here if I don't explicitly
                         // assign or cast to Action first. Assignment is easier to read,
                         // so went with that.
-                        ProcessMessage(System.Text.UTF8Encoding.UTF8.GetString(result.Buffer, 0, result.ReceivedBytes), result.RemoteEndPoint, result.LocalIPAddress);
+                        ProcessMessage(UTF8Encoding.UTF8.GetString(result.Buffer, 0, result.ReceivedBytes), result.RemoteEndPoint, result.LocalIPAddress);
                     }
                 }
                 catch (ObjectDisposedException)