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