aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/Library/Resolvers/Movies
diff options
context:
space:
mode:
authorErwin de Haan <EraYaN@users.noreply.github.com>2019-01-06 21:50:43 +0100
committerErwin de Haan <EraYaN@users.noreply.github.com>2019-01-10 20:38:53 +0100
commitec1f5dc317182582ebff843c9e8a4d5277405469 (patch)
tree6514de336cc9aa94becb3fbd767285dfa61d0b1b /Emby.Server.Implementations/Library/Resolvers/Movies
parent3d867c2c46cec39b669bb8647efef677f32b8a8d (diff)
Mayor code cleanup
Add Argument*Exceptions now use proper nameof operators. Added exception messages to quite a few Argument*Exceptions. Fixed rethorwing to be proper syntax. Added a ton of null checkes. (This is only a start, there are about 500 places that need proper null handling) Added some TODOs to log certain exceptions. Fix sln again. Fixed all AssemblyInfo's and added proper copyright (where I could find them) We live in *current year*. Fixed the use of braces. Fixed a ton of properties, and made a fair amount of functions static that should be and can be static. Made more Methods that should be static static. You can now use static to find bad functions! Removed unused variable. And added one more proper XML comment.
Diffstat (limited to 'Emby.Server.Implementations/Library/Resolvers/Movies')
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs4
-rw-r--r--Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs20
2 files changed, 7 insertions, 17 deletions
diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs
index b9aca14173..d3ab4dd377 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/BoxSetResolver.cs
@@ -1,4 +1,4 @@
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using MediaBrowser.Model.Entities;
@@ -61,7 +61,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
/// Sets the provider id from path.
/// </summary>
/// <param name="item">The item.</param>
- private void SetProviderIdFromPath(BaseItem item)
+ private static void SetProviderIdFromPath(BaseItem item)
{
//we need to only look at the name of this actual item (not parents)
var justName = Path.GetFileName(item.Path);
diff --git a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
index 68b6c57ae6..0a45317a4e 100644
--- a/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
+++ b/Emby.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs
@@ -1,4 +1,4 @@
-using MediaBrowser.Controller.Entities;
+using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
@@ -27,17 +27,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
/// Gets the priority.
/// </summary>
/// <value>The priority.</value>
- public override ResolverPriority Priority
- {
- get
- {
- // Give plugins a chance to catch iso's first
- // Also since we have to loop through child files looking for videos,
- // see if we can avoid some of that by letting other resolvers claim folders first
- // Also run after series resolver
- return ResolverPriority.Third;
- }
- }
+ public override ResolverPriority Priority => ResolverPriority.Third;
public MultiItemResolverResult ResolveMultiple(Folder parent,
List<FileSystemMetadata> files,
@@ -176,7 +166,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
return result;
}
- private bool IsIgnored(string filename)
+ private static bool IsIgnored(string filename)
{
// Ignore samples
var sampleFilename = " " + filename.Replace(".", " ", StringComparison.OrdinalIgnoreCase)
@@ -204,7 +194,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
result.Extras.Any(i => ContainsFile(i, file));
}
- private bool ContainsFile(VideoFileInfo result, FileSystemMetadata file)
+ private static bool ContainsFile(VideoFileInfo result, FileSystemMetadata file)
{
return string.Equals(result.Path, file.FullName, StringComparison.OrdinalIgnoreCase);
}
@@ -330,7 +320,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
/// Sets the provider id from path.
/// </summary>
/// <param name="item">The item.</param>
- private void SetProviderIdsFromPath(Video item)
+ private static void SetProviderIdsFromPath(Video item)
{
if (item is Movie || item is MusicVideo)
{