diff options
Diffstat (limited to 'MediaBrowser.Controller/Entities')
9 files changed, 68 insertions, 24 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index c060f53a6..8a77d7616 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -121,6 +121,15 @@ namespace MediaBrowser.Controller.Entities.Audio .Select(i => i.GetLookupInfo()) .ToList(); + var album = id.SongInfos + .Select(i => i.Album) + .FirstOrDefault(i => !string.IsNullOrWhiteSpace(i)); + + if (!string.IsNullOrWhiteSpace(album)) + { + id.Name = album; + } + return id; } } diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index 8b6cbdc93..014b3ae6a 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -59,6 +59,12 @@ namespace MediaBrowser.Controller.Entities public List<ItemImageInfo> ImageInfos { get; set; } + /// <summary> + /// Gets or sets the channel identifier. + /// </summary> + /// <value>The channel identifier.</value> + public string ChannelId { get; set; } + [IgnoreDataMember] public virtual bool SupportsAddingToPlaylist { diff --git a/MediaBrowser.Controller/Entities/IHasId.cs b/MediaBrowser.Controller/Entities/IHasId.cs new file mode 100644 index 000000000..9698adf7a --- /dev/null +++ b/MediaBrowser.Controller/Entities/IHasId.cs @@ -0,0 +1,9 @@ +using System; + +namespace MediaBrowser.Controller.Entities +{ + public interface IHasId + { + Guid Id { get; } + } +} diff --git a/MediaBrowser.Controller/Entities/IHasImages.cs b/MediaBrowser.Controller/Entities/IHasImages.cs index 1871d7b68..ffb351c94 100644 --- a/MediaBrowser.Controller/Entities/IHasImages.cs +++ b/MediaBrowser.Controller/Entities/IHasImages.cs @@ -1,13 +1,12 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Entities; -using System; using System.Collections.Generic; using System.IO; using System.Threading.Tasks; namespace MediaBrowser.Controller.Entities { - public interface IHasImages : IHasProviderIds + public interface IHasImages : IHasProviderIds, IHasId { /// <summary> /// Gets the name. @@ -28,12 +27,6 @@ namespace MediaBrowser.Controller.Entities string FileNameWithoutExtension { get; } /// <summary> - /// Gets the identifier. - /// </summary> - /// <value>The identifier.</value> - Guid Id { get; } - - /// <summary> /// Gets the type of the location. /// </summary> /// <value>The type of the location.</value> diff --git a/MediaBrowser.Controller/Entities/IHasMediaSources.cs b/MediaBrowser.Controller/Entities/IHasMediaSources.cs index 17a147806..85ce3c781 100644 --- a/MediaBrowser.Controller/Entities/IHasMediaSources.cs +++ b/MediaBrowser.Controller/Entities/IHasMediaSources.cs @@ -1,18 +1,11 @@ using MediaBrowser.Model.Dto; -using System; using System.Collections.Generic; namespace MediaBrowser.Controller.Entities { - public interface IHasMediaSources + public interface IHasMediaSources : IHasId { /// <summary> - /// Gets the identifier. - /// </summary> - /// <value>The identifier.</value> - Guid Id { get; } - - /// <summary> /// Gets the media sources. /// </summary> /// <param name="enablePathSubstitution">if set to <c>true</c> [enable path substitution].</param> diff --git a/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs b/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs new file mode 100644 index 000000000..391c8f7a7 --- /dev/null +++ b/MediaBrowser.Controller/Entities/IHasProgramAttributes.cs @@ -0,0 +1,19 @@ +using MediaBrowser.Model.LiveTv; +using System; + +namespace MediaBrowser.Controller.Entities +{ + public interface IHasProgramAttributes + { + bool IsMovie { get; set; } + bool IsSports { get; set; } + bool IsNews { get; set; } + bool IsKids { get; set; } + bool IsRepeat { get; set; } + bool? IsHD { get; set; } + bool IsLive { get; set; } + bool IsPremiere { get; set; } + ProgramAudio? Audio { get; set; } + DateTime? OriginalAirDate { get; set; } + } +} diff --git a/MediaBrowser.Controller/Entities/IHasStartDate.cs b/MediaBrowser.Controller/Entities/IHasStartDate.cs new file mode 100644 index 000000000..a6714fb96 --- /dev/null +++ b/MediaBrowser.Controller/Entities/IHasStartDate.cs @@ -0,0 +1,9 @@ +using System; + +namespace MediaBrowser.Controller.Entities +{ + public interface IHasStartDate + { + DateTime StartDate { get; set; } + } +} diff --git a/MediaBrowser.Controller/Entities/IHasUserData.cs b/MediaBrowser.Controller/Entities/IHasUserData.cs index d576d90c4..34a820853 100644 --- a/MediaBrowser.Controller/Entities/IHasUserData.cs +++ b/MediaBrowser.Controller/Entities/IHasUserData.cs @@ -1,20 +1,13 @@ using MediaBrowser.Model.Dto; -using System; namespace MediaBrowser.Controller.Entities { /// <summary> /// Interface IHasUserData /// </summary> - public interface IHasUserData + public interface IHasUserData : IHasId { /// <summary> - /// Gets or sets the identifier. - /// </summary> - /// <value>The identifier.</value> - Guid Id { get; set; } - - /// <summary> /// Gets the user data key. /// </summary> /// <returns>System.String.</returns> diff --git a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs index 727f756f1..faa9bc875 100644 --- a/MediaBrowser.Controller/Entities/InternalItemsQuery.cs +++ b/MediaBrowser.Controller/Entities/InternalItemsQuery.cs @@ -73,6 +73,18 @@ namespace MediaBrowser.Controller.Entities public string[] Tags { get; set; } public string[] OfficialRatings { get; set; } + public DateTime? MinStartDate { get; set; } + public DateTime? MaxStartDate { get; set; } + public DateTime? MinEndDate { get; set; } + public DateTime? MaxEndDate { get; set; } + public bool? IsAiring { get; set; } + + public bool? IsMovie { get; set; } + public bool? IsSports { get; set; } + public bool? IsKids { get; set; } + + public string[] ChannelIds { get; set; } + public InternalItemsQuery() { Tags = new string[] { }; @@ -89,6 +101,7 @@ namespace MediaBrowser.Controller.Entities Years = new int[] { }; PersonTypes = new string[] { }; PersonIds = new string[] { }; + ChannelIds = new string[] { }; } } } |
