You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Controller/Resolvers/Movies/BoxSetResolver.cs

29 lines
871 B

using MediaBrowser.Controller.Entities.Movies;
using MediaBrowser.Controller.Library;
using System;
using System.ComponentModel.Composition;
12 years ago
using System.IO;
namespace MediaBrowser.Controller.Resolvers.Movies
12 years ago
{
[Export(typeof(IBaseItemResolver))]
12 years ago
public class BoxSetResolver : BaseFolderResolver<BoxSet>
{
protected override BoxSet Resolve(ItemResolveEventArgs args)
{
// It's a boxset if all of the following conditions are met:
// Is a Directory
// Contains [boxset] in the path
if (args.IsDirectory)
12 years ago
{
if (Path.GetFileName(args.Path).IndexOf("[boxset]", StringComparison.OrdinalIgnoreCase) != -1)
{
return new BoxSet();
}
}
return null;
}
}
}