aboutsummaryrefslogtreecommitdiff
path: root/Emby.Naming
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-17 17:48:01 +0100
committerGitHub <noreply@github.com>2019-01-17 17:48:01 +0100
commite241589969c643116f9fc5c24bcf2009fed83fe5 (patch)
tree5a9e7d266b5f79c6d90a4767e804887b40b87b1c /Emby.Naming
parent47f08fbb12db5854f5e474ddbf70b758ca084616 (diff)
parent7aa975325af87fe425fe143aaed1df830133be8b (diff)
Merge branch 'dev' into skia-native-arm
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.csproj15
-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, 61 insertions, 29 deletions
diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.cs
index e039e5359a..d7af63d915 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 a206ee30bf..7c658f43a8 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 9e65440d08..014f4ebde6 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 f1a736eccb..de40a39d20 100644
--- a/Emby.Naming/Emby.Naming.csproj
+++ b/Emby.Naming/Emby.Naming.csproj
@@ -4,9 +4,20 @@
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
-
+
+ <PropertyGroup>
+ <Authors>Jellyfin Contributors</Authors>
+ <PackageId>Jellyfin.Naming</PackageId>
+ <PackageLicenseUrl>https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt</PackageLicenseUrl>
+ <RepositoryUrl>https://github.com/jellyfin/jellyfin</RepositoryUrl>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <Compile Include="..\SharedVersion.cs" Link="SharedVersion.cs" />
+ </ItemGroup>
+
<ItemGroup>
<ProjectReference Include="..\MediaBrowser.Common\MediaBrowser.Common.csproj" />
</ItemGroup>
-
+
</Project>
diff --git a/Emby.Naming/Properties/AssemblyInfo.cs b/Emby.Naming/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000000..15311570b8
--- /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 fbf0f60cba..9c279cc096 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 7f8a6a70ec..813be3f7ae 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 2007d13077..ec5ae2fbfe 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 572dd1c600..ee6ec8ba07 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 bddf9589b6..02b90310d7 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 a2c541eeb2..ef785ebf9d 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 42737b4834..e335d10554 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 2a71255368..995e95d421 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 69f1f50fa0..33d6baefd3 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 96839c31ef..3cdc483ff3 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 f4d311b975..033a8ae2d0 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 47be28104d..45d4593de2 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 c4951c728e..f6ab8cb87f 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;