mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-26 03:57:12 +00:00
pull person sort order from tvdb/tmdb data
This commit is contained in:
@@ -483,6 +483,22 @@ namespace MediaBrowser.Controller.Entities
|
||||
[IgnoreDataMember]
|
||||
public Folder Parent { get; set; }
|
||||
|
||||
[IgnoreDataMember]
|
||||
public IEnumerable<Folder> Parents
|
||||
{
|
||||
get
|
||||
{
|
||||
var parent = Parent;
|
||||
|
||||
while (parent != null)
|
||||
{
|
||||
yield return parent;
|
||||
|
||||
parent = parent.Parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// When the item first debuted. For movies this could be premiere date, episodes would be first aired
|
||||
/// </summary>
|
||||
@@ -630,11 +646,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <value>The original run time ticks.</value>
|
||||
public long? OriginalRunTimeTicks { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the aspect ratio.
|
||||
/// </summary>
|
||||
/// <value>The aspect ratio.</value>
|
||||
public string AspectRatio { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the production year.
|
||||
/// </summary>
|
||||
/// <value>The production year.</value>
|
||||
|
||||
14
MediaBrowser.Controller/Entities/IHasAspectRatio.cs
Normal file
14
MediaBrowser.Controller/Entities/IHasAspectRatio.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IHasAspectRatio
|
||||
/// </summary>
|
||||
public interface IHasAspectRatio
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the aspect ratio.
|
||||
/// </summary>
|
||||
/// <value>The aspect ratio.</value>
|
||||
string AspectRatio { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <value>The type.</value>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the sort order - ascending
|
||||
/// </summary>
|
||||
/// <value>The sort order.</value>
|
||||
public int? SortOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String" /> that represents this instance.
|
||||
/// </summary>
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <summary>
|
||||
/// Class Video
|
||||
/// </summary>
|
||||
public class Video : BaseItem, IHasMediaStreams
|
||||
public class Video : BaseItem, IHasMediaStreams, IHasAspectRatio
|
||||
{
|
||||
public bool IsMultiPart { get; set; }
|
||||
|
||||
@@ -65,6 +65,12 @@ namespace MediaBrowser.Controller.Entities
|
||||
return GetPlayableStreamFiles(Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the aspect ratio.
|
||||
/// </summary>
|
||||
/// <value>The aspect ratio.</value>
|
||||
public string AspectRatio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Should be overridden to return the proper folder where metadata lives
|
||||
/// </summary>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using System.IO;
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
@@ -23,6 +24,14 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <returns>Task{IEnumerable{ChannelInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelInfo>> GetChannelsAsync(CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel image asynchronous.
|
||||
/// </summary>
|
||||
/// <param name="channelId">The channel identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{Stream}.</returns>
|
||||
Task<Stream> GetChannelImageAsync(string channelId, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the recordings asynchronous.
|
||||
/// </summary>
|
||||
|
||||
@@ -89,6 +89,7 @@
|
||||
<Compile Include="Entities\GameGenre.cs" />
|
||||
<Compile Include="Entities\GameSystem.cs" />
|
||||
<Compile Include="Entities\IByReferenceItem.cs" />
|
||||
<Compile Include="Entities\IHasAspectRatio.cs" />
|
||||
<Compile Include="Entities\IHasCriticRating.cs" />
|
||||
<Compile Include="Entities\IHasSoundtracks.cs" />
|
||||
<Compile Include="Entities\IItemByName.cs" />
|
||||
|
||||
@@ -375,9 +375,10 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
var val = reader.ReadElementContentAsString();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(val))
|
||||
var hasAspectRatio = item as IHasAspectRatio;
|
||||
if (!string.IsNullOrWhiteSpace(val) && hasAspectRatio != null)
|
||||
{
|
||||
item.AspectRatio = val;
|
||||
hasAspectRatio.AspectRatio = val;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user