diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-09 23:16:15 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-06-09 23:16:15 -0400 |
| commit | 8329710cf5527f24ba99ef03816edcf079a20a29 (patch) | |
| tree | a345ffaa50cc975be96c726d314e3d2b0bac8cce /MediaBrowser.Model/Dto | |
| parent | 01def9a1e0a3617d81bdc6bacae2e2e4392018c7 (diff) | |
rename case
Diffstat (limited to 'MediaBrowser.Model/Dto')
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 664 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemPerson.cs | 54 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/ChapterInfoDto.cs | 42 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/ImageOptions.cs | 72 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/StreamOptions.cs | 193 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/UserDto.cs | 95 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/UserItemDataDto.cs | 55 |
7 files changed, 1175 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs new file mode 100644 index 0000000000..593f1273de --- /dev/null +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -0,0 +1,664 @@ +using MediaBrowser.Model.Entities; +using System; +using System.Collections.Generic; +using System.ComponentModel; +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> + public class BaseItemDto : IHasProviderIds, INotifyPropertyChanged, IItemDto + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Name { get; set; } + + /// <summary> + /// Gets or sets the id. + /// </summary> + /// <value>The id.</value> + public string Id { get; set; } + + /// <summary> + /// Gets or sets the date created. + /// </summary> + /// <value>The date created.</value> + public DateTime? DateCreated { get; set; } + + /// <summary> + /// Gets or sets the name of the sort. + /// </summary> + /// <value>The name of the sort.</value> + public string SortName { get; set; } + + /// <summary> + /// Gets or sets the premiere date. + /// </summary> + /// <value>The premiere date.</value> + public DateTime? PremiereDate { get; set; } + + /// <summary> + /// Gets or sets the critic rating. + /// </summary> + /// <value>The critic rating.</value> + public float? CriticRating { get; set; } + + /// <summary> + /// Gets or sets the critic rating summary. + /// </summary> + /// <value>The critic rating summary.</value> + public string CriticRatingSummary { get; set; } + + /// <summary> + /// Gets or sets the path. + /// </summary> + /// <value>The path.</value> + public string Path { 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 custom rating. + /// </summary> + /// <value>The custom rating.</value> + public string CustomRating { get; set; } + + /// <summary> + /// Gets or sets the overview. + /// </summary> + /// <value>The overview.</value> + public string Overview { get; set; } + + /// <summary> + /// Gets or sets the taglines. + /// </summary> + /// <value>The taglines.</value> + public List<string> Taglines { get; set; } + + /// <summary> + /// Gets or sets the genres. + /// </summary> + /// <value>The genres.</value> + public List<string> Genres { get; set; } + + /// <summary> + /// Gets or sets the community rating. + /// </summary> + /// <value>The community rating.</value> + public float? CommunityRating { get; set; } + + /// <summary> + /// Gets or sets the run time ticks. + /// </summary> + /// <value>The run time ticks.</value> + public long? RunTimeTicks { 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> + public int? ProductionYear { get; set; } + + /// <summary> + /// Gets or sets the players supported by a game. + /// </summary> + /// <value>The players.</value> + public int? Players { get; set; } + + /// <summary> + /// Gets or sets the index number. + /// </summary> + /// <value>The index number.</value> + public int? IndexNumber { get; set; } + + /// <summary> + /// Gets or sets the index number end. + /// </summary> + /// <value>The index number end.</value> + public int? IndexNumberEnd { get; set; } + + /// <summary> + /// Gets or sets the parent index number. + /// </summary> + /// <value>The parent index number.</value> + public int? ParentIndexNumber { get; set; } + + /// <summary> + /// Gets or sets the trailer urls. + /// </summary> + /// <value>The trailer urls.</value> + public List<string> TrailerUrls { get; set; } + + /// <summary> + /// Gets or sets the provider ids. + /// </summary> + /// <value>The provider ids.</value> + public Dictionary<string, string> ProviderIds { get; set; } + + /// <summary> + /// Gets or sets the language. + /// </summary> + /// <value>The language.</value> + 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> + public bool IsFolder { get; set; } + + /// <summary> + /// Gets or sets the parent id. + /// </summary> + /// <value>The parent id.</value> + public string ParentId { get; set; } + + /// <summary> + /// Gets or sets the type. + /// </summary> + /// <value>The type.</value> + public string Type { get; set; } + + /// <summary> + /// Gets or sets the people. + /// </summary> + /// <value>The people.</value> + public BaseItemPerson[] People { get; set; } + + /// <summary> + /// Gets or sets the studios. + /// </summary> + /// <value>The studios.</value> + public StudioDto[] 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> + 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> + public string ParentBackdropItemId { get; set; } + + /// <summary> + /// Gets or sets the parent backdrop image tags. + /// </summary> + /// <value>The parent backdrop image tags.</value> + public List<Guid> ParentBackdropImageTags { get; set; } + + /// <summary> + /// Gets or sets the local trailer count. + /// </summary> + /// <value>The local trailer count.</value> + 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> + public UserItemDataDto UserData { get; set; } + + /// <summary> + /// Gets or sets the recently added item count. + /// </summary> + /// <value>The recently added item count.</value> + public int? RecentlyAddedItemCount { get; set; } + + /// <summary> + /// Gets or sets the played percentage. + /// </summary> + /// <value>The played percentage.</value> + public double? PlayedPercentage { get; set; } + + /// <summary> + /// Gets or sets the recursive item count. + /// </summary> + /// <value>The recursive item count.</value> + public int? RecursiveItemCount { get; set; } + + /// <summary> + /// Gets or sets the recursive unplayed item count. + /// </summary> + /// <value>The recursive unplayed item count.</value> + public int? RecursiveUnplayedItemCount { get; set; } + + /// <summary> + /// Gets or sets the child count. + /// </summary> + /// <value>The child count.</value> + public int? ChildCount { get; set; } + + /// <summary> + /// Gets or sets the name of the series. + /// </summary> + /// <value>The name of the series.</value> + public string SeriesName { get; set; } + + /// <summary> + /// Gets or sets the series id. + /// </summary> + /// <value>The series id.</value> + public string SeriesId { get; set; } + + /// <summary> + /// Gets or sets the special feature count. + /// </summary> + /// <value>The special feature count.</value> + public int? SpecialFeatureCount { get; set; } + + /// <summary> + /// Gets or sets the display preferences id. + /// </summary> + /// <value>The display preferences id.</value> + public string DisplayPreferencesId { get; set; } + + /// <summary> + /// Gets or sets the status. + /// </summary> + /// <value>The status.</value> + public SeriesStatus? Status { get; set; } + + /// <summary> + /// Gets or sets the air time. + /// </summary> + /// <value>The air time.</value> + public string AirTime { get; set; } + + /// <summary> + /// Gets or sets the air days. + /// </summary> + /// <value>The air days.</value> + public List<DayOfWeek> AirDays { get; set; } + + /// <summary> + /// Gets or sets the index options. + /// </summary> + /// <value>The index options.</value> + public string[] IndexOptions { get; set; } + + /// <summary> + /// Gets or sets the tags. + /// </summary> + /// <value>The tags.</value> + public List<string> Tags { get; set; } + + /// <summary> + /// Gets or sets the primary image aspect ratio, after image enhancements. + /// </summary> + /// <value>The primary image aspect ratio.</value> + public double? PrimaryImageAspectRatio { get; set; } + + /// <summary> + /// Gets or sets the primary image aspect ratio, before image enhancements. + /// </summary> + /// <value>The original primary image aspect ratio.</value> + public double? OriginalPrimaryImageAspectRatio { get; set; } + + /// <summary> + /// Gets or sets the artists. + /// </summary> + /// <value>The artists.</value> + public string[] Artists { get; set; } + + /// <summary> + /// Gets or sets the album. + /// </summary> + /// <value>The album.</value> + public string Album { get; set; } + + /// <summary> + /// Gets or sets the album artist. + /// </summary> + /// <value>The album artist.</value> + public string AlbumArtist { get; set; } + + /// <summary> + /// Gets or sets the media streams. + /// </summary> + /// <value>The media streams.</value> + public List<MediaStream> MediaStreams { get; set; } + + /// <summary> + /// Gets or sets the type of the video. + /// </summary> + /// <value>The type of the video.</value> + public VideoType? VideoType { get; set; } + + /// <summary> + /// Gets or sets the display type of the media. + /// </summary> + /// <value>The display type of the media.</value> + 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 or sets the image tags. + /// </summary> + /// <value>The image tags.</value> + public Dictionary<ImageType, Guid> ImageTags { get; set; } + + /// <summary> + /// Gets or sets the backdrop image tags. + /// </summary> + /// <value>The backdrop image tags.</value> + public List<Guid> BackdropImageTags { get; set; } + + /// <summary> + /// Gets or sets the screenshot image tags. + /// </summary> + /// <value>The screenshot image tags.</value> + public List<Guid> ScreenshotImageTags { get; set; } + + /// <summary> + /// Gets or sets the parent logo image tag. + /// </summary> + /// <value>The parent logo image tag.</value> + public Guid? ParentLogoImageTag { get; set; } + + /// <summary> + /// Gets or sets the chapters. + /// </summary> + /// <value>The chapters.</value> + public List<ChapterInfoDto> Chapters { get; set; } + + /// <summary> + /// Gets or sets the video format. + /// </summary> + /// <value>The video format.</value> + public VideoFormat? VideoFormat { get; set; } + + /// <summary> + /// Gets or sets the type of the location. + /// </summary> + /// <value>The type of the location.</value> + public LocationType LocationType { get; set; } + + /// <summary> + /// Gets or sets the type of the iso. + /// </summary> + /// <value>The type of the iso.</value> + public IsoType? IsoType { get; set; } + + /// <summary> + /// Gets or sets the type of the media. + /// </summary> + /// <value>The type of the media.</value> + public string MediaType { get; set; } + + /// <summary> + /// Gets or sets the overview HTML. + /// </summary> + /// <value>The overview HTML.</value> + public string OverviewHtml { get; set; } + + /// <summary> + /// Gets or sets the end date. + /// </summary> + /// <value>The end date.</value> + public DateTime? EndDate { get; set; } + + /// <summary> + /// Gets or sets the home page URL. + /// </summary> + /// <value>The home page URL.</value> + public string HomePageUrl { get; set; } + + /// <summary> + /// Gets or sets the production locations. + /// </summary> + /// <value>The production locations.</value> + public List<string> ProductionLocations { get; set; } + + /// <summary> + /// Gets or sets the budget. + /// </summary> + /// <value>The budget.</value> + public double? Budget { get; set; } + + /// <summary> + /// Gets or sets the revenue. + /// </summary> + /// <value>The revenue.</value> + public double? Revenue { get; set; } + + /// <summary> + /// Gets or sets the locked fields. + /// </summary> + /// <value>The locked fields.</value> + public List<MetadataFields> LockedFields { get; set; } + + /// <summary> + /// Gets or sets the locked images. + /// </summary> + /// <value>The locked images.</value> + public List<ImageType> LockedImages { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether [enable internet providers]. + /// </summary> + /// <value><c>true</c> if [enable internet providers]; otherwise, <c>false</c>.</value> + public bool? EnableInternetProviders { get; set; } + + /// <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 the backdrop count. + /// </summary> + /// <value>The backdrop count.</value> + [IgnoreDataMember] + public int BackdropCount + { + get { return BackdropImageTags == null ? 0 : BackdropImageTags.Count; } + } + + /// <summary> + /// Gets the screenshot count. + /// </summary> + /// <value>The screenshot count.</value> + [IgnoreDataMember] + public int ScreenshotCount + { + get { return ScreenshotImageTags == null ? 0 : ScreenshotImageTags.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> + [IgnoreDataMember] + 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> + /// Gets a value indicating whether this instance is person. + /// </summary> + /// <value><c>true</c> if this instance is person; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool IsPerson + { + get { return string.Equals(Type, "Person", StringComparison.OrdinalIgnoreCase); } + } + + /// <summary> + /// Gets a value indicating whether this instance is root. + /// </summary> + /// <value><c>true</c> if this instance is root; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool IsRoot + { + get { return string.Equals(Type, "AggregateFolder", StringComparison.OrdinalIgnoreCase); } + } + + /// <summary> + /// Occurs when [property changed]. + /// </summary> + public event PropertyChangedEventHandler PropertyChanged; + } +} diff --git a/MediaBrowser.Model/Dto/BaseItemPerson.cs b/MediaBrowser.Model/Dto/BaseItemPerson.cs new file mode 100644 index 0000000000..9fd5e1a8ad --- /dev/null +++ b/MediaBrowser.Model/Dto/BaseItemPerson.cs @@ -0,0 +1,54 @@ +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> + public class BaseItemPerson : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Name { get; set; } + + /// <summary> + /// Gets or sets the role. + /// </summary> + /// <value>The role.</value> + public string Role { get; set; } + + /// <summary> + /// Gets or sets the type. + /// </summary> + /// <value>The type.</value> + public string Type { get; set; } + + /// <summary> + /// Gets or sets the primary image tag. + /// </summary> + /// <value>The primary image tag.</value> + 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..caa609a767 --- /dev/null +++ b/MediaBrowser.Model/Dto/ChapterInfoDto.cs @@ -0,0 +1,42 @@ +using System; +using System.ComponentModel; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.Dto +{ + /// <summary> + /// Class ChapterInfo + /// </summary> + public class ChapterInfoDto : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the start position ticks. + /// </summary> + /// <value>The start position ticks.</value> + public long StartPositionTicks { get; set; } + + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Name { get; set; } + + /// <summary> + /// Gets or sets the image tag. + /// </summary> + /// <value>The image tag.</value> + 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/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.cs new file mode 100644 index 0000000000..5a306ec497 --- /dev/null +++ b/MediaBrowser.Model/Dto/ImageOptions.cs @@ -0,0 +1,72 @@ +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; } + + /// <summary> + /// Gets or sets a value indicating whether [crop whitespace]. + /// </summary> + /// <value><c>null</c> if [crop whitespace] contains no value, <c>true</c> if [crop whitespace]; otherwise, <c>false</c>.</value> + public bool? CropWhitespace { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether [enable image enhancers]. + /// </summary> + /// <value><c>true</c> if [enable image enhancers]; otherwise, <c>false</c>.</value> + public bool EnableImageEnhancers { get; set; } + } +} diff --git a/MediaBrowser.Model/Dto/StreamOptions.cs b/MediaBrowser.Model/Dto/StreamOptions.cs new file mode 100644 index 0000000000..d9c34f9b1a --- /dev/null +++ b/MediaBrowser.Model/Dto/StreamOptions.cs @@ -0,0 +1,193 @@ +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> + /// Gets or sets the profile. + /// </summary> + /// <value>The profile.</value> + public string Profile { get; set; } + + /// <summary> + /// Gets or sets the level. + /// </summary> + /// <value>The level.</value> + public string Level { get; set; } + } + + /// <summary> + /// Class StreamOptions + /// </summary> + public 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 + { + H263, + + /// <summary> + /// The H264 + /// </summary> + H264, + + /// <summary> + /// The mpeg4 + /// </summary> + Mpeg4, + + /// <summary> + /// The theora + /// </summary> + Theora, + + /// <summary> + /// The VPX + /// </summary> + Vpx, + + /// <summary> + /// The WMV + /// </summary> + Wmv + } +} diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs new file mode 100644 index 0000000000..a79ffc08c7 --- /dev/null +++ b/MediaBrowser.Model/Dto/UserDto.cs @@ -0,0 +1,95 @@ +using System.ComponentModel; +using MediaBrowser.Model.Configuration; +using System; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.Dto +{ + /// <summary> + /// Class UserDto + /// </summary> + public class UserDto : INotifyPropertyChanged, IItemDto + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Name { get; set; } + + /// <summary> + /// Gets or sets the id. + /// </summary> + /// <value>The id.</value> + public string Id { get; set; } + + /// <summary> + /// Gets or sets the primary image tag. + /// </summary> + /// <value>The primary image tag.</value> + 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> + public bool HasPassword { get; set; } + + /// <summary> + /// Gets or sets the last login date. + /// </summary> + /// <value>The last login date.</value> + public DateTime? LastLoginDate { get; set; } + + /// <summary> + /// Gets or sets the last activity date. + /// </summary> + /// <value>The last activity date.</value> + public DateTime? LastActivityDate { get; set; } + + /// <summary> + /// Gets or sets the configuration. + /// </summary> + /// <value>The configuration.</value> + public UserConfiguration Configuration { get; set; } + + /// <summary> + /// Gets or sets the primary image aspect ratio. + /// </summary> + /// <value>The primary image aspect ratio.</value> + public double? PrimaryImageAspectRatio { get; set; } + + /// <summary> + /// Gets or sets the original primary image aspect ratio. + /// </summary> + /// <value>The original primary image aspect ratio.</value> + public double? OriginalPrimaryImageAspectRatio { 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> + /// Initializes a new instance of the <see cref="UserDto"/> class. + /// </summary> + public UserDto() + { + Configuration = new UserConfiguration(); + } + + /// <summary> + /// Occurs when [property changed]. + /// </summary> + public event PropertyChangedEventHandler PropertyChanged; + + public override string ToString() + { + return Name ?? base.ToString(); + } + } +} diff --git a/MediaBrowser.Model/Dto/UserItemDataDto.cs b/MediaBrowser.Model/Dto/UserItemDataDto.cs new file mode 100644 index 0000000000..e1b534eb12 --- /dev/null +++ b/MediaBrowser.Model/Dto/UserItemDataDto.cs @@ -0,0 +1,55 @@ +using System; +using System.ComponentModel; + +namespace MediaBrowser.Model.Dto +{ + /// <summary> + /// Class UserItemDataDto + /// </summary> + public class UserItemDataDto : INotifyPropertyChanged + { + /// <summary> + /// Gets or sets the rating. + /// </summary> + /// <value>The rating.</value> + public double? Rating { get; set; } + + /// <summary> + /// Gets or sets the playback position ticks. + /// </summary> + /// <value>The playback position ticks.</value> + public long PlaybackPositionTicks { get; set; } + + /// <summary> + /// Gets or sets the play count. + /// </summary> + /// <value>The play count.</value> + 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> + public bool IsFavorite { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this <see cref="UserItemDataDto" /> is likes. + /// </summary> + /// <value><c>null</c> if [likes] contains no value, <c>true</c> if [likes]; otherwise, <c>false</c>.</value> + public bool? Likes { get; set; } + + /// <summary> + /// Gets or sets the last played date. + /// </summary> + /// <value>The last played date.</value> + public DateTime? LastPlayedDate { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this <see cref="UserItemDataDto" /> is played. + /// </summary> + /// <value><c>true</c> if played; otherwise, <c>false</c>.</value> + public bool Played { get; set; } + + public event PropertyChangedEventHandler PropertyChanged; + } +} |
