update sync objects

This commit is contained in:
Luke Pulverenti
2014-12-11 01:20:28 -05:00
parent 4548e6598d
commit ea9e8b957c
95 changed files with 730 additions and 330 deletions

View File

@@ -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)
{