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/TV/SeasonResolver.cs

26 lines
694 B

using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using System.ComponentModel.Composition;
13 years ago
using System.IO;
namespace MediaBrowser.Controller.Resolvers.TV
13 years ago
{
[Export(typeof(IBaseItemResolver))]
public class SeasonResolver : BaseFolderResolver<Season>
13 years ago
{
protected override Season Resolve(ItemResolveEventArgs args)
{
if (args.Parent is Series && args.IsDirectory)
13 years ago
{
var season = new Season { };
13 years ago
season.IndexNumber = TVUtils.GetSeasonNumberFromPath(args.Path);
13 years ago
return season;
}
return null;
}
}
}