mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-03 14:28:46 +01:00
more support for episodes directly in a series folder
This commit is contained in:
@@ -235,6 +235,42 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
get { return LocationType == Model.Entities.LocationType.Virtual && IsUnaired; }
|
||||
}
|
||||
|
||||
[IgnoreDataMember]
|
||||
public Guid? SeasonId
|
||||
{
|
||||
get
|
||||
{
|
||||
// First see if the parent is a Season
|
||||
var season = Parent as Season;
|
||||
|
||||
if (season != null)
|
||||
{
|
||||
return season.Id;
|
||||
}
|
||||
|
||||
var seasonNumber = ParentIndexNumber;
|
||||
|
||||
// Parent is a Series
|
||||
if (seasonNumber.HasValue)
|
||||
{
|
||||
var series = Parent as Series;
|
||||
|
||||
if (series != null)
|
||||
{
|
||||
season = series.Children.OfType<Season>()
|
||||
.FirstOrDefault(i => i.IndexNumber.HasValue && i.IndexNumber.Value == seasonNumber.Value);
|
||||
|
||||
if (season != null)
|
||||
{
|
||||
return season.Id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public override IEnumerable<string> GetDeletePaths()
|
||||
{
|
||||
return new[] { Path };
|
||||
|
||||
@@ -51,6 +51,22 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <returns>IEnumerable{Channel}.</returns>
|
||||
QueryResult<ChannelInfoDto> GetChannels(ChannelQuery query);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the recording.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{RecordingInfoDto}.</returns>
|
||||
Task<RecordingInfoDto> GetRecording(string id, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the timer.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{TimerInfoDto}.</returns>
|
||||
Task<TimerInfoDto> GetTimer(string id, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the recordings.
|
||||
/// </summary>
|
||||
|
||||
@@ -20,7 +20,13 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// ChannelName of the recording.
|
||||
/// </summary>
|
||||
public string ChannelName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the channel.
|
||||
/// </summary>
|
||||
/// <value>The type of the channel.</value>
|
||||
public ChannelType ChannelType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Name of the recording.
|
||||
/// </summary>
|
||||
@@ -76,6 +82,18 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <value>The episode title.</value>
|
||||
public string EpisodeTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the official rating.
|
||||
/// </summary>
|
||||
/// <value>The official rating.</value>
|
||||
public string OfficialRating { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the community rating.
|
||||
/// </summary>
|
||||
/// <value>The community rating.</value>
|
||||
public float? CommunityRating { get; set; }
|
||||
|
||||
public RecordingInfo()
|
||||
{
|
||||
Genres = new List<string>();
|
||||
|
||||
Reference in New Issue
Block a user