aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-12-11 01:20:28 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-12-11 01:20:28 -0500
commitea9e8b957cdf5bb335967eeb1a018c4fc2a1db53 (patch)
tree634029375a7632d4c591256790f190493a802138 /MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
parent4548e6598def249d4b0fe4f4f12e2fa16d4f1e3c (diff)
update sync objects
Diffstat (limited to 'MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs')
-rw-r--r--MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs27
1 files changed, 17 insertions, 10 deletions
diff --git a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
index 3768b4492..7edd9541f 100644
--- a/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
+++ b/MediaBrowser.Server.Implementations/Library/CoreResolutionIgnoreRule.cs
@@ -3,6 +3,7 @@ using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
using System;
+using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -16,6 +17,21 @@ namespace MediaBrowser.Server.Implementations.Library
private readonly IFileSystem _fileSystem;
private readonly ILibraryManager _libraryManager;
+ /// <summary>
+ /// Any folder named in this list will be ignored - can be added to at runtime for extensibility
+ /// </summary>
+ public static readonly List<string> IgnoreFolders = new List<string>
+ {
+ "metadata",
+ "ps3_update",
+ "ps3_vprm",
+ "extrafanart",
+ "extrathumbs",
+ ".actors",
+ ".wd_tv"
+
+ };
+
public CoreResolutionIgnoreRule(IFileSystem fileSystem, ILibraryManager libraryManager)
{
_fileSystem = fileSystem;
@@ -64,7 +80,7 @@ namespace MediaBrowser.Server.Implementations.Library
if (args.IsDirectory)
{
// Ignore any folders in our list
- if (EntityResolutionHelper.IgnoreFolders.Contains(filename, StringComparer.OrdinalIgnoreCase))
+ if (IgnoreFolders.Contains(filename, StringComparer.OrdinalIgnoreCase))
{
return true;
}
@@ -88,15 +104,6 @@ namespace MediaBrowser.Server.Implementations.Library
}
else
{
- if (args.Parent != null)
- {
- // Don't resolve these into audio files
- if (string.Equals(_fileSystem.GetFileNameWithoutExtension(filename), BaseItem.ThemeSongFilename) && _libraryManager.IsAudioFile(filename))
- {
- return true;
- }
- }
-
// Ignore samples
if (filename.IndexOf(".sample.", StringComparison.OrdinalIgnoreCase) != -1)
{