diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Model/DTO | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Model/DTO')
21 files changed, 1491 insertions, 445 deletions
diff --git a/MediaBrowser.Model/DTO/AudioInfo.cs b/MediaBrowser.Model/DTO/AudioInfo.cs deleted file mode 100644 index 9f7675e17a..0000000000 --- a/MediaBrowser.Model/DTO/AudioInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -using ProtoBuf;
-
-namespace MediaBrowser.Model.DTO
-{
- [ProtoContract]
- public class AudioInfo
- {
- [ProtoMember(1)]
- public int BitRate { get; set; }
-
- [ProtoMember(2)]
- public int Channels { get; set; }
-
- [ProtoMember(3)]
- public string Artist { get; set; }
-
- [ProtoMember(4)]
- public string Album { get; set; }
-
- [ProtoMember(5)]
- public string AlbumArtist { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/DTO/AudioOutputFormats.cs b/MediaBrowser.Model/DTO/AudioOutputFormats.cs deleted file mode 100644 index 1ae044473a..0000000000 --- a/MediaBrowser.Model/DTO/AudioOutputFormats.cs +++ /dev/null @@ -1,15 +0,0 @@ -
-namespace MediaBrowser.Model.DTO
-{
- /// <summary>
- /// These are the audio output formats that the api is cabaple of streaming
- /// This does not limit the inputs, only the outputs.
- /// </summary>
- public enum AudioOutputFormats
- {
- Aac,
- Flac,
- Mp3,
- Wma
- }
-}
diff --git a/MediaBrowser.Model/DTO/BaseItemPerson.cs b/MediaBrowser.Model/DTO/BaseItemPerson.cs new file mode 100644 index 0000000000..6bb78541d7 --- /dev/null +++ b/MediaBrowser.Model/DTO/BaseItemPerson.cs @@ -0,0 +1,57 @@ +using ProtoBuf; +using System; +using System.ComponentModel; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// This is used by the api to get information about a Person within a BaseItem + /// </summary> + [ProtoContract] + public class BaseItemPerson : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(1)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the role. + /// </summary> + /// <value>The role.</value> + [ProtoMember(2)] + public string Role { get; set; } + + /// <summary> + /// Gets or sets the type. + /// </summary> + /// <value>The type.</value> + [ProtoMember(3)] + public string Type { get; set; } + + /// <summary> + /// Gets or sets the primary image tag. + /// </summary> + /// <value>The primary image tag.</value> + [ProtoMember(4)] + public Guid? PrimaryImageTag { get; set; } + + /// <summary> + /// Gets a value indicating whether this instance has primary image. + /// </summary> + /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasPrimaryImage + { + get { return PrimaryImageTag.HasValue; } + } + + /// <summary> + /// Occurs when [property changed]. + /// </summary> + public event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/MediaBrowser.Model/DTO/ChapterInfoDto.cs b/MediaBrowser.Model/DTO/ChapterInfoDto.cs new file mode 100644 index 0000000000..89c5b53be9 --- /dev/null +++ b/MediaBrowser.Model/DTO/ChapterInfoDto.cs @@ -0,0 +1,47 @@ +using ProtoBuf; +using System; +using System.ComponentModel; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Class ChapterInfo + /// </summary> + [ProtoContract] + public class ChapterInfoDto : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the start position ticks. + /// </summary> + /// <value>The start position ticks.</value> + [ProtoMember(1)] + public long StartPositionTicks { get; set; } + + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(2)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the image tag. + /// </summary> + /// <value>The image tag.</value> + [ProtoMember(3)] + public Guid? ImageTag { get; set; } + + /// <summary> + /// Gets a value indicating whether this instance has image. + /// </summary> + /// <value><c>true</c> if this instance has image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasImage + { + get { return ImageTag.HasValue; } + } + + public event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/MediaBrowser.Model/DTO/DTOBaseItem.cs b/MediaBrowser.Model/DTO/DTOBaseItem.cs index 61607ab02c..e860b3ac10 100644 --- a/MediaBrowser.Model/DTO/DTOBaseItem.cs +++ b/MediaBrowser.Model/DTO/DTOBaseItem.cs @@ -1,178 +1,639 @@ -using MediaBrowser.Model.Entities;
-using ProtoBuf;
-using System;
-using System.Collections.Generic;
-
-namespace MediaBrowser.Model.DTO
-{
- /// <summary>
- /// This is strictly used as a data transfer object from the api layer.
- /// This holds information about a BaseItem in a format that is convenient for the client.
- /// </summary>
- [ProtoContract]
- public class DtoBaseItem : IHasProviderIds
- {
- [ProtoMember(1)]
- public string Name { get; set; }
-
- [ProtoMember(2)]
- public Guid Id { get; set; }
-
- [ProtoMember(3)]
- public DateTime DateCreated { get; set; }
-
- [ProtoMember(4)]
- public string SortName { get; set; }
-
- [ProtoMember(5)]
- public DateTime? PremiereDate { get; set; }
-
- [ProtoMember(6)]
- public string Path { get; set; }
-
- [ProtoMember(7)]
- public string OfficialRating { get; set; }
-
- [ProtoMember(8)]
- public string Overview { get; set; }
-
- [ProtoMember(9)]
- public string[] Taglines { get; set; }
-
- [ProtoMember(10)]
- public string[] Genres { get; set; }
-
- [ProtoMember(11)]
- public string DisplayMediaType { get; set; }
-
- [ProtoMember(12)]
- public float? CommunityRating { get; set; }
-
- [ProtoMember(13)]
- public long? RunTimeTicks { get; set; }
-
- [ProtoMember(14)]
- public string AspectRatio { get; set; }
-
- [ProtoMember(15)]
- public int? ProductionYear { get; set; }
-
- [ProtoMember(16)]
- public int? IndexNumber { get; set; }
-
- [ProtoMember(17)]
- public int? ParentIndexNumber { get; set; }
-
- [ProtoMember(18)]
- public string TrailerUrl { get; set; }
-
- [ProtoMember(19)]
- public Dictionary<string, string> ProviderIds { get; set; }
-
- [ProtoMember(20)]
- public bool HasBanner { get; set; }
-
- [ProtoMember(21)]
- public bool HasArt { get; set; }
-
- [ProtoMember(22)]
- public bool HasLogo { get; set; }
-
- [ProtoMember(23)]
- public bool HasThumb { get; set; }
-
- [ProtoMember(24)]
- public bool HasPrimaryImage { get; set; }
-
- [ProtoMember(25)]
- public string Language { get; set; }
-
- [ProtoMember(26)]
- public int BackdropCount { get; set; }
-
- [ProtoMember(27)]
- public DtoBaseItem[] Children { get; set; }
-
- [ProtoMember(28)]
- public bool IsFolder { get; set; }
-
- /// <summary>
- /// If the item is a Folder this will determine if it's the Root or not
- /// </summary>
- [ProtoMember(29)]
- public bool? IsRoot { get; set; }
-
- /// <summary>
- /// If the item is a Folder this will determine if it's a VF or not
- /// </summary>
- [ProtoMember(30)]
- public bool? IsVirtualFolder { get; set; }
-
- [ProtoMember(31)]
- public Guid? ParentId { get; set; }
-
- [ProtoMember(32)]
- public string Type { get; set; }
-
- [ProtoMember(33)]
- public BaseItemPerson[] People { get; set; }
-
- [ProtoMember(34)]
- public BaseItemStudio[] Studios { get; set; }
-
- /// <summary>
- /// If the item does not have a logo, this will hold the Id of the Parent that has one.
- /// </summary>
- [ProtoMember(35)]
- public Guid? ParentLogoItemId { get; set; }
-
- /// <summary>
- /// If the item does not have any backdrops, this will hold the Id of the Parent that has one.
- /// </summary>
- [ProtoMember(36)]
- public Guid? ParentBackdropItemId { get; set; }
-
- [ProtoMember(37)]
- public int? ParentBackdropCount { get; set; }
-
- [ProtoMember(38)]
- public DtoBaseItem[] LocalTrailers { get; set; }
-
- [ProtoMember(39)]
- public int LocalTrailerCount { get; set; }
-
- /// <summary>
- /// User data for this item based on the user it's being requested for
- /// </summary>
- [ProtoMember(40)]
- public DtoUserItemData UserData { get; set; }
-
- [ProtoMember(41)]
- public ItemSpecialCounts SpecialCounts { get; set; }
-
- [ProtoMember(42)]
- public AudioInfo AudioInfo { get; set; }
-
- [ProtoMember(43)]
- public VideoInfo VideoInfo { get; set; }
-
- [ProtoMember(44)]
- public SeriesInfo SeriesInfo { get; set; }
-
- [ProtoMember(45)]
- public MovieInfo MovieInfo { get; set; }
-
- [ProtoMember(46)]
- public bool IsNew { get; set; }
-
- public bool IsType(Type type)
- {
- return IsType(type.Name);
- }
-
- public bool IsType(string type)
- {
- return Type.Equals(type, StringComparison.OrdinalIgnoreCase);
- }
- }
-}
+using System.ComponentModel; +using MediaBrowser.Model.Entities; +using ProtoBuf; +using System; +using System.Collections.Generic; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// This is strictly used as a data transfer object from the api layer. + /// This holds information about a BaseItem in a format that is convenient for the client. + /// </summary> + [ProtoContract] + public class DtoBaseItem : IHasProviderIds, INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(1)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the id. + /// </summary> + /// <value>The id.</value> + [ProtoMember(2)] + public string Id { get; set; } + + /// <summary> + /// Gets or sets the date created. + /// </summary> + /// <value>The date created.</value> + [ProtoMember(3)] + public DateTime? DateCreated { get; set; } + + /// <summary> + /// Gets or sets the name of the sort. + /// </summary> + /// <value>The name of the sort.</value> + [ProtoMember(4)] + public string SortName { get; set; } + + /// <summary> + /// Gets or sets the premiere date. + /// </summary> + /// <value>The premiere date.</value> + [ProtoMember(5)] + public DateTime? PremiereDate { get; set; } + + /// <summary> + /// Gets or sets the path. + /// </summary> + /// <value>The path.</value> + [ProtoMember(6)] + public string Path { get; set; } + + /// <summary> + /// Gets or sets the official rating. + /// </summary> + /// <value>The official rating.</value> + [ProtoMember(7)] + public string OfficialRating { get; set; } + + /// <summary> + /// Gets or sets the overview. + /// </summary> + /// <value>The overview.</value> + [ProtoMember(8)] + public string Overview { get; set; } + + /// <summary> + /// Gets or sets the taglines. + /// </summary> + /// <value>The taglines.</value> + [ProtoMember(9)] + public List<string> Taglines { get; set; } + + /// <summary> + /// Gets or sets the genres. + /// </summary> + /// <value>The genres.</value> + [ProtoMember(10)] + public List<string> Genres { get; set; } + + /// <summary> + /// Gets or sets the community rating. + /// </summary> + /// <value>The community rating.</value> + [ProtoMember(11)] + public float? CommunityRating { get; set; } + + /// <summary> + /// Gets or sets the run time ticks. + /// </summary> + /// <value>The run time ticks.</value> + [ProtoMember(12)] + public long? RunTimeTicks { get; set; } + + /// <summary> + /// Gets or sets the aspect ratio. + /// </summary> + /// <value>The aspect ratio.</value> + [ProtoMember(13)] + public string AspectRatio { get; set; } + + /// <summary> + /// Gets or sets the production year. + /// </summary> + /// <value>The production year.</value> + [ProtoMember(14)] + public int? ProductionYear { get; set; } + + /// <summary> + /// Gets or sets the index number. + /// </summary> + /// <value>The index number.</value> + [ProtoMember(15)] + public int? IndexNumber { get; set; } + + /// <summary> + /// Gets or sets the parent index number. + /// </summary> + /// <value>The parent index number.</value> + [ProtoMember(16)] + public int? ParentIndexNumber { get; set; } + + /// <summary> + /// Gets or sets the trailer urls. + /// </summary> + /// <value>The trailer urls.</value> + [ProtoMember(17)] + public List<string> TrailerUrls { get; set; } + + /// <summary> + /// Gets or sets the provider ids. + /// </summary> + /// <value>The provider ids.</value> + [ProtoMember(18)] + public Dictionary<string, string> ProviderIds { get; set; } + + /// <summary> + /// Gets or sets the language. + /// </summary> + /// <value>The language.</value> + [ProtoMember(24)] + public string Language { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is folder. + /// </summary> + /// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value> + [ProtoMember(25)] + public bool IsFolder { get; set; } + + /// <summary> + /// If the item is a Folder this will determine if it's the Root or not + /// </summary> + /// <value><c>null</c> if [is root] contains no value, <c>true</c> if [is root]; otherwise, <c>false</c>.</value> + [ProtoMember(26)] + public bool? IsRoot { get; set; } + + /// <summary> + /// If the item is a Folder this will determine if it's a VF or not + /// </summary> + /// <value><c>null</c> if [is virtual folder] contains no value, <c>true</c> if [is virtual folder]; otherwise, <c>false</c>.</value> + [ProtoMember(27)] + public bool? IsVirtualFolder { get; set; } + + /// <summary> + /// Gets or sets the parent id. + /// </summary> + /// <value>The parent id.</value> + [ProtoMember(28)] + public string ParentId { get; set; } + + /// <summary> + /// Gets or sets the type. + /// </summary> + /// <value>The type.</value> + [ProtoMember(29)] + public string Type { get; set; } + + /// <summary> + /// Gets or sets the people. + /// </summary> + /// <value>The people.</value> + [ProtoMember(30)] + public BaseItemPerson[] People { get; set; } + + /// <summary> + /// Gets or sets the studios. + /// </summary> + /// <value>The studios.</value> + [ProtoMember(31)] + public List<string> Studios { get; set; } + + /// <summary> + /// If the item does not have a logo, this will hold the Id of the Parent that has one. + /// </summary> + /// <value>The parent logo item id.</value> + [ProtoMember(32)] + public string ParentLogoItemId { get; set; } + + /// <summary> + /// If the item does not have any backdrops, this will hold the Id of the Parent that has one. + /// </summary> + /// <value>The parent backdrop item id.</value> + [ProtoMember(33)] + public string ParentBackdropItemId { get; set; } + + /// <summary> + /// Gets or sets the parent backdrop image tags. + /// </summary> + /// <value>The parent backdrop image tags.</value> + [ProtoMember(34)] + public List<Guid> ParentBackdropImageTags { get; set; } + + /// <summary> + /// Gets or sets the local trailer count. + /// </summary> + /// <value>The local trailer count.</value> + [ProtoMember(35)] + public int? LocalTrailerCount { get; set; } + + /// <summary> + /// User data for this item based on the user it's being requested for + /// </summary> + /// <value>The user data.</value> + [ProtoMember(36)] + public DtoUserItemData UserData { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is new. + /// </summary> + /// <value><c>true</c> if this instance is new; otherwise, <c>false</c>.</value> + [ProtoMember(37)] + public bool IsNew { get; set; } + + /// <summary> + /// Gets or sets the recently added item count. + /// </summary> + /// <value>The recently added item count.</value> + [ProtoMember(38)] + public int? RecentlyAddedItemCount { get; set; } + + /// <summary> + /// Gets or sets the recently added un played item count. + /// </summary> + /// <value>The recently added un played item count.</value> + [ProtoMember(39)] + public int? RecentlyAddedUnPlayedItemCount { get; set; } + + /// <summary> + /// Gets or sets the resumable item count. + /// </summary> + /// <value>The resumable item count.</value> + [ProtoMember(40)] + public int? ResumableItemCount { get; set; } + + /// <summary> + /// Gets or sets the played percentage. + /// </summary> + /// <value>The played percentage.</value> + [ProtoMember(41)] + public double? PlayedPercentage { get; set; } + + /// <summary> + /// Gets or sets the recursive item count. + /// </summary> + /// <value>The recursive item count.</value> + [ProtoMember(42)] + public int? RecursiveItemCount { get; set; } + + /// <summary> + /// Gets or sets the favorite item count. + /// </summary> + /// <value>The favorite item count.</value> + [ProtoMember(43)] + public int? FavoriteItemCount { get; set; } + + /// <summary> + /// Gets or sets the child count. + /// </summary> + /// <value>The child count.</value> + [ProtoMember(44)] + public int? ChildCount { get; set; } + + /// <summary> + /// Gets or sets the name of the series. + /// </summary> + /// <value>The name of the series.</value> + [ProtoMember(45)] + public string SeriesName { get; set; } + + /// <summary> + /// Gets or sets the series id. + /// </summary> + /// <value>The series id.</value> + [ProtoMember(46)] + public string SeriesId { get; set; } + + /// <summary> + /// Gets or sets the recently played item count. + /// </summary> + /// <value>The recently played item count.</value> + [ProtoMember(47)] + public int? RecentlyPlayedItemCount { get; set; } + + /// <summary> + /// Gets or sets the special feature count. + /// </summary> + /// <value>The special feature count.</value> + [ProtoMember(48)] + public int? SpecialFeatureCount { get; set; } + + /// <summary> + /// Gets or sets the display preferences. + /// </summary> + /// <value>The display preferences.</value> + [ProtoMember(49)] + public DisplayPreferences DisplayPreferences { get; set; } + + /// <summary> + /// Gets or sets the status. + /// </summary> + /// <value>The status.</value> + [ProtoMember(50)] + public SeriesStatus? Status { get; set; } + + /// <summary> + /// Gets or sets the air time. + /// </summary> + /// <value>The air time.</value> + [ProtoMember(51)] + public string AirTime { get; set; } + + /// <summary> + /// Gets or sets the air days. + /// </summary> + /// <value>The air days.</value> + [ProtoMember(52)] + public List<DayOfWeek> AirDays { get; set; } + + /// <summary> + /// Gets or sets the sort options. + /// </summary> + /// <value>The sort options.</value> + [ProtoMember(53)] + public string[] SortOptions { get; set; } + + /// <summary> + /// Gets or sets the index options. + /// </summary> + /// <value>The index options.</value> + [ProtoMember(54)] + public string[] IndexOptions { get; set; } + + /// <summary> + /// Gets or sets the primary image aspect ratio. + /// </summary> + /// <value>The primary image aspect ratio.</value> + [ProtoMember(55)] + public double? PrimaryImageAspectRatio { get; set; } + + /// <summary> + /// Gets or sets the artist. + /// </summary> + /// <value>The artist.</value> + [ProtoMember(56)] + public string Artist { get; set; } + + /// <summary> + /// Gets or sets the album. + /// </summary> + /// <value>The album.</value> + [ProtoMember(57)] + public string Album { get; set; } + + /// <summary> + /// Gets or sets the album artist. + /// </summary> + /// <value>The album artist.</value> + [ProtoMember(58)] + public string AlbumArtist { get; set; } + + /// <summary> + /// Gets or sets the media streams. + /// </summary> + /// <value>The media streams.</value> + [ProtoMember(59)] + public List<MediaStream> MediaStreams { get; set; } + + /// <summary> + /// Gets or sets the type of the video. + /// </summary> + /// <value>The type of the video.</value> + [ProtoMember(60)] + public VideoType? VideoType { get; set; } + + /// <summary> + /// Gets or sets the display type of the media. + /// </summary> + /// <value>The display type of the media.</value> + [ProtoMember(61)] + public string DisplayMediaType { get; set; } + + /// <summary> + /// Determines whether the specified type is type. + /// </summary> + /// <param name="type">The type.</param> + /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns> + public bool IsType(Type type) + { + return IsType(type.Name); + } + + /// <summary> + /// Determines whether the specified type is type. + /// </summary> + /// <param name="type">The type.</param> + /// <returns><c>true</c> if the specified type is type; otherwise, <c>false</c>.</returns> + public bool IsType(string type) + { + return Type.Equals(type, StringComparison.OrdinalIgnoreCase); + } + + /// <summary> + /// Gets a value indicating whether this instance can resume. + /// </summary> + /// <value><c>true</c> if this instance can resume; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool CanResume + { + get { return UserData != null && UserData.PlaybackPositionTicks > 0; } + } + + /// <summary> + /// Gets the resume position ticks. + /// </summary> + /// <value>The resume position ticks.</value> + [IgnoreDataMember] + public long ResumePositionTicks + { + get { return UserData == null ? 0 : UserData.PlaybackPositionTicks; } + } + + /// <summary> + /// Gets or sets the image tags. + /// </summary> + /// <value>The image tags.</value> + [ProtoMember(62)] + public Dictionary<ImageType, Guid> ImageTags { get; set; } + + /// <summary> + /// Gets or sets the backdrop image tags. + /// </summary> + /// <value>The backdrop image tags.</value> + [ProtoMember(63)] + public List<Guid> BackdropImageTags { get; set; } + + /// <summary> + /// Gets or sets the parent logo image tag. + /// </summary> + /// <value>The parent logo image tag.</value> + [ProtoMember(64)] + public Guid? ParentLogoImageTag { get; set; } + + /// <summary> + /// Gets or sets the chapters. + /// </summary> + /// <value>The chapters.</value> + [ProtoMember(65)] + public List<ChapterInfoDto> Chapters { get; set; } + + /// <summary> + /// Gets or sets the video format. + /// </summary> + /// <value>The video format.</value> + [ProtoMember(66)] + public VideoFormat? VideoFormat { get; set; } + + /// <summary> + /// Gets or sets the type of the location. + /// </summary> + /// <value>The type of the location.</value> + [ProtoMember(67)] + public LocationType LocationType { get; set; } + + /// <summary> + /// Gets or sets the type of the iso. + /// </summary> + /// <value>The type of the iso.</value> + [ProtoMember(68)] + public IsoType? IsoType { get; set; } + + /// <summary> + /// Gets or sets the type of the media. + /// </summary> + /// <value>The type of the media.</value> + [ProtoMember(69)] + public string MediaType { get; set; } + + /// <summary> + /// Gets the backdrop count. + /// </summary> + /// <value>The backdrop count.</value> + [IgnoreDataMember] + public int BackdropCount + { + get { return BackdropImageTags == null ? 0 : BackdropImageTags.Count; } + } + + /// <summary> + /// Gets a value indicating whether this instance has banner. + /// </summary> + /// <value><c>true</c> if this instance has banner; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasBanner + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Banner); } + } + + /// <summary> + /// Gets a value indicating whether this instance has art. + /// </summary> + /// <value><c>true</c> if this instance has art; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasArtImage + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Art); } + } + + /// <summary> + /// Gets a value indicating whether this instance has logo. + /// </summary> + /// <value><c>true</c> if this instance has logo; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasLogo + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Logo); } + } + + /// <summary> + /// Gets a value indicating whether this instance has thumb. + /// </summary> + /// <value><c>true</c> if this instance has thumb; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasThumb + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Thumb); } + } + + /// <summary> + /// Gets a value indicating whether this instance has primary image. + /// </summary> + /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasPrimaryImage + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); } + } + + /// <summary> + /// Gets a value indicating whether this instance has disc image. + /// </summary> + /// <value><c>true</c> if this instance has disc image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasDiscImage + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Disc); } + } + + /// <summary> + /// Gets a value indicating whether this instance has box image. + /// </summary> + /// <value><c>true</c> if this instance has box image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasBoxImage + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Box); } + } + + /// <summary> + /// Gets a value indicating whether this instance has menu image. + /// </summary> + /// <value><c>true</c> if this instance has menu image; otherwise, <c>false</c>.</value> + public bool HasMenuImage + { + get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Menu); } + } + + /// <summary> + /// Gets a value indicating whether this instance is video. + /// </summary> + /// <value><c>true</c> if this instance is video; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasTrailer + { + get { return LocalTrailerCount > 0 || (TrailerUrls != null && TrailerUrls.Count > 0); } + } + + /// <summary> + /// Gets a value indicating whether this instance is video. + /// </summary> + /// <value><c>true</c> if this instance is video; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool IsVideo + { + get { return string.Equals(MediaType, Entities.MediaType.Video, StringComparison.OrdinalIgnoreCase); } + } + + /// <summary> + /// Gets a value indicating whether this instance is audio. + /// </summary> + /// <value><c>true</c> if this instance is audio; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool IsAudio + { + get { return string.Equals(MediaType, Entities.MediaType.Audio, StringComparison.OrdinalIgnoreCase); } + } + + /// <summary> + /// Gets a value indicating whether this instance is game. + /// </summary> + /// <value><c>true</c> if this instance is game; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool IsGame + { + get { return string.Equals(MediaType, Entities.MediaType.Game, StringComparison.OrdinalIgnoreCase); } + } + + /// <summary> + /// Occurs when [property changed]. + /// </summary> + public event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/MediaBrowser.Model/DTO/DTOUser.cs b/MediaBrowser.Model/DTO/DTOUser.cs index 766cd741ee..77627f86b0 100644 --- a/MediaBrowser.Model/DTO/DTOUser.cs +++ b/MediaBrowser.Model/DTO/DTOUser.cs @@ -1,27 +1,76 @@ -using ProtoBuf;
-using System;
-
-namespace MediaBrowser.Model.DTO
-{
- [ProtoContract]
- public class DtoUser
- {
- [ProtoMember(1)]
- public string Name { get; set; }
-
- [ProtoMember(2)]
- public Guid Id { get; set; }
-
- [ProtoMember(3)]
- public bool HasImage { get; set; }
-
- [ProtoMember(4)]
- public bool HasPassword { get; set; }
-
- [ProtoMember(5)]
- public DateTime? LastLoginDate { get; set; }
-
- [ProtoMember(6)]
- public DateTime? LastActivityDate { get; set; }
- }
-}
+using System.ComponentModel; +using MediaBrowser.Model.Configuration; +using ProtoBuf; +using System; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Class DtoUser + /// </summary> + [ProtoContract] + public class DtoUser : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(1)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the id. + /// </summary> + /// <value>The id.</value> + [ProtoMember(2)] + public Guid Id { get; set; } + + /// <summary> + /// Gets or sets the primary image tag. + /// </summary> + /// <value>The primary image tag.</value> + [ProtoMember(3)] + public Guid? PrimaryImageTag { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance has password. + /// </summary> + /// <value><c>true</c> if this instance has password; otherwise, <c>false</c>.</value> + [ProtoMember(4)] + public bool HasPassword { get; set; } + + /// <summary> + /// Gets or sets the last login date. + /// </summary> + /// <value>The last login date.</value> + [ProtoMember(5)] + public DateTime? LastLoginDate { get; set; } + + /// <summary> + /// Gets or sets the last activity date. + /// </summary> + /// <value>The last activity date.</value> + [ProtoMember(6)] + public DateTime? LastActivityDate { get; set; } + + /// <summary> + /// Gets or sets the configuration. + /// </summary> + /// <value>The configuration.</value> + [ProtoMember(7)] + public UserConfiguration Configuration { get; set; } + + /// <summary> + /// Gets a value indicating whether this instance has primary image. + /// </summary> + /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasPrimaryImage + { + get { return PrimaryImageTag.HasValue; } + } + + public event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/MediaBrowser.Model/DTO/DTOUserItemData.cs b/MediaBrowser.Model/DTO/DTOUserItemData.cs index ce258f16f6..8d24316d01 100644 --- a/MediaBrowser.Model/DTO/DTOUserItemData.cs +++ b/MediaBrowser.Model/DTO/DTOUserItemData.cs @@ -1,23 +1,56 @@ -using ProtoBuf;
-
-namespace MediaBrowser.Model.DTO
-{
- [ProtoContract]
- public class DtoUserItemData
- {
- [ProtoMember(1)]
- public float? Rating { get; set; }
-
- [ProtoMember(2)]
- public long PlaybackPositionTicks { get; set; }
-
- [ProtoMember(3)]
- public int PlayCount { get; set; }
-
- [ProtoMember(4)]
- public bool IsFavorite { get; set; }
-
- [ProtoMember(5)]
- public bool? Likes { get; set; }
- }
-}
+using System.ComponentModel; +using ProtoBuf; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Class DtoUserItemData + /// </summary> + [ProtoContract] + public class DtoUserItemData : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the rating. + /// </summary> + /// <value>The rating.</value> + [ProtoMember(1)] + public float? Rating { get; set; } + + /// <summary> + /// Gets or sets the playback position ticks. + /// </summary> + /// <value>The playback position ticks.</value> + [ProtoMember(2)] + public long PlaybackPositionTicks { get; set; } + + /// <summary> + /// Gets or sets the play count. + /// </summary> + /// <value>The play count.</value> + [ProtoMember(3)] + public int PlayCount { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is favorite. + /// </summary> + /// <value><c>true</c> if this instance is favorite; otherwise, <c>false</c>.</value> + [ProtoMember(4)] + public bool IsFavorite { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this <see cref="DtoUserItemData" /> is likes. + /// </summary> + /// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value> + [ProtoMember(5)] + public bool? Likes { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this <see cref="DtoUserItemData" /> is played. + /// </summary> + /// <value><c>true</c> if played; otherwise, <c>false</c>.</value> + [ProtoMember(6)] + public bool Played { get; set; } + + public event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/MediaBrowser.Model/DTO/IBNItem.cs b/MediaBrowser.Model/DTO/IBNItem.cs deleted file mode 100644 index 507a37272b..0000000000 --- a/MediaBrowser.Model/DTO/IBNItem.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System;
-using ProtoBuf;
-
-namespace MediaBrowser.Model.DTO
-{
- /// <summary>
- /// This is a stub class used by the api to get IBN types along with their item counts
- /// </summary>
- [ProtoContract]
- public class IbnItem
- {
- /// <summary>
- /// The name of the person, genre, etc
- /// </summary>
- [ProtoMember(1)]
- public string Name { get; set; }
-
- /// <summary>
- /// The id of the person, genre, etc
- /// </summary>
- [ProtoMember(2)]
- public Guid Id { get; set; }
-
- [ProtoMember(3)]
- public bool HasImage { get; set; }
-
- /// <summary>
- /// The number of items that have the genre, year, studio, etc
- /// </summary>
- [ProtoMember(4)]
- public int BaseItemCount { get; set; }
- }
-
- /// <summary>
- /// This is used by the api to get information about a Person within a BaseItem
- /// </summary>
- [ProtoContract]
- public class BaseItemPerson
- {
- [ProtoMember(1)]
- public string Name { get; set; }
-
- [ProtoMember(2)]
- public string Overview { get; set; }
-
- [ProtoMember(3)]
- public string Type { get; set; }
-
- [ProtoMember(4)]
- public bool HasImage { get; set; }
- }
-
- /// <summary>
- /// This is used by the api to get information about a studio within a BaseItem
- /// </summary>
- [ProtoContract]
- public class BaseItemStudio
- {
- [ProtoMember(1)]
- public string Name { get; set; }
-
- [ProtoMember(2)]
- public bool HasImage { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/DTO/ImageOptions.cs b/MediaBrowser.Model/DTO/ImageOptions.cs new file mode 100644 index 0000000000..803ad59878 --- /dev/null +++ b/MediaBrowser.Model/DTO/ImageOptions.cs @@ -0,0 +1,61 @@ + +using System; +using MediaBrowser.Model.Entities; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Class ImageOptions + /// </summary> + public class ImageOptions + { + /// <summary> + /// Gets or sets the type of the image. + /// </summary> + /// <value>The type of the image.</value> + public ImageType ImageType { get; set; } + + /// <summary> + /// Gets or sets the index of the image. + /// </summary> + /// <value>The index of the image.</value> + public int? ImageIndex { get; set; } + + /// <summary> + /// Gets or sets the width. + /// </summary> + /// <value>The width.</value> + public int? Width { get; set; } + + /// <summary> + /// Gets or sets the height. + /// </summary> + /// <value>The height.</value> + public int? Height { get; set; } + + /// <summary> + /// Gets or sets the width of the max. + /// </summary> + /// <value>The width of the max.</value> + public int? MaxWidth { get; set; } + + /// <summary> + /// Gets or sets the height of the max. + /// </summary> + /// <value>The height of the max.</value> + public int? MaxHeight { get; set; } + + /// <summary> + /// Gets or sets the quality. + /// </summary> + /// <value>The quality.</value> + public int? Quality { get; set; } + + /// <summary> + /// Gets or sets the image tag. + /// If set this will result in strong, unconditional response caching + /// </summary> + /// <value>The hash.</value> + public Guid? Tag { get; set; } + } +} diff --git a/MediaBrowser.Model/DTO/ItemFields.cs b/MediaBrowser.Model/DTO/ItemFields.cs new file mode 100644 index 0000000000..9badf9ca97 --- /dev/null +++ b/MediaBrowser.Model/DTO/ItemFields.cs @@ -0,0 +1,119 @@ + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Used to control the data that gets attached to DtoBaseItems + /// </summary> + public enum ItemFields + { + /// <summary> + /// Audio properties + /// </summary> + AudioInfo, + + /// <summary> + /// The chapters + /// </summary> + Chapters, + + /// <summary> + /// The date created of the item + /// </summary> + DateCreated, + + /// <summary> + /// The display media type + /// </summary> + DisplayMediaType, + + /// <summary> + /// Item display preferences + /// </summary> + DisplayPreferences, + + /// <summary> + /// Genres + /// </summary> + Genres, + + /// <summary> + /// Child count, recursive child count, etc + /// </summary> + ItemCounts, + + /// <summary> + /// The fields that the server supports indexing on + /// </summary> + IndexOptions, + + /// <summary> + /// The item overview + /// </summary> + Overview, + + /// <summary> + /// The id of the item's parent + /// </summary> + ParentId, + + /// <summary> + /// The physical path of the item + /// </summary> + Path, + + /// <summary> + /// The list of people for the item + /// </summary> + People, + + /// <summary> + /// Imdb, tmdb, etc + /// </summary> + ProviderIds, + + /// <summary> + /// The aspect ratio of the primary image + /// </summary> + PrimaryImageAspectRatio, + + /// <summary> + /// AirDays, status, SeriesName, etc + /// </summary> + SeriesInfo, + + /// <summary> + /// The sort name of the item + /// </summary> + SortName, + + /// <summary> + /// The fields that the server supports sorting on + /// </summary> + SortOptions, + + /// <summary> + /// The studios of the item + /// </summary> + Studios, + + /// <summary> + /// The taglines of the item + /// </summary> + Taglines, + + /// <summary> + /// The trailer url of the item + /// </summary> + TrailerUrls, + + /// <summary> + /// The user data of the item + /// </summary> + UserData, + + /// <summary> + /// The media streams + /// </summary> + MediaStreams + } +} diff --git a/MediaBrowser.Model/DTO/ItemFilter.cs b/MediaBrowser.Model/DTO/ItemFilter.cs new file mode 100644 index 0000000000..a282bbbe0b --- /dev/null +++ b/MediaBrowser.Model/DTO/ItemFilter.cs @@ -0,0 +1,42 @@ + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Enum ItemFilter + /// </summary> + public enum ItemFilter + { + /// <summary> + /// The item is a folder + /// </summary> + IsFolder = 1, + /// <summary> + /// The item is not folder + /// </summary> + IsNotFolder = 2, + /// <summary> + /// The item is unplayed + /// </summary> + IsUnplayed = 3, + /// <summary> + /// The item is played + /// </summary> + IsPlayed = 4, + /// <summary> + /// The item is a favorite + /// </summary> + IsFavorite = 5, + /// <summary> + /// The item is recently added + /// </summary> + IsRecentlyAdded = 6, + /// <summary> + /// The item is resumable + /// </summary> + IsResumable = 7, + /// <summary> + /// The item is recently played + /// </summary> + IsRecentlyPlayed = 8 + } +} diff --git a/MediaBrowser.Model/DTO/ItemQuery.cs b/MediaBrowser.Model/DTO/ItemQuery.cs new file mode 100644 index 0000000000..dd2fef79e8 --- /dev/null +++ b/MediaBrowser.Model/DTO/ItemQuery.cs @@ -0,0 +1,131 @@ +using MediaBrowser.Model.Entities; +using System; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Contains all the possible parameters that can be used to query for items + /// </summary> + public class ItemQuery + { + /// <summary> + /// The user to localize search results for + /// </summary> + /// <value>The user id.</value> + public Guid UserId { get; set; } + + /// <summary> + /// Specify this to localize the search to a specific item or folder. Omit to use the root. + /// </summary> + /// <value>The parent id.</value> + public string ParentId { get; set; } + + /// <summary> + /// Skips over a given number of items within the results. Use for paging. + /// </summary> + /// <value>The start index.</value> + public int? StartIndex { get; set; } + + /// <summary> + /// The maximum number of items to return + /// </summary> + /// <value>The limit.</value> + public int? Limit { get; set; } + + /// <summary> + /// What to sort the results by + /// </summary> + /// <value>The sort by.</value> + public ItemSortBy[] SortBy { get; set; } + + /// <summary> + /// The sort order to return results with + /// </summary> + /// <value>The sort order.</value> + public SortOrder? SortOrder { get; set; } + + /// <summary> + /// Filters to apply to the results + /// </summary> + /// <value>The filters.</value> + public ItemFilter[] Filters { get; set; } + + /// <summary> + /// Fields to return within the items, in addition to basic information + /// </summary> + /// <value>The fields.</value> + public ItemFields[] Fields { get; set; } + + /// <summary> + /// Whether or not to perform the query recursively + /// </summary> + /// <value><c>true</c> if recursive; otherwise, <c>false</c>.</value> + public bool Recursive { get; set; } + + /// <summary> + /// Limit results to items containing specific genres + /// </summary> + /// <value>The genres.</value> + public string[] Genres { get; set; } + + /// <summary> + /// Limit results to items containing specific studios + /// </summary> + /// <value>The studios.</value> + public string[] Studios { get; set; } + + /// <summary> + /// Gets or sets the exclude item types. + /// </summary> + /// <value>The exclude item types.</value> + public string[] ExcludeItemTypes { get; set; } + + /// <summary> + /// Gets or sets the include item types. + /// </summary> + /// <value>The include item types.</value> + public string[] IncludeItemTypes { get; set; } + + /// <summary> + /// Limit results to items containing specific years + /// </summary> + /// <value>The years.</value> + public int[] Years { get; set; } + + /// <summary> + /// Limit results to items containing a specific person + /// </summary> + /// <value>The person.</value> + public string Person { get; set; } + + /// <summary> + /// If the Person filter is used, this can also be used to restrict to a specific person type + /// </summary> + /// <value>The type of the person.</value> + public string PersonType { get; set; } + + /// <summary> + /// Search characters used to find items + /// </summary> + /// <value>The index by.</value> + public string SearchTerm { get; set; } + + /// <summary> + /// The dynamic, localized index function name + /// </summary> + /// <value>The index by.</value> + public string IndexBy { get; set; } + + /// <summary> + /// The dynamic, localized sort function name + /// </summary> + /// <value>The dynamic sort by.</value> + public string DynamicSortBy { get; set; } + + /// <summary> + /// Gets or sets the image types. + /// </summary> + /// <value>The image types.</value> + public ImageType[] ImageTypes { get; set; } + } +} diff --git a/MediaBrowser.Model/DTO/ItemSortBy.cs b/MediaBrowser.Model/DTO/ItemSortBy.cs new file mode 100644 index 0000000000..13d0c2e1fd --- /dev/null +++ b/MediaBrowser.Model/DTO/ItemSortBy.cs @@ -0,0 +1,42 @@ + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Enum ItemSortBy + /// </summary> + public enum ItemSortBy + { + /// <summary> + /// The album + /// </summary> + Album, + /// <summary> + /// The album artist + /// </summary> + AlbumArtist, + /// <summary> + /// The artist + /// </summary> + Artist, + /// <summary> + /// The date created + /// </summary> + DateCreated, + /// <summary> + /// The date played + /// </summary> + DatePlayed, + /// <summary> + /// The premiere date + /// </summary> + PremiereDate, + /// <summary> + /// The sort name + /// </summary> + SortName, + /// <summary> + /// The random + /// </summary> + Random + } +} diff --git a/MediaBrowser.Model/DTO/ItemsResult.cs b/MediaBrowser.Model/DTO/ItemsResult.cs new file mode 100644 index 0000000000..e155136d41 --- /dev/null +++ b/MediaBrowser.Model/DTO/ItemsResult.cs @@ -0,0 +1,25 @@ +using ProtoBuf; + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Represents the result of a query for items + /// </summary> + [ProtoContract] + public class ItemsResult + { + /// <summary> + /// The set of items returned based on sorting, paging, etc + /// </summary> + /// <value>The items.</value> + [ProtoMember(1)] + public DtoBaseItem[] Items { get; set; } + + /// <summary> + /// The total number of records available + /// </summary> + /// <value>The total record count.</value> + [ProtoMember(2)] + public int TotalRecordCount { get; set; } + } +} diff --git a/MediaBrowser.Model/DTO/MediaType.cs b/MediaBrowser.Model/DTO/MediaType.cs new file mode 100644 index 0000000000..6ea730816e --- /dev/null +++ b/MediaBrowser.Model/DTO/MediaType.cs @@ -0,0 +1,22 @@ + +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Enum MediaType + /// </summary> + public enum MediaType + { + /// <summary> + /// The audio + /// </summary> + Audio, + /// <summary> + /// The game + /// </summary> + Game, + /// <summary> + /// The video + /// </summary> + Video + } +} diff --git a/MediaBrowser.Model/DTO/MovieInfo.cs b/MediaBrowser.Model/DTO/MovieInfo.cs deleted file mode 100644 index 192c805658..0000000000 --- a/MediaBrowser.Model/DTO/MovieInfo.cs +++ /dev/null @@ -1,11 +0,0 @@ -using ProtoBuf;
-
-namespace MediaBrowser.Model.DTO
-{
- [ProtoContract]
- public class MovieInfo
- {
- [ProtoMember(1)]
- public int SpecialFeatureCount { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/DTO/PluginInfo.cs b/MediaBrowser.Model/DTO/PluginInfo.cs deleted file mode 100644 index 12a22b98fb..0000000000 --- a/MediaBrowser.Model/DTO/PluginInfo.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System;
-using ProtoBuf;
-
-namespace MediaBrowser.Model.DTO
-{
- /// <summary>
- /// This is a serializable stub class that is used by the api to provide information about installed plugins.
- /// </summary>
- [ProtoContract]
- public class PluginInfo
- {
- [ProtoMember(1)]
- public string Name { get; set; }
-
- [ProtoMember(2)]
- public bool Enabled { get; set; }
-
- [ProtoMember(3)]
- public bool DownloadToUI { get; set; }
-
- [ProtoMember(4)]
- public DateTime ConfigurationDateLastModified { get; set; }
-
- [ProtoMember(5)]
- public string Version { get; set; }
-
- [ProtoMember(6)]
- public string AssemblyFileName { get; set; }
-
- [ProtoMember(7)]
- public string ConfigurationFileName { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/DTO/SeriesInfo.cs b/MediaBrowser.Model/DTO/SeriesInfo.cs deleted file mode 100644 index ebb39c8c44..0000000000 --- a/MediaBrowser.Model/DTO/SeriesInfo.cs +++ /dev/null @@ -1,18 +0,0 @@ -using ProtoBuf;
-using System;
-
-namespace MediaBrowser.Model.DTO
-{
- [ProtoContract]
- public class SeriesInfo
- {
- [ProtoMember(1)]
- public string Status { get; set; }
-
- [ProtoMember(2)]
- public string AirTime { get; set; }
-
- [ProtoMember(3)]
- public DayOfWeek[] AirDays { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/DTO/StreamOptions.cs b/MediaBrowser.Model/DTO/StreamOptions.cs new file mode 100644 index 0000000000..fac12220a2 --- /dev/null +++ b/MediaBrowser.Model/DTO/StreamOptions.cs @@ -0,0 +1,174 @@ +namespace MediaBrowser.Model.DTO +{ + /// <summary> + /// Class VideoStreamOptions + /// </summary> + public class VideoStreamOptions : StreamOptions + { + /// <summary> + /// Gets or sets the video codec. + /// Omit to copy + /// </summary> + /// <value>The video codec.</value> + public VideoCodecs? VideoCodec { get; set; } + + /// <summary> + /// Gets or sets the video bit rate. + /// </summary> + /// <value>The video bit rate.</value> + public int? VideoBitRate { get; set; } + + /// <summary> + /// Gets or sets the width. + /// </summary> + /// <value>The width.</value> + public int? Width { get; set; } + + /// <summary> + /// Gets or sets the height. + /// </summary> + /// <value>The height.</value> + public int? Height { get; set; } + + /// <summary> + /// Gets or sets the width of the max. + /// </summary> + /// <value>The width of the max.</value> + public int? MaxWidth { get; set; } + + /// <summary> + /// Gets or sets the height of the max. + /// </summary> + /// <value>The height of the max.</value> + public int? MaxHeight { get; set; } + + /// <summary> + /// Gets or sets the frame rate. + /// </summary> + /// <value>The frame rate.</value> + public double? FrameRate { get; set; } + + /// <summary> + /// Gets or sets the index of the audio stream. + /// </summary> + /// <value>The index of the audio stream.</value> + public int? AudioStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the index of the video stream. + /// </summary> + /// <value>The index of the video stream.</value> + public int? VideoStreamIndex { get; set; } + + /// <summary> + /// Gets or sets the index of the subtitle stream. + /// </summary> + /// <value>The index of the subtitle stream.</value> + public int? SubtitleStreamIndex { get; set; } + } + + /// <summary> + /// Class StreamOptions + /// </summary> + public abstract class StreamOptions + { + /// <summary> + /// Gets or sets the audio bit rate. + /// </summary> + /// <value>The audio bit rate.</value> + public int? AudioBitRate { get; set; } + + /// <summary> + /// Gets or sets the audio codec. + /// Omit to copy the original stream + /// </summary> + /// <value>The audio encoding format.</value> + public AudioCodecs? AudioCodec { get; set; } + + /// <summary> + /// Gets or sets the item id. + /// </summary> + /// <value>The item id.</value> + public string ItemId { get; set; } + + /// <summary> + /// Gets or sets the max audio channels. + /// </summary> + /// <value>The max audio channels.</value> + public int? MaxAudioChannels { get; set; } + + /// <summary> + /// Gets or sets the max audio sample rate. + /// </summary> + /// <value>The max audio sample rate.</value> + public int? MaxAudioSampleRate { get; set; } + + /// <summary> + /// Gets or sets the start time ticks. + /// </summary> + /// <value>The start time ticks.</value> + public long? StartTimeTicks { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether the original media should be served statically + /// Only used with progressive streaming + /// </summary> + /// <value><c>true</c> if static; otherwise, <c>false</c>.</value> + public bool? Static { get; set; } + + /// <summary> + /// Gets or sets the output file extension. + /// </summary> + /// <value>The output file extension.</value> + public string OutputFileExtension { get; set; } + } + + /// <summary> + /// These are the codecs the api is capable of encoding to + /// </summary> + public enum AudioCodecs + { + /// <summary> + /// The aac + /// </summary> + Aac, + /// <summary> + /// The MP3 + /// </summary> + Mp3, + /// <summary> + /// The vorbis + /// </summary> + Vorbis, + /// <summary> + /// The wma + /// </summary> + Wma + } + + /// <summary> + /// Enum VideoCodecs + /// </summary> + public enum VideoCodecs + { + /// <summary> + /// The H264 + /// </summary> + H264, + + /// <summary> + /// The theora + /// </summary> + Theora, + + /// <summary> + /// The VPX + /// </summary> + Vpx, + + /// <summary> + /// The WMV + /// </summary> + Wmv + } +} diff --git a/MediaBrowser.Model/DTO/VideoInfo.cs b/MediaBrowser.Model/DTO/VideoInfo.cs deleted file mode 100644 index 8e0d6f38f1..0000000000 --- a/MediaBrowser.Model/DTO/VideoInfo.cs +++ /dev/null @@ -1,30 +0,0 @@ -using MediaBrowser.Model.Entities;
-using ProtoBuf;
-
-namespace MediaBrowser.Model.DTO
-{
- [ProtoContract]
- public class VideoInfo
- {
- [ProtoMember(1)]
- public string Codec { get; set; }
-
- [ProtoMember(2)]
- public int Height { get; set; }
-
- [ProtoMember(3)]
- public int Width { get; set; }
-
- [ProtoMember(4)]
- public string ScanType { get; set; }
-
- [ProtoMember(5)]
- public VideoType VideoType { get; set; }
-
- [ProtoMember(6)]
- public SubtitleStream[] Subtitles { get; set; }
-
- [ProtoMember(7)]
- public AudioStream[] AudioStreams { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/DTO/VideoOutputFormats.cs b/MediaBrowser.Model/DTO/VideoOutputFormats.cs deleted file mode 100644 index c3840bff63..0000000000 --- a/MediaBrowser.Model/DTO/VideoOutputFormats.cs +++ /dev/null @@ -1,22 +0,0 @@ -
-namespace MediaBrowser.Model.DTO
-{
- /// <summary>
- /// These are the video output formats that the api is cabaple of streaming
- /// This does not limit the inputs, only the outputs.
- /// </summary>
- public enum VideoOutputFormats
- {
- Avi,
- Asf,
- M4V,
- Mkv,
- Mov,
- Mp4,
- Ogv,
- ThreeGp,
- Ts,
- Webm,
- Wmv
- }
-}
|
