Ver Fonte

Reduce string literal length by using verbatim string

Stepan Goremykin há 1 ano atrás
pai
commit
8ea812b65d

+ 1 - 1
Emby.Naming/Common/NamingOptions.cs

@@ -376,7 +376,7 @@ namespace Emby.Naming.Common
                     IsNamed = true,
                     IsNamed = true,
                     SupportsAbsoluteEpisodeNumbers = false
                     SupportsAbsoluteEpisodeNumbers = false
                 },
                 },
-                new EpisodeExpression("[\\/._ -]p(?:ar)?t[_. -]()([ivx]+|[0-9]+)([._ -][^\\/]*)$")
+                new EpisodeExpression(@"[\/._ -]p(?:ar)?t[_. -]()([ivx]+|[0-9]+)([._ -][^\/]*)$")
                 {
                 {
                     SupportsAbsoluteEpisodeNumbers = true
                     SupportsAbsoluteEpisodeNumbers = true
                 },
                 },

+ 1 - 1
Emby.Server.Implementations/IO/ManagedFileSystem.cs

@@ -91,7 +91,7 @@ namespace Emby.Server.Implementations.IO
             }
             }
 
 
             // unc path
             // unc path
-            if (filePath.StartsWith("\\\\", StringComparison.Ordinal))
+            if (filePath.StartsWith(@"\\", StringComparison.Ordinal))
             {
             {
                 return filePath;
                 return filePath;
             }
             }

+ 1 - 1
Emby.Server.Implementations/Library/Resolvers/TV/SeasonResolver.cs

@@ -62,7 +62,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
                     var resolver = new Naming.TV.EpisodeResolver(namingOptions);
                     var resolver = new Naming.TV.EpisodeResolver(namingOptions);
 
 
                     var folderName = System.IO.Path.GetFileName(path);
                     var folderName = System.IO.Path.GetFileName(path);
-                    var testPath = "\\\\test\\" + folderName;
+                    var testPath = @"\\test\" + folderName;
 
 
                     var episodeInfo = resolver.Resolve(testPath, true);
                     var episodeInfo = resolver.Resolve(testPath, true);
 
 

+ 1 - 1
Jellyfin.Server.Implementations/Users/UserManager.cs

@@ -103,7 +103,7 @@ namespace Jellyfin.Server.Implementations.Users
         // This is some regex that matches only on unicode "word" characters, as well as -, _ and @
         // This is some regex that matches only on unicode "word" characters, as well as -, _ and @
         // In theory this will cut out most if not all 'control' characters which should help minimize any weirdness
         // In theory this will cut out most if not all 'control' characters which should help minimize any weirdness
         // Usernames can contain letters (a-z + whatever else unicode is cool with), numbers (0-9), at-signs (@), dashes (-), underscores (_), apostrophes ('), periods (.) and spaces ( )
         // Usernames can contain letters (a-z + whatever else unicode is cool with), numbers (0-9), at-signs (@), dashes (-), underscores (_), apostrophes ('), periods (.) and spaces ( )
-        [GeneratedRegex("^[\\w\\ \\-'._@]+$")]
+        [GeneratedRegex(@"^[\w\ \-'._@]+$")]
         private static partial Regex ValidUsernameRegex();
         private static partial Regex ValidUsernameRegex();
 
 
         /// <inheritdoc/>
         /// <inheritdoc/>

+ 7 - 7
MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs

@@ -2947,7 +2947,7 @@ namespace MediaBrowser.Controller.MediaEncoding
 
 
                 return string.Format(
                 return string.Format(
                     CultureInfo.InvariantCulture,
                     CultureInfo.InvariantCulture,
-                    "scale=trunc(min(max(iw\\,ih*a)\\,min({0}\\,{1}*a))/{2})*{2}:trunc(min(max(iw/a\\,ih)\\,min({0}/a\\,{1}))/2)*2",
+                    @"scale=trunc(min(max(iw\,ih*a)\,min({0}\,{1}*a))/{2})*{2}:trunc(min(max(iw/a\,ih)\,min({0}/a\,{1}))/2)*2",
                     maxWidthParam,
                     maxWidthParam,
                     maxHeightParam,
                     maxHeightParam,
                     scaleVal);
                     scaleVal);
@@ -2989,7 +2989,7 @@ namespace MediaBrowser.Controller.MediaEncoding
 
 
                 return string.Format(
                 return string.Format(
                     CultureInfo.InvariantCulture,
                     CultureInfo.InvariantCulture,
-                    "scale=trunc(min(max(iw\\,ih*a)\\,{0})/{1})*{1}:trunc(ow/a/2)*2",
+                    @"scale=trunc(min(max(iw\,ih*a)\,{0})/{1})*{1}:trunc(ow/a/2)*2",
                     maxWidthParam,
                     maxWidthParam,
                     scaleVal);
                     scaleVal);
             }
             }
@@ -3001,7 +3001,7 @@ namespace MediaBrowser.Controller.MediaEncoding
 
 
                 return string.Format(
                 return string.Format(
                     CultureInfo.InvariantCulture,
                     CultureInfo.InvariantCulture,
-                    "scale=trunc(oh*a/{1})*{1}:min(max(iw/a\\,ih)\\,{0})",
+                    @"scale=trunc(oh*a/{1})*{1}:min(max(iw/a\,ih)\,{0})",
                     maxHeightParam,
                     maxHeightParam,
                     scaleVal);
                     scaleVal);
             }
             }
@@ -3021,19 +3021,19 @@ namespace MediaBrowser.Controller.MediaEncoding
                 switch (threedFormat.Value)
                 switch (threedFormat.Value)
                 {
                 {
                     case Video3DFormat.HalfSideBySide:
                     case Video3DFormat.HalfSideBySide:
-                        filter = "crop=iw/2:ih:0:0,scale=(iw*2):ih,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
+                        filter = @"crop=iw/2:ih:0:0,scale=(iw*2):ih,setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
                         // hsbs crop width in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth. Work out the correct height based on the display aspect it will maintain the aspect where -1 in this case (3d) may not.
                         // hsbs crop width in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth. Work out the correct height based on the display aspect it will maintain the aspect where -1 in this case (3d) may not.
                         break;
                         break;
                     case Video3DFormat.FullSideBySide:
                     case Video3DFormat.FullSideBySide:
-                        filter = "crop=iw/2:ih:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
+                        filter = @"crop=iw/2:ih:0:0,setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
                         // fsbs crop width in half,set the display aspect,crop out any black bars we may have made the scale width to requestedWidth.
                         // fsbs crop width in half,set the display aspect,crop out any black bars we may have made the scale width to requestedWidth.
                         break;
                         break;
                     case Video3DFormat.HalfTopAndBottom:
                     case Video3DFormat.HalfTopAndBottom:
-                        filter = "crop=iw:ih/2:0:0,scale=(iw*2):ih),setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
+                        filter = @"crop=iw:ih/2:0:0,scale=(iw*2):ih),setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
                         // htab crop height in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth
                         // htab crop height in half,scale to correct size, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth
                         break;
                         break;
                     case Video3DFormat.FullTopAndBottom:
                     case Video3DFormat.FullTopAndBottom:
-                        filter = "crop=iw:ih/2:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
+                        filter = @"crop=iw:ih/2:0:0,setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1,scale={0}:trunc({0}/dar/2)*2";
                         // ftab crop height in half, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth
                         // ftab crop height in half, set the display aspect,crop out any black bars we may have made the scale width to requestedWidth
                         break;
                         break;
                     default:
                     default:

+ 5 - 5
MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs

@@ -680,13 +680,13 @@ namespace MediaBrowser.MediaEncoding.Encoder
             var scaler = threedFormat switch
             var scaler = threedFormat switch
             {
             {
                 // hsbs crop width in half,scale to correct size, set the display aspect,crop out any black bars we may have made. Work out the correct height based on the display aspect it will maintain the aspect where -1 in this case (3d) may not.
                 // hsbs crop width in half,scale to correct size, set the display aspect,crop out any black bars we may have made. Work out the correct height based on the display aspect it will maintain the aspect where -1 in this case (3d) may not.
-                Video3DFormat.HalfSideBySide => "crop=iw/2:ih:0:0,scale=(iw*2):ih,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1",
+                Video3DFormat.HalfSideBySide => @"crop=iw/2:ih:0:0,scale=(iw*2):ih,setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1",
                 // fsbs crop width in half,set the display aspect,crop out any black bars we may have made
                 // fsbs crop width in half,set the display aspect,crop out any black bars we may have made
-                Video3DFormat.FullSideBySide => "crop=iw/2:ih:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1",
+                Video3DFormat.FullSideBySide => @"crop=iw/2:ih:0:0,setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1",
                 // htab crop height in half,scale to correct size, set the display aspect,crop out any black bars we may have made
                 // htab crop height in half,scale to correct size, set the display aspect,crop out any black bars we may have made
-                Video3DFormat.HalfTopAndBottom => "crop=iw:ih/2:0:0,scale=(iw*2):ih),setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1",
+                Video3DFormat.HalfTopAndBottom => @"crop=iw:ih/2:0:0,scale=(iw*2):ih),setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1",
                 // ftab crop height in half, set the display aspect,crop out any black bars we may have made
                 // ftab crop height in half, set the display aspect,crop out any black bars we may have made
-                Video3DFormat.FullTopAndBottom => "crop=iw:ih/2:0:0,setdar=dar=a,crop=min(iw\\,ih*dar):min(ih\\,iw/dar):(iw-min(iw\\,iw*sar))/2:(ih - min (ih\\,ih/sar))/2,setsar=sar=1",
+                Video3DFormat.FullTopAndBottom => @"crop=iw:ih/2:0:0,setdar=dar=a,crop=min(iw\,ih*dar):min(ih\,iw/dar):(iw-min(iw\,iw*sar))/2:(ih - min (ih\,ih/sar))/2,setsar=sar=1",
                 _ => "scale=trunc(iw*sar):ih"
                 _ => "scale=trunc(iw*sar):ih"
             };
             };
 
 
@@ -858,7 +858,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
             // https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping
             // https://ffmpeg.org/ffmpeg-filters.html#Notes-on-filtergraph-escaping
             // We need to double escape
             // We need to double escape
 
 
-            return path.Replace('\\', '/').Replace(":", "\\:", StringComparison.Ordinal).Replace("'", "'\\\\\\''", StringComparison.Ordinal);
+            return path.Replace('\\', '/').Replace(":", "\\:", StringComparison.Ordinal).Replace("'", @"'\\\''", StringComparison.Ordinal);
         }
         }
 
 
         /// <inheritdoc />
         /// <inheritdoc />

+ 1 - 1
MediaBrowser.Providers/MediaInfo/AudioFileProber.cs

@@ -58,7 +58,7 @@ namespace MediaBrowser.Providers.MediaInfo
             _mediaSourceManager = mediaSourceManager;
             _mediaSourceManager = mediaSourceManager;
         }
         }
 
 
-        [GeneratedRegex("I:\\s+(.*?)\\s+LUFS")]
+        [GeneratedRegex(@"I:\s+(.*?)\s+LUFS")]
         private static partial Regex LUFSRegex();
         private static partial Regex LUFSRegex();
 
 
         /// <summary>
         /// <summary>

+ 4 - 4
tests/Jellyfin.Naming.Tests/TV/EpisodePathParserTest.cs

@@ -13,10 +13,10 @@ namespace Jellyfin.Naming.Tests.TV
         [InlineData("/media/Foo - S04E011", true, "Foo", 4, 11)]
         [InlineData("/media/Foo - S04E011", true, "Foo", 4, 11)]
         [InlineData("/media/Foo/Foo s01x01", true, "Foo", 1, 1)]
         [InlineData("/media/Foo/Foo s01x01", true, "Foo", 1, 1)]
         [InlineData("/media/Foo (2019)/Season 4/Foo (2019).S04E03", true, "Foo (2019)", 4, 3)]
         [InlineData("/media/Foo (2019)/Season 4/Foo (2019).S04E03", true, "Foo (2019)", 4, 3)]
-        [InlineData("D:\\media\\Foo\\Foo-S01E01", true, "Foo", 1, 1)]
-        [InlineData("D:\\media\\Foo - S04E011", true, "Foo", 4, 11)]
-        [InlineData("D:\\media\\Foo\\Foo s01x01", true, "Foo", 1, 1)]
-        [InlineData("D:\\media\\Foo (2019)\\Season 4\\Foo (2019).S04E03", true, "Foo (2019)", 4, 3)]
+        [InlineData(@"D:\media\Foo\Foo-S01E01", true, "Foo", 1, 1)]
+        [InlineData(@"D:\media\Foo - S04E011", true, "Foo", 4, 11)]
+        [InlineData(@"D:\media\Foo\Foo s01x01", true, "Foo", 1, 1)]
+        [InlineData(@"D:\media\Foo (2019)\Season 4\Foo (2019).S04E03", true, "Foo (2019)", 4, 3)]
         [InlineData("/Season 2/Elementary - 02x03-04-15 - Ep Name.mp4", false, "Elementary", 2, 3)]
         [InlineData("/Season 2/Elementary - 02x03-04-15 - Ep Name.mp4", false, "Elementary", 2, 3)]
         [InlineData("/Season 1/seriesname S01E02 blah.avi", false, "seriesname", 1, 2)]
         [InlineData("/Season 1/seriesname S01E02 blah.avi", false, "seriesname", 1, 2)]
         [InlineData("/Running Man/Running Man S2017E368.mkv", false, "Running Man", 2017, 368)]
         [InlineData("/Running Man/Running Man S2017E368.mkv", false, "Running Man", 2017, 368)]

+ 12 - 12
tests/Jellyfin.Server.Implementations.Tests/Library/PathExtensionsTests.cs

@@ -48,10 +48,10 @@ namespace Jellyfin.Server.Implementations.Tests.Library
         [InlineData("C:/Users/jeff/myfile.mkv", "C:/Users/jeff", "/home/jeff", "/home/jeff/myfile.mkv")]
         [InlineData("C:/Users/jeff/myfile.mkv", "C:/Users/jeff", "/home/jeff", "/home/jeff/myfile.mkv")]
         [InlineData("C:/Users/jeff/myfile.mkv", "C:/Users/jeff/", "/home/jeff", "/home/jeff/myfile.mkv")]
         [InlineData("C:/Users/jeff/myfile.mkv", "C:/Users/jeff/", "/home/jeff", "/home/jeff/myfile.mkv")]
         [InlineData("/home/jeff/music/jeff's band/consistently inconsistent.mp3", "/home/jeff/music/jeff's band", "/home/not jeff", "/home/not jeff/consistently inconsistent.mp3")]
         [InlineData("/home/jeff/music/jeff's band/consistently inconsistent.mp3", "/home/jeff/music/jeff's band", "/home/not jeff", "/home/not jeff/consistently inconsistent.mp3")]
-        [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff", "/home/jeff", "/home/jeff/myfile.mkv")]
-        [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff", "/home/jeff/", "/home/jeff/myfile.mkv")]
-        [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff/", "/home/jeff/", "/home/jeff/myfile.mkv")]
-        [InlineData("C:\\Users\\jeff\\myfile.mkv", "C:\\Users/jeff/", "/", "/myfile.mkv")]
+        [InlineData(@"C:\Users\jeff\myfile.mkv", "C:\\Users/jeff", "/home/jeff", "/home/jeff/myfile.mkv")]
+        [InlineData(@"C:\Users\jeff\myfile.mkv", "C:\\Users/jeff", "/home/jeff/", "/home/jeff/myfile.mkv")]
+        [InlineData(@"C:\Users\jeff\myfile.mkv", "C:\\Users/jeff/", "/home/jeff/", "/home/jeff/myfile.mkv")]
+        [InlineData(@"C:\Users\jeff\myfile.mkv", "C:\\Users/jeff/", "/", "/myfile.mkv")]
         [InlineData("/o", "/o", "/s", "/s")] // regression test for #5977
         [InlineData("/o", "/o", "/s", "/s")] // regression test for #5977
         public void TryReplaceSubPath_ValidArgs_Correct(string path, string subPath, string newSubPath, string? expectedResult)
         public void TryReplaceSubPath_ValidArgs_Correct(string path, string subPath, string newSubPath, string? expectedResult)
         {
         {
@@ -78,10 +78,10 @@ namespace Jellyfin.Server.Implementations.Tests.Library
         [Theory]
         [Theory]
         [InlineData(null, '/', null)]
         [InlineData(null, '/', null)]
         [InlineData(null, '\\', null)]
         [InlineData(null, '\\', null)]
-        [InlineData("/home/jeff/myfile.mkv", '\\', "\\home\\jeff\\myfile.mkv")]
-        [InlineData("C:\\Users\\Jeff\\myfile.mkv", '/', "C:/Users/Jeff/myfile.mkv")]
-        [InlineData("\\home/jeff\\myfile.mkv", '\\', "\\home\\jeff\\myfile.mkv")]
-        [InlineData("\\home/jeff\\myfile.mkv", '/', "/home/jeff/myfile.mkv")]
+        [InlineData("/home/jeff/myfile.mkv", '\\', @"\home\jeff\myfile.mkv")]
+        [InlineData(@"C:\Users\Jeff\myfile.mkv", '/', "C:/Users/Jeff/myfile.mkv")]
+        [InlineData(@"\home/jeff\myfile.mkv", '\\', @"\home\jeff\myfile.mkv")]
+        [InlineData(@"\home/jeff\myfile.mkv", '/', "/home/jeff/myfile.mkv")]
         [InlineData("", '/', "")]
         [InlineData("", '/', "")]
         public void NormalizePath_SpecifyingSeparator_Normalizes(string path, char separator, string expectedPath)
         public void NormalizePath_SpecifyingSeparator_Normalizes(string path, char separator, string expectedPath)
         {
         {
@@ -90,8 +90,8 @@ namespace Jellyfin.Server.Implementations.Tests.Library
 
 
         [Theory]
         [Theory]
         [InlineData("/home/jeff/myfile.mkv")]
         [InlineData("/home/jeff/myfile.mkv")]
-        [InlineData("C:\\Users\\Jeff\\myfile.mkv")]
-        [InlineData("\\home/jeff\\myfile.mkv")]
+        [InlineData(@"C:\Users\Jeff\myfile.mkv")]
+        [InlineData(@"\home/jeff\myfile.mkv")]
         public void NormalizePath_NoArgs_UsesDirectorySeparatorChar(string path)
         public void NormalizePath_NoArgs_UsesDirectorySeparatorChar(string path)
         {
         {
             var separator = Path.DirectorySeparatorChar;
             var separator = Path.DirectorySeparatorChar;
@@ -101,8 +101,8 @@ namespace Jellyfin.Server.Implementations.Tests.Library
 
 
         [Theory]
         [Theory]
         [InlineData("/home/jeff/myfile.mkv", '/')]
         [InlineData("/home/jeff/myfile.mkv", '/')]
-        [InlineData("C:\\Users\\Jeff\\myfile.mkv", '\\')]
-        [InlineData("\\home/jeff\\myfile.mkv", '/')]
+        [InlineData(@"C:\Users\Jeff\myfile.mkv", '\\')]
+        [InlineData(@"\home/jeff\myfile.mkv", '/')]
         public void NormalizePath_OutVar_Correct(string path, char expectedSeparator)
         public void NormalizePath_OutVar_Correct(string path, char expectedSeparator)
         {
         {
             var result = path.NormalizePath(out var separator);
             var result = path.NormalizePath(out var separator);

+ 2 - 2
tests/Jellyfin.Server.Implementations.Tests/Plugins/PluginManagerTests.cs

@@ -119,8 +119,8 @@ namespace Jellyfin.Server.Implementations.Tests.Plugins
         [InlineData("C:\\some.dll")] // Windows root path.
         [InlineData("C:\\some.dll")] // Windows root path.
         [InlineData("test.txt")] // Not a DLL
         [InlineData("test.txt")] // Not a DLL
         [InlineData(".././.././../some.dll")] // Traversal with current and parent
         [InlineData(".././.././../some.dll")] // Traversal with current and parent
-        [InlineData("..\\.\\..\\.\\..\\some.dll")] // Windows traversal with current and parent
-        [InlineData("\\\\network\\resource.dll")] // UNC Path
+        [InlineData(@"..\.\..\.\..\some.dll")] // Windows traversal with current and parent
+        [InlineData(@"\\network\resource.dll")] // UNC Path
         [InlineData("https://jellyfin.org/some.dll")] // URL
         [InlineData("https://jellyfin.org/some.dll")] // URL
         [InlineData("~/some.dll")] // Tilde poses a shell expansion risk, but is a valid path character.
         [InlineData("~/some.dll")] // Tilde poses a shell expansion risk, but is a valid path character.
         public void Constructor_DiscoversUnsafePluginAssembly_Status_Malfunctioned(string unsafePath)
         public void Constructor_DiscoversUnsafePluginAssembly_Status_Malfunctioned(string unsafePath)

+ 1 - 1
tests/Jellyfin.XbmcMetadata.Tests/Parsers/MovieNfoParserTests.cs

@@ -60,7 +60,7 @@ namespace Jellyfin.XbmcMetadata.Tests.Parsers
             {
             {
                 Exists = true,
                 Exists = true,
                 FullName = OperatingSystem.IsWindows() ?
                 FullName = OperatingSystem.IsWindows() ?
-                    "C:\\media\\movies\\Justice League (2017).jpg"
+                    @"C:\media\movies\Justice League (2017).jpg"
                     : "/media/movies/Justice League (2017).jpg"
                     : "/media/movies/Justice League (2017).jpg"
             };
             };
             directoryService.Setup(x => x.GetFile(_localImageFileMetadata.FullName))
             directoryService.Setup(x => x.GetFile(_localImageFileMetadata.FullName))