2013-02-21 01:33:05 +00:00
|
|
|
|
using MediaBrowser.Controller.Entities;
|
2014-11-16 20:44:08 +00:00
|
|
|
|
using MediaBrowser.Controller.Library;
|
2013-03-03 16:53:58 +00:00
|
|
|
|
using MediaBrowser.Controller.Resolvers;
|
2017-08-09 19:56:38 +00:00
|
|
|
|
using MediaBrowser.Model.IO;
|
2013-02-21 01:33:05 +00:00
|
|
|
|
|
2016-11-03 06:37:52 +00:00
|
|
|
|
namespace Emby.Server.Implementations.Library.Resolvers
|
2013-02-21 01:33:05 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Resolves a Path into a Video
|
|
|
|
|
/// </summary>
|
2013-03-03 16:53:58 +00:00
|
|
|
|
public class VideoResolver : BaseVideoResolver<Video>
|
2013-02-21 01:33:05 +00:00
|
|
|
|
{
|
2014-11-16 20:44:08 +00:00
|
|
|
|
protected override Video Resolve(ItemResolveArgs args)
|
|
|
|
|
{
|
|
|
|
|
if (args.Parent != null)
|
|
|
|
|
{
|
2014-12-03 03:13:03 +00:00
|
|
|
|
// The movie resolver will handle this
|
2014-12-04 05:24:41 +00:00
|
|
|
|
return null;
|
2014-11-16 20:44:08 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return base.Resolve(args);
|
|
|
|
|
}
|
|
|
|
|
|
2013-02-21 01:33:05 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the priority.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <value>The priority.</value>
|
|
|
|
|
public override ResolverPriority Priority
|
|
|
|
|
{
|
|
|
|
|
get { return ResolverPriority.Last; }
|
|
|
|
|
}
|
2017-08-09 19:56:38 +00:00
|
|
|
|
|
|
|
|
|
public VideoResolver(ILibraryManager libraryManager, IFileSystem fileSystem) : base(libraryManager, fileSystem)
|
|
|
|
|
{
|
|
|
|
|
}
|
2013-02-21 01:33:05 +00:00
|
|
|
|
}
|
2016-03-19 19:32:37 +00:00
|
|
|
|
|
|
|
|
|
public class GenericVideoResolver<T> : BaseVideoResolver<T>
|
|
|
|
|
where T : Video, new ()
|
|
|
|
|
{
|
2017-08-09 19:56:38 +00:00
|
|
|
|
public GenericVideoResolver(ILibraryManager libraryManager, IFileSystem fileSystem) : base(libraryManager, fileSystem)
|
2016-03-19 19:32:37 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
}
|
2013-02-21 01:33:05 +00:00
|
|
|
|
}
|