aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming
diff options
context:
space:
mode:
Diffstat (limited to 'Emby.Naming')
-rw-r--r--Emby.Naming/AudioBook/AudioBookInfo.cs2
-rw-r--r--Emby.Naming/AudioBook/AudioBookResolver.cs4
-rw-r--r--Emby.Naming/Common/NamingOptions.cs2
-rw-r--r--Emby.Naming/Emby.Naming.csproj4
-rw-r--r--Emby.Naming/Properties/AssemblyInfo.cs21
-rw-r--r--Emby.Naming/Subtitles/SubtitleParser.cs4
-rw-r--r--Emby.Naming/TV/EpisodePathParser.cs4
-rw-r--r--Emby.Naming/TV/EpisodeResolver.cs4
-rw-r--r--Emby.Naming/Video/CleanDateTimeParser.cs6
-rw-r--r--Emby.Naming/Video/CleanStringParser.cs4
-rw-r--r--Emby.Naming/Video/FlagParser.cs2
-rw-r--r--Emby.Naming/Video/Format3DParser.cs4
-rw-r--r--Emby.Naming/Video/StackResolver.cs2
-rw-r--r--Emby.Naming/Video/StubResolver.cs2
-rw-r--r--Emby.Naming/Video/VideoFileInfo.cs2
-rw-r--r--Emby.Naming/Video/VideoInfo.cs2
-rw-r--r--Emby.Naming/Video/VideoListResolver.cs8
-rw-r--r--Emby.Naming/Video/VideoResolver.cs2
18 files changed, 52 insertions, 27 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.cs
index e039e5359..d7af63d91 100644
--- a/Emby.Naming/AudioBook/AudioBookInfo.cs
+++ b/Emby.Naming/AudioBook/AudioBookInfo.cs
@@ -29,7 +29,7 @@ namespace Emby.Naming.AudioBook
/// </summary>
/// <value>The alternate versions.</value>
public List<AudioBookFileInfo> AlternateVersions { get; set; }
-
+
public AudioBookInfo()
{
Files = new List<AudioBookFileInfo>();
diff --git a/Emby.Naming/AudioBook/AudioBookResolver.cs b/Emby.Naming/AudioBook/AudioBookResolver.cs
index a206ee30b..7c658f43a 100644
--- a/Emby.Naming/AudioBook/AudioBookResolver.cs
+++ b/Emby.Naming/AudioBook/AudioBookResolver.cs
@@ -30,7 +30,7 @@ namespace Emby.Naming.AudioBook
{
if (string.IsNullOrEmpty(path))
{
- throw new ArgumentNullException("path");
+ throw new ArgumentNullException(nameof(path));
}
if (IsDirectory)
return null;
@@ -46,7 +46,7 @@ namespace Emby.Naming.AudioBook
var parsingResult = new AudioBookFilePathParser(_options)
.Parse(path, IsDirectory);
-
+
return new AudioBookFileInfo
{
Path = path,
diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs
index 9e65440d0..014f4ebde 100644
--- a/Emby.Naming/Common/NamingOptions.cs
+++ b/Emby.Naming/Common/NamingOptions.cs
@@ -282,7 +282,7 @@ namespace Emby.Naming.Common
new EpisodeExpression(@".*(\\|\/)(?<seriesname>((?![Ss]([0-9]+)[][ ._-]*[Ee]([0-9]+))[^\\\/])*)?[Ss](?<seasonnumber>[0-9]+)[][ ._-]*[Ee](?<epnumber>[0-9]+)([^\\/]*)$")
{
IsNamed = true
- },
+ },
// <!-- foo.ep01, foo.EP_01 -->
new EpisodeExpression(@"[\._ -]()[Ee][Pp]_?([0-9]+)([^\\/]*)$"),
new EpisodeExpression("([0-9]{4})[\\.-]([0-9]{2})[\\.-]([0-9]{2})", true)
diff --git a/Emby.Naming/Emby.Naming.csproj b/Emby.Naming/Emby.Naming.csproj
index f1a736ecc..360ffaabe 100644
--- a/Emby.Naming/Emby.Naming.csproj
+++ b/Emby.Naming/Emby.Naming.csproj
@@ -4,6 +4,10 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
+
+ <ItemGroup>
+ <Compile Include="..\SharedVersion.cs" Link="SharedVersion.cs" />
+ </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
diff --git a/Emby.Naming/Properties/AssemblyInfo.cs b/Emby.Naming/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..15311570b
--- /dev/null
+++ b/Emby.Naming/Properties/AssemblyInfo.cs
@@ -0,0 +1,21 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("Emby.Naming")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Jellyfin Project")]
+[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")]
+[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+[assembly: NeutralResourcesLanguage("en")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
diff --git a/Emby.Naming/Subtitles/SubtitleParser.cs b/Emby.Naming/Subtitles/SubtitleParser.cs
index fbf0f60cb..9c279cc09 100644
--- a/Emby.Naming/Subtitles/SubtitleParser.cs
+++ b/Emby.Naming/Subtitles/SubtitleParser.cs
@@ -18,7 +18,7 @@ namespace Emby.Naming.Subtitles
{
if (string.IsNullOrEmpty(path))
{
- throw new ArgumentNullException("path");
+ throw new ArgumentNullException(nameof(path));
}
var extension = Path.GetExtension(path);
@@ -52,7 +52,7 @@ namespace Emby.Naming.Subtitles
{
if (string.IsNullOrEmpty(path))
{
- throw new ArgumentNullException("path");
+ throw new ArgumentNullException(nameof(path));
}
// Note: the tags need be be surrounded be either a space ( ), hyphen -, dot . or underscore _.
diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs
index 7f8a6a70e..813be3f7a 100644
--- a/Emby.Naming/TV/EpisodePathParser.cs
+++ b/Emby.Naming/TV/EpisodePathParser.cs
@@ -1,4 +1,4 @@
-using Emby.Naming.Common;
+using Emby.Naming.Common;
using System;
using System.Collections.Generic;
using System.Globalization;
@@ -74,7 +74,7 @@ namespace Emby.Naming.TV
return result ?? new EpisodePathParserResult();
}
- private EpisodePathParserResult Parse(string name, EpisodeExpression expression)
+ private static EpisodePathParserResult Parse(string name, EpisodeExpression expression)
{
var result = new EpisodePathParserResult();
diff --git a/Emby.Naming/TV/EpisodeResolver.cs b/Emby.Naming/TV/EpisodeResolver.cs
index 2007d1307..ec5ae2fbf 100644
--- a/Emby.Naming/TV/EpisodeResolver.cs
+++ b/Emby.Naming/TV/EpisodeResolver.cs
@@ -19,7 +19,7 @@ namespace Emby.Naming.TV
{
if (string.IsNullOrEmpty(path))
{
- throw new ArgumentNullException("path");
+ throw new ArgumentNullException(nameof(path));
}
var isStub = false;
@@ -53,7 +53,7 @@ namespace Emby.Naming.TV
var parsingResult = new EpisodePathParser(_options)
.Parse(path, IsDirectory, isNamed, isOptimistic, supportsAbsoluteNumbers, fillExtendedInfo);
-
+
return new EpisodeInfo
{
Path = path,
diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs
index 572dd1c60..ee6ec8ba0 100644
--- a/Emby.Naming/Video/CleanDateTimeParser.cs
+++ b/Emby.Naming/Video/CleanDateTimeParser.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using Emby.Naming.Common;
using System.Globalization;
using System.IO;
@@ -38,7 +38,7 @@ namespace Emby.Naming.Video
}
catch (ArgumentException)
{
-
+
}
var result = _options.CleanDateTimeRegexes.Select(i => Clean(name, i))
@@ -63,7 +63,7 @@ namespace Emby.Naming.Video
result;
}
- private CleanDateTimeResult Clean(string name, Regex expression)
+ private static CleanDateTimeResult Clean(string name, Regex expression)
{
var result = new CleanDateTimeResult();
diff --git a/Emby.Naming/Video/CleanStringParser.cs b/Emby.Naming/Video/CleanStringParser.cs
index bddf9589b..02b90310d 100644
--- a/Emby.Naming/Video/CleanStringParser.cs
+++ b/Emby.Naming/Video/CleanStringParser.cs
@@ -1,4 +1,4 @@
-using System.Collections.Generic;
+using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Emby.Naming.Video
@@ -30,7 +30,7 @@ namespace Emby.Naming.Video
};
}
- private CleanStringResult Clean(string name, Regex expression)
+ private static CleanStringResult Clean(string name, Regex expression)
{
var result = new CleanStringResult();
diff --git a/Emby.Naming/Video/FlagParser.cs b/Emby.Naming/Video/FlagParser.cs
index a2c541eeb..ef785ebf9 100644
--- a/Emby.Naming/Video/FlagParser.cs
+++ b/Emby.Naming/Video/FlagParser.cs
@@ -22,7 +22,7 @@ namespace Emby.Naming.Video
{
if (string.IsNullOrEmpty(path))
{
- throw new ArgumentNullException("path");
+ throw new ArgumentNullException(nameof(path));
}
// Note: the tags need be be surrounded be either a space ( ), hyphen -, dot . or underscore _.
diff --git a/Emby.Naming/Video/Format3DParser.cs b/Emby.Naming/Video/Format3DParser.cs
index 42737b483..e335d1055 100644
--- a/Emby.Naming/Video/Format3DParser.cs
+++ b/Emby.Naming/Video/Format3DParser.cs
@@ -1,4 +1,4 @@
-using Emby.Naming.Common;
+using Emby.Naming.Common;
using System;
using System.Linq;
@@ -36,7 +36,7 @@ namespace Emby.Naming.Video
return new Format3DResult();
}
- private Format3DResult Parse(string[] videoFlags, Format3DRule rule)
+ private static Format3DResult Parse(string[] videoFlags, Format3DRule rule)
{
var result = new Format3DResult();
diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.cs
index 2a7125536..995e95d42 100644
--- a/Emby.Naming/Video/StackResolver.cs
+++ b/Emby.Naming/Video/StackResolver.cs
@@ -126,7 +126,7 @@ namespace Emby.Naming.Video
}
stack.Files.Add(file2.FullName);
}
- else
+ else
{
// Sequel
offset = 0;
diff --git a/Emby.Naming/Video/StubResolver.cs b/Emby.Naming/Video/StubResolver.cs
index 69f1f50fa..33d6baefd 100644
--- a/Emby.Naming/Video/StubResolver.cs
+++ b/Emby.Naming/Video/StubResolver.cs
@@ -18,7 +18,7 @@ namespace Emby.Naming.Video
{
var result = new StubResult();
var extension = Path.GetExtension(path) ?? string.Empty;
-
+
if (_options.StubFileExtensions.Contains(extension, StringComparer.OrdinalIgnoreCase))
{
result.IsStub = true;
diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.cs
index 96839c31e..3cdc483ff 100644
--- a/Emby.Naming/Video/VideoFileInfo.cs
+++ b/Emby.Naming/Video/VideoFileInfo.cs
@@ -55,7 +55,7 @@ namespace Emby.Naming.Video
/// Gets or sets the type of the stub.
/// </summary>
/// <value>The type of the stub.</value>
- public string StubType { get; set; }
+ public string StubType { get; set; }
/// <summary>
/// Gets or sets the type.
/// </summary>
diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.cs
index f4d311b97..033a8ae2d 100644
--- a/Emby.Naming/Video/VideoInfo.cs
+++ b/Emby.Naming/Video/VideoInfo.cs
@@ -32,7 +32,7 @@ namespace Emby.Naming.Video
/// </summary>
/// <value>The alternate versions.</value>
public List<VideoFileInfo> AlternateVersions { get; set; }
-
+
public VideoInfo()
{
Files = new List<VideoFileInfo>();
diff --git a/Emby.Naming/Video/VideoListResolver.cs b/Emby.Naming/Video/VideoListResolver.cs
index 47be28104..45d4593de 100644
--- a/Emby.Naming/Video/VideoListResolver.cs
+++ b/Emby.Naming/Video/VideoListResolver.cs
@@ -1,4 +1,4 @@
-using Emby.Naming.Common;
+using Emby.Naming.Common;
using System;
using System.Collections.Generic;
using System.IO;
@@ -55,9 +55,9 @@ namespace Emby.Naming.Video
info.Year = info.Files.First().Year;
- var extraBaseNames = new List<string>
+ var extraBaseNames = new List<string>
{
- stack.Name,
+ stack.Name,
Path.GetFileNameWithoutExtension(stack.Files[0])
};
@@ -236,7 +236,7 @@ namespace Emby.Naming.Video
if (testFilename.StartsWith(folderName, StringComparison.OrdinalIgnoreCase))
{
testFilename = testFilename.Substring(folderName.Length).Trim();
- return testFilename.StartsWith("-", StringComparison.OrdinalIgnoreCase)||Regex.Replace(testFilename, @"\[([^]]*)\]", "").Trim() == String.Empty;
+ return testFilename.StartsWith("-", StringComparison.OrdinalIgnoreCase) || Regex.Replace(testFilename, @"\[([^]]*)\]", "").Trim() == string.Empty;
}
return false;
diff --git a/Emby.Naming/Video/VideoResolver.cs b/Emby.Naming/Video/VideoResolver.cs
index c4951c728..f6ab8cb87 100644
--- a/Emby.Naming/Video/VideoResolver.cs
+++ b/Emby.Naming/Video/VideoResolver.cs
@@ -45,7 +45,7 @@ namespace Emby.Naming.Video
{
if (string.IsNullOrEmpty(path))
{
- throw new ArgumentNullException("path");
+ throw new ArgumentNullException(nameof(path));
}
var isStub = false;