mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
fixes #697 - Support xbmc offline discs
This commit is contained in:
parent
2db452f68f
commit
6efb78b8b2
27 changed files with 154 additions and 45 deletions
|
|
@ -35,7 +35,9 @@ namespace MediaBrowser.Controller.Resolvers
|
|||
// If the path is a file check for a matching extensions
|
||||
if (!args.IsDirectory)
|
||||
{
|
||||
if (EntityResolutionHelper.IsVideoFile(args.Path))
|
||||
var isPlaceHolder = EntityResolutionHelper.IsVideoPlaceHolder(args.Path);
|
||||
|
||||
if (EntityResolutionHelper.IsVideoFile(args.Path) || isPlaceHolder)
|
||||
{
|
||||
var extension = Path.GetExtension(args.Path);
|
||||
|
||||
|
|
@ -46,7 +48,8 @@ namespace MediaBrowser.Controller.Resolvers
|
|||
{
|
||||
VideoType = type,
|
||||
Path = args.Path,
|
||||
IsInMixedFolder = true
|
||||
IsInMixedFolder = true,
|
||||
IsPlaceHolder = isPlaceHolder
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -139,6 +139,24 @@ namespace MediaBrowser.Controller.Resolvers
|
|||
return VideoFileExtensionsDictionary.ContainsKey(extension);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether [is place holder] [the specified path].
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns><c>true</c> if [is place holder] [the specified path]; otherwise, <c>false</c>.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">path</exception>
|
||||
public static bool IsVideoPlaceHolder(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
{
|
||||
throw new ArgumentNullException("path");
|
||||
}
|
||||
|
||||
var extension = Path.GetExtension(path);
|
||||
|
||||
return string.Equals(extension, ".disc", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Ensures DateCreated and DateModified have values
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue