mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
#643 - Support episodes directly in series folder
This commit is contained in:
parent
c38fef110e
commit
6247929a62
@ -86,7 +86,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Season;
|
return FindParent<Season>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -178,20 +178,6 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
get { return _series ?? (_series = FindParent<Series>()); }
|
get { return _series ?? (_series = FindParent<Series>()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The _season
|
|
||||||
/// </summary>
|
|
||||||
private Season _season;
|
|
||||||
/// <summary>
|
|
||||||
/// This Episode's Season Instance
|
|
||||||
/// </summary>
|
|
||||||
/// <value>The season.</value>
|
|
||||||
[IgnoreDataMember]
|
|
||||||
public Season Season
|
|
||||||
{
|
|
||||||
get { return _season ?? (_season = FindParent<Season>()); }
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// This is the ending episode number for double episodes.
|
/// This is the ending episode number for double episodes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -4,6 +4,7 @@ using MediaBrowser.Model.Entities;
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using System.Runtime.Serialization;
|
using System.Runtime.Serialization;
|
||||||
|
|
||||||
namespace MediaBrowser.Controller.Entities.TV
|
namespace MediaBrowser.Controller.Entities.TV
|
||||||
@ -100,5 +101,14 @@ namespace MediaBrowser.Controller.Entities.TV
|
|||||||
|
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[IgnoreDataMember]
|
||||||
|
public bool ContainsEpisodesWithoutSeasonFolders
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Children.OfType<Video>().Any();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
|||||||
var season = args.Parent as Season;
|
var season = args.Parent as Season;
|
||||||
|
|
||||||
// If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something
|
// If the parent is a Season or Series, then this is an Episode if the VideoResolver returns something
|
||||||
if (season != null)
|
if (season != null || args.Parent is Series)
|
||||||
{
|
{
|
||||||
Episode episode = null;
|
Episode episode = null;
|
||||||
|
|
||||||
@ -51,8 +51,11 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.TV
|
|||||||
|
|
||||||
if (episode != null)
|
if (episode != null)
|
||||||
{
|
{
|
||||||
episode.ParentIndexNumber = season.IndexNumber;
|
if (season != null)
|
||||||
|
{
|
||||||
|
episode.ParentIndexNumber = season.IndexNumber;
|
||||||
|
}
|
||||||
|
|
||||||
if (episode.ParentIndexNumber == null)
|
if (episode.ParentIndexNumber == null)
|
||||||
{
|
{
|
||||||
episode.ParentIndexNumber = TVUtils.GetSeasonNumberFromEpisodeFile(args.Path);
|
episode.ParentIndexNumber = TVUtils.GetSeasonNumberFromEpisodeFile(args.Path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user