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

@@ -41,10 +41,19 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
{
var collectionType = args.GetCollectionType();
var isMixed = string.IsNullOrWhiteSpace(collectionType);
// For conflicting extensions, give priority to videos
if (isMixed && _libraryManager.IsVideoFile(args.Path))
{
return null;
}
var isStandalone = args.Parent == null;
if (isStandalone ||
string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase))
string.Equals(collectionType, CollectionType.Music, StringComparison.OrdinalIgnoreCase) ||
isMixed)
{
return new Controller.Entities.Audio.Audio();
}

View File

@@ -141,12 +141,6 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Audio
if (libraryManager.IsAudioFile(fullName))
{
// Don't resolve these into audio files
if (string.Equals(fileSystem.GetFileNameWithoutExtension(fullName), BaseItem.ThemeSongFilename))
{
continue;
}
return true;
}
}

View File

@@ -99,12 +99,11 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
/// <param name="fileSystemChildren">The file system children.</param>
/// <param name="directoryService">The directory service.</param>
/// <param name="fileSystem">The file system.</param>
/// <param name="logger">The logger.</param>
/// <param name="libraryManager">The library manager.</param>
/// <returns><c>true</c> if [is series folder] [the specified path]; otherwise, <c>false</c>.</returns>
public static bool IsSeriesFolder(string path, bool considerSeasonlessEntries, IEnumerable<FileSystemInfo> fileSystemChildren, IDirectoryService directoryService, IFileSystem fileSystem, ILogger logger, ILibraryManager libraryManager)
{
// A folder with more than 3 non-season folders in will not becounted as a series
var nonSeriesFolders = 0;
foreach (var child in fileSystemChildren)
{
var attributes = child.Attributes;
@@ -129,19 +128,6 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
//logger.Debug("{0} is a series because of season folder {1}.", path, child.FullName);
return true;
}
if (IsBadFolder(child.Name))
{
logger.Debug("Invalid folder under series: {0}", child.FullName);
nonSeriesFolders++;
}
if (nonSeriesFolders >= 3)
{
logger.Debug("{0} not a series due to 3 or more invalid folders.", path);
return false;
}
}
else
{
@@ -179,24 +165,6 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
return string.Equals(extension, ".disc", StringComparison.OrdinalIgnoreCase);
}
private static bool IsBadFolder(string name)
{
if (string.Equals(name, BaseItem.ThemeSongsFolderName, StringComparison.OrdinalIgnoreCase))
{
return false;
}
if (string.Equals(name, BaseItem.ThemeVideosFolderName, StringComparison.OrdinalIgnoreCase))
{
return false;
}
if (string.Equals(name, BaseItem.TrailerFolderName, StringComparison.OrdinalIgnoreCase))
{
return false;
}
return !EntityResolutionHelper.IgnoreFolders.Contains(name, StringComparer.OrdinalIgnoreCase);
}
/// <summary>
/// Determines whether [is season folder] [the specified path].
/// </summary>