mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 17:44:43 +01:00
use new naming project
This commit is contained in:
@@ -472,6 +472,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
else
|
||||
{
|
||||
newItems.Add(child);
|
||||
validChildren.Add(child);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
var standaloneTypes = new List<string>
|
||||
{
|
||||
CollectionType.AdultVideos,
|
||||
CollectionType.Books,
|
||||
CollectionType.HomeVideos,
|
||||
CollectionType.Photos,
|
||||
|
||||
@@ -337,34 +337,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <returns>IEnumerable{Video}.</returns>
|
||||
private IEnumerable<Video> LoadAdditionalParts(IEnumerable<FileSystemInfo> fileSystemChildren, IDirectoryService directoryService)
|
||||
{
|
||||
IEnumerable<FileSystemInfo> files;
|
||||
|
||||
var path = Path;
|
||||
|
||||
if (VideoType == VideoType.BluRay || VideoType == VideoType.Dvd)
|
||||
{
|
||||
files = fileSystemChildren.Where(i =>
|
||||
{
|
||||
if ((i.Attributes & FileAttributes.Directory) == FileAttributes.Directory)
|
||||
{
|
||||
return !string.Equals(i.FullName, path, StringComparison.OrdinalIgnoreCase) && LibraryManager.IsMultiPartFolder(i.FullName);
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
files = fileSystemChildren.Where(i =>
|
||||
{
|
||||
if ((i.Attributes & FileAttributes.Directory) == FileAttributes.Directory)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return !string.Equals(i.FullName, path, StringComparison.OrdinalIgnoreCase) && LibraryManager.IsVideoFile(i.FullName) && LibraryManager.IsMultiPartFile(i.Name);
|
||||
});
|
||||
}
|
||||
var files = LibraryManager.GetAdditionalParts(Path, VideoType, fileSystemChildren);
|
||||
|
||||
return LibraryManager.ResolvePaths<Video>(files, directoryService, null).Select(video =>
|
||||
{
|
||||
|
||||
@@ -367,20 +367,6 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns><c>true</c> if [is audio file] [the specified path]; otherwise, <c>false</c>.</returns>
|
||||
bool IsAudioFile(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether [is multi part file] [the specified path].
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns><c>true</c> if [is multi part file] [the specified path]; otherwise, <c>false</c>.</returns>
|
||||
bool IsMultiPartFile(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether [is multi part folder] [the specified path].
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns><c>true</c> if [is multi part folder] [the specified path]; otherwise, <c>false</c>.</returns>
|
||||
bool IsMultiPartFolder(string path);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the season number from path.
|
||||
@@ -417,5 +403,16 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>ItemInfo.</returns>
|
||||
ItemLookupInfo ParseName(string name);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the additional parts.
|
||||
/// </summary>
|
||||
/// <param name="file">The file.</param>
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="files">The files.</param>
|
||||
/// <returns>IEnumerable<System.String>.</returns>
|
||||
IEnumerable<FileSystemInfo> GetAdditionalParts(string file,
|
||||
VideoType type,
|
||||
IEnumerable<FileSystemInfo> files);
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
IEnumerable<FileSystemInfo> GetFileSystemEntries(string path);
|
||||
IEnumerable<FileSystemInfo> GetFiles(string path);
|
||||
IEnumerable<FileSystemInfo> GetDirectories(string path);
|
||||
IEnumerable<FileSystemInfo> GetFiles(string path, bool clearCache);
|
||||
FileSystemInfo GetFile(string path);
|
||||
Dictionary<string, FileSystemInfo> GetFileSystemDictionary(string path);
|
||||
@@ -109,5 +110,10 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
public IEnumerable<FileSystemInfo> GetDirectories(string path)
|
||||
{
|
||||
return GetFileSystemEntries(path, false).Where(i => (i.Attributes & FileAttributes.Directory) == FileAttributes.Directory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user