mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
update sync objects
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user