mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
fix folder rip probe
This commit is contained in:
@@ -110,7 +110,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
list[index] = artist;
|
||||
index++;
|
||||
}
|
||||
foreach (var artist in AlbumArtists)
|
||||
foreach (var artist in Artists)
|
||||
{
|
||||
list[index] = artist;
|
||||
index++;
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
list[index] = artist;
|
||||
index++;
|
||||
}
|
||||
foreach (var artist in AlbumArtists)
|
||||
foreach (var artist in Artists)
|
||||
{
|
||||
list[index] = artist;
|
||||
index++;
|
||||
|
||||
@@ -25,6 +25,7 @@ using System.Threading.Tasks;
|
||||
using MediaBrowser.Controller.Dto;
|
||||
using MediaBrowser.Controller.Extensions;
|
||||
using MediaBrowser.Controller.IO;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Sorting;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using MediaBrowser.Model.Globalization;
|
||||
@@ -536,6 +537,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public static ICollectionManager CollectionManager { get; set; }
|
||||
public static IImageProcessor ImageProcessor { get; set; }
|
||||
public static IMediaSourceManager MediaSourceManager { get; set; }
|
||||
public static IMediaEncoder MediaEncoder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String" /> that represents this instance.
|
||||
|
||||
@@ -149,18 +149,20 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <value>The video3 D format.</value>
|
||||
public Video3DFormat? Video3DFormat { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the playable stream files.
|
||||
/// </summary>
|
||||
/// <returns>List{System.String}.</returns>
|
||||
public string[] GetPlayableStreamFiles()
|
||||
{
|
||||
return GetPlayableStreamFiles(Path);
|
||||
}
|
||||
|
||||
public string[] GetPlayableStreamFileNames()
|
||||
{
|
||||
return GetPlayableStreamFiles().Select(System.IO.Path.GetFileName).ToArray();
|
||||
var videoType = VideoType;
|
||||
|
||||
if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.BluRay)
|
||||
{
|
||||
videoType = VideoType.BluRay;
|
||||
}
|
||||
else if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.Dvd)
|
||||
{
|
||||
videoType = VideoType.Dvd;
|
||||
}
|
||||
|
||||
return MediaEncoder.GetPlayableStreamFileNames(Path, videoType);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -413,36 +415,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
return base.IsValidFromResolver(newItem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the playable stream files.
|
||||
/// </summary>
|
||||
/// <param name="rootPath">The root path.</param>
|
||||
/// <returns>List{System.String}.</returns>
|
||||
public string[] GetPlayableStreamFiles(string rootPath)
|
||||
{
|
||||
if (VideoType == VideoType.VideoFile)
|
||||
{
|
||||
return new string[] { };
|
||||
}
|
||||
|
||||
var allFiles = FileSystem.GetFilePaths(rootPath, true).ToList();
|
||||
|
||||
var videoType = VideoType;
|
||||
|
||||
if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.BluRay)
|
||||
{
|
||||
videoType = VideoType.BluRay;
|
||||
}
|
||||
else if (videoType == VideoType.Iso && IsoType == Model.Entities.IsoType.Dvd)
|
||||
{
|
||||
videoType = VideoType.Dvd;
|
||||
}
|
||||
|
||||
return QueryPlayableStreamFiles(rootPath, videoType).Select(name => allFiles.FirstOrDefault(f => string.Equals(System.IO.Path.GetFileName(f), name, StringComparison.OrdinalIgnoreCase)))
|
||||
.Where(f => !string.IsNullOrEmpty(f))
|
||||
.ToArray();
|
||||
}
|
||||
|
||||
public static string[] QueryPlayableStreamFiles(string rootPath, VideoType videoType)
|
||||
{
|
||||
if (videoType == VideoType.Dvd)
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
@@ -118,5 +120,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
void SetLogFilename(string name);
|
||||
void ClearLogFilename();
|
||||
|
||||
string[] GetPlayableStreamFileNames(string path, VideoType videoType);
|
||||
IEnumerable<string> GetPrimaryPlaylistVobFiles(string path, IIsoMount isoMount, uint? titleNumber);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user