mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 00:35:26 +03:00
support dvd without video_ts folder
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
using MediaBrowser.LocalMetadata.Parsers;
|
||||
using MediaBrowser.Model.Logging;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
namespace MediaBrowser.LocalMetadata.Providers
|
||||
{
|
||||
@@ -25,22 +25,10 @@ namespace MediaBrowser.LocalMetadata.Providers
|
||||
|
||||
protected override FileSystemInfo GetXmlFile(ItemInfo info, IDirectoryService directoryService)
|
||||
{
|
||||
var fileInfo = FileSystem.GetFileSystemInfo(info.Path);
|
||||
|
||||
var directoryInfo = fileInfo as DirectoryInfo;
|
||||
|
||||
if (directoryInfo == null)
|
||||
{
|
||||
directoryInfo = new DirectoryInfo(Path.GetDirectoryName(info.Path));
|
||||
}
|
||||
|
||||
var directoryPath = directoryInfo.FullName;
|
||||
|
||||
var specificFile = Path.Combine(directoryPath, FileSystem.GetFileNameWithoutExtension(info.Path) + ".xml");
|
||||
|
||||
var specificFile = Path.ChangeExtension(info.Path, ".xml");
|
||||
var file = new FileInfo(specificFile);
|
||||
|
||||
return info.IsInMixedFolder || file.Exists ? file : new FileInfo(Path.Combine(directoryPath, "game.xml"));
|
||||
return info.IsInMixedFolder || file.Exists ? file : new FileInfo(Path.Combine(Path.GetDirectoryName(info.Path), "game.xml"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user