diff options
Diffstat (limited to 'MediaBrowser.Model/Dto')
| -rw-r--r-- | MediaBrowser.Model/Dto/BaseItemDto.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/DtoOptions.cs | 32 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/MetadataEditorInfo.cs | 27 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/NameValuePair.cs | 17 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/StreamOptions.cs | 67 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dto/VideoStreamOptions.cs | 58 |
6 files changed, 113 insertions, 101 deletions
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 71cefa076..2383d4809 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -366,6 +366,11 @@ namespace MediaBrowser.Model.Dto /// </summary> /// <value>The user data.</value> public UserItemDataDto UserData { get; set; } + /// <summary> + /// Gets or sets the season user data. + /// </summary> + /// <value>The season user data.</value> + public UserItemDataDto SeasonUserData { get; set; } /// <summary> /// Gets or sets the recursive item count. @@ -549,7 +554,13 @@ namespace MediaBrowser.Model.Dto /// Gets or sets a value indicating whether [supports playlists]. /// </summary> /// <value><c>true</c> if [supports playlists]; otherwise, <c>false</c>.</value> - public bool SupportsPlaylists { get; set; } + public bool SupportsPlaylists + { + get + { + return RunTimeTicks.HasValue || IsFolder || IsGenre || IsMusicGenre || IsArtist; + } + } /// <summary> /// Determines whether the specified type is type. diff --git a/MediaBrowser.Model/Dto/DtoOptions.cs b/MediaBrowser.Model/Dto/DtoOptions.cs deleted file mode 100644 index 069d71fce..000000000 --- a/MediaBrowser.Model/Dto/DtoOptions.cs +++ /dev/null @@ -1,32 +0,0 @@ -using MediaBrowser.Model.Entities; -using MediaBrowser.Model.Querying; -using System.Collections.Generic; - -namespace MediaBrowser.Model.Dto -{ - public class DtoOptions - { - public List<ItemFields> Fields { get; set; } - public List<ImageType> ImageTypes { get; set; } - public int ImageTypeLimit { get; set; } - public bool EnableImages { get; set; } - - public DtoOptions() - { - Fields = new List<ItemFields>(); - ImageTypes = new List<ImageType>(); - ImageTypeLimit = int.MaxValue; - EnableImages = true; - } - - public int GetImageLimit(ImageType type) - { - if (EnableImages && ImageTypes.Contains(type)) - { - return ImageTypeLimit; - } - - return 0; - } - } -} diff --git a/MediaBrowser.Model/Dto/MetadataEditorInfo.cs b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs new file mode 100644 index 000000000..9bd15fc8f --- /dev/null +++ b/MediaBrowser.Model/Dto/MetadataEditorInfo.cs @@ -0,0 +1,27 @@ +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.Globalization; +using MediaBrowser.Model.Providers; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Dto +{ + public class MetadataEditorInfo + { + public List<ParentalRating> ParentalRatingOptions { get; set; } + public List<CountryInfo> Countries { get; set; } + public List<CultureDto> Cultures { get; set; } + public List<ExternalIdInfo> ExternalIdInfos { get; set; } + + public string ContentType { get; set; } + public List<NameValuePair> ContentTypeOptions { get; set; } + + public MetadataEditorInfo() + { + ParentalRatingOptions = new List<ParentalRating>(); + Countries = new List<CountryInfo>(); + Cultures = new List<CultureDto>(); + ExternalIdInfos = new List<ExternalIdInfo>(); + ContentTypeOptions = new List<NameValuePair>(); + } + } +} diff --git a/MediaBrowser.Model/Dto/NameValuePair.cs b/MediaBrowser.Model/Dto/NameValuePair.cs new file mode 100644 index 000000000..2d55e8f2a --- /dev/null +++ b/MediaBrowser.Model/Dto/NameValuePair.cs @@ -0,0 +1,17 @@ + +namespace MediaBrowser.Model.Dto +{ + public class NameValuePair + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + public string Name { get; set; } + /// <summary> + /// Gets or sets the value. + /// </summary> + /// <value>The value.</value> + public string Value { get; set; } + } +} diff --git a/MediaBrowser.Model/Dto/StreamOptions.cs b/MediaBrowser.Model/Dto/StreamOptions.cs deleted file mode 100644 index 5b7cdc6fb..000000000 --- a/MediaBrowser.Model/Dto/StreamOptions.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; - -namespace MediaBrowser.Model.Dto -{ - /// <summary> - /// Class StreamOptions - /// </summary> - [Obsolete] - 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 string 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> - /// Gets or sets the device id. - /// </summary> - /// <value>The device id.</value> - public string DeviceId { get; set; } - } -} diff --git a/MediaBrowser.Model/Dto/VideoStreamOptions.cs b/MediaBrowser.Model/Dto/VideoStreamOptions.cs index 606e928f2..e9a83bd12 100644 --- a/MediaBrowser.Model/Dto/VideoStreamOptions.cs +++ b/MediaBrowser.Model/Dto/VideoStreamOptions.cs @@ -6,9 +6,65 @@ namespace MediaBrowser.Model.Dto /// Class VideoStreamOptions /// </summary> [Obsolete] - public class VideoStreamOptions : StreamOptions + public class VideoStreamOptions { /// <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 string 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> + /// Gets or sets the device id. + /// </summary> + /// <value>The device id.</value> + public string DeviceId { get; set; } + + /// <summary> /// Gets or sets the video codec. /// Omit to copy /// </summary> |
