diff options
| author | Luke <luke.pulverenti@gmail.com> | 2014-12-14 00:38:07 -0500 |
|---|---|---|
| committer | Luke <luke.pulverenti@gmail.com> | 2014-12-14 00:38:07 -0500 |
| commit | 524293ea79ab61228f8326561be70bcca4d0ea8f (patch) | |
| tree | ccfe163c8edafc8dd14b0b63d48712a6d504de9d /MediaBrowser.Model | |
| parent | 00da34b90a2f2fcee4d6aa584e25fccebb375b6d (diff) | |
| parent | 9df9723fa8554df0fd51d777d3f781b0136de926 (diff) | |
Merge pull request #954 from MediaBrowser/dev
3.0.5462.0
Diffstat (limited to 'MediaBrowser.Model')
32 files changed, 358 insertions, 242 deletions
diff --git a/MediaBrowser.Model/ApiClient/ConnectionMode.cs b/MediaBrowser.Model/ApiClient/ConnectionMode.cs index f14c88a093..5dc224d959 100644 --- a/MediaBrowser.Model/ApiClient/ConnectionMode.cs +++ b/MediaBrowser.Model/ApiClient/ConnectionMode.cs @@ -3,6 +3,7 @@ namespace MediaBrowser.Model.ApiClient public enum ConnectionMode { Local = 1, - Remote = 2 + Remote = 2, + Manual = 3 } }
\ No newline at end of file diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 15ec130cfe..13907e5c60 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -14,6 +14,7 @@ using MediaBrowser.Model.Querying; using MediaBrowser.Model.Search; using MediaBrowser.Model.Serialization; using MediaBrowser.Model.Session; +using MediaBrowser.Model.Sync; using MediaBrowser.Model.System; using MediaBrowser.Model.Tasks; using MediaBrowser.Model.Users; @@ -413,7 +414,7 @@ namespace MediaBrowser.Model.ApiClient /// </summary> /// <param name="query">The query.</param> /// <returns>Task{ItemsResult}.</returns> - Task<ItemsResult> GetUpcomingEpisodesAsync(NextUpQuery query); + Task<ItemsResult> GetUpcomingEpisodesAsync(UpcomingEpisodesQuery query); /// <summary> /// Gets a genre @@ -1372,6 +1373,20 @@ namespace MediaBrowser.Model.ApiClient Task<DevicesOptions> GetDevicesOptions(); /// <summary> + /// Updates the item. + /// </summary> + /// <param name="item">The item.</param> + /// <returns>Task.</returns> + Task UpdateItem(BaseItemDto item); + + /// <summary> + /// Requests the synchronize. + /// </summary> + /// <param name="request">The request.</param> + /// <returns>Task<SyncJob>.</returns> + Task<SyncJob> RequestSync(SyncJobRequest request); + + /// <summary> /// Opens the web socket. /// </summary> /// <param name="webSocketFactory">The web socket factory.</param> diff --git a/MediaBrowser.Model/ApiClient/ServerCredentials.cs b/MediaBrowser.Model/ApiClient/ServerCredentials.cs index 2490ba606c..fbbc6c05de 100644 --- a/MediaBrowser.Model/ApiClient/ServerCredentials.cs +++ b/MediaBrowser.Model/ApiClient/ServerCredentials.cs @@ -50,10 +50,14 @@ namespace MediaBrowser.Model.ApiClient { existing.RemoteAddress = server.RemoteAddress; } - if (!existing.IsLocalAddressFixed && !string.IsNullOrEmpty(server.LocalAddress)) + if (!string.IsNullOrEmpty(server.LocalAddress)) { existing.LocalAddress = server.LocalAddress; } + if (!string.IsNullOrEmpty(server.ManualAddress)) + { + existing.LocalAddress = server.ManualAddress; + } if (!string.IsNullOrEmpty(server.Name)) { existing.Name = server.Name; @@ -62,9 +66,9 @@ namespace MediaBrowser.Model.ApiClient { existing.WakeOnLanInfos = server.WakeOnLanInfos.ToList(); } - if (server.IsLocalAddressFixed) + if (server.LastConnectionMode.HasValue) { - existing.IsLocalAddressFixed = true; + existing.LastConnectionMode = server.LastConnectionMode; } } else diff --git a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs index bb2b48e76f..e2f7806055 100644 --- a/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs +++ b/MediaBrowser.Model/ApiClient/ServerDiscoveryInfo.cs @@ -18,5 +18,10 @@ namespace MediaBrowser.Model.ApiClient /// </summary> /// <value>The name.</value> public string Name { get; set; } + /// <summary> + /// Gets or sets the endpoint address. + /// </summary> + /// <value>The endpoint address.</value> + public string EndpointAddress { get; set; } } } diff --git a/MediaBrowser.Model/ApiClient/ServerInfo.cs b/MediaBrowser.Model/ApiClient/ServerInfo.cs index 95cdf006b5..46cc560af2 100644 --- a/MediaBrowser.Model/ApiClient/ServerInfo.cs +++ b/MediaBrowser.Model/ApiClient/ServerInfo.cs @@ -11,14 +11,14 @@ namespace MediaBrowser.Model.ApiClient public String Id { get; set; } public String LocalAddress { get; set; } public String RemoteAddress { get; set; } + public String ManualAddress { get; set; } public String UserId { get; set; } public String AccessToken { get; set; } public List<WakeOnLanInfo> WakeOnLanInfos { get; set; } public DateTime DateLastAccessed { get; set; } public String ExchangeToken { get; set; } public UserLinkType? UserLinkType { get; set; } - - public bool IsLocalAddressFixed { get; set; } + public ConnectionMode? LastConnectionMode { get; set; } public ServerInfo() { @@ -30,7 +30,7 @@ namespace MediaBrowser.Model.ApiClient Name = systemInfo.ServerName; Id = systemInfo.Id; - if (!IsLocalAddressFixed && !string.IsNullOrEmpty(systemInfo.LocalAddress)) + if (!string.IsNullOrEmpty(systemInfo.LocalAddress)) { LocalAddress = systemInfo.LocalAddress; } @@ -55,5 +55,20 @@ namespace MediaBrowser.Model.ApiClient } } } + + public string GetAddress(ConnectionMode mode) + { + switch (mode) + { + case ConnectionMode.Local: + return LocalAddress; + case ConnectionMode.Manual: + return ManualAddress; + case ConnectionMode.Remote: + return RemoteAddress; + default: + throw new ArgumentException("Unexpected ConnectionMode"); + } + } } } diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index c9df615e1c..b9eaf70010 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -56,6 +56,12 @@ namespace MediaBrowser.Model.Configuration public bool SaveLocalMeta { get; set; } /// <summary> + /// Gets or sets a value indicating whether [enable localized guids]. + /// </summary> + /// <value><c>true</c> if [enable localized guids]; otherwise, <c>false</c>.</value> + public bool EnableLocalizedGuids { get; set; } + + /// <summary> /// Gets or sets the preferred metadata language. /// </summary> /// <value>The preferred metadata language.</value> diff --git a/MediaBrowser.Model/Devices/DeviceQuery.cs b/MediaBrowser.Model/Devices/DeviceQuery.cs new file mode 100644 index 0000000000..76f7117b64 --- /dev/null +++ b/MediaBrowser.Model/Devices/DeviceQuery.cs @@ -0,0 +1,17 @@ + +namespace MediaBrowser.Model.Devices +{ + public class DeviceQuery + { + /// <summary> + /// Gets or sets a value indicating whether [supports content uploading]. + /// </summary> + /// <value><c>null</c> if [supports content uploading] contains no value, <c>true</c> if [supports content uploading]; otherwise, <c>false</c>.</value> + public bool? SupportsContentUploading { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [supports unique identifier]. + /// </summary> + /// <value><c>null</c> if [supports unique identifier] contains no value, <c>true</c> if [supports unique identifier]; otherwise, <c>false</c>.</value> + public bool? SupportsUniqueIdentifier { get; set; } + } +} diff --git a/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs b/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs deleted file mode 100644 index 7aa7f98db1..0000000000 --- a/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs +++ /dev/null @@ -1,167 +0,0 @@ -using System.Collections.Generic; -using System.Xml.Serialization; - -namespace MediaBrowser.Model.Dlna.Profiles -{ - [XmlRoot("Profile")] - public class AndroidProfile : DefaultProfile - { - public AndroidProfile() - : this(true, true, new[] { "baseline", "constrained baseline" }) - { - - } - - public AndroidProfile(bool supportsHls, - bool supportsMpegDash, - string[] supportedH264Profiles) - { - Name = "Android"; - - List<TranscodingProfile> transcodingProfiles = new List<TranscodingProfile>(); - - transcodingProfiles.Add(new TranscodingProfile - { - Container = "mp3", - AudioCodec = "mp3", - Type = DlnaProfileType.Audio - }); - - if (supportsMpegDash) - { - - } - if (supportsHls) - { - transcodingProfiles.Add(new TranscodingProfile - { - Protocol = "hls", - Container = "ts", - VideoCodec = "h264", - AudioCodec = "aac", - Type = DlnaProfileType.Video, - Context = EncodingContext.Streaming - }); - } - transcodingProfiles.Add(new TranscodingProfile - { - Container = "mp4", - VideoCodec = "h264", - AudioCodec = "aac", - Type = DlnaProfileType.Video, - Context = EncodingContext.Static - }); - - TranscodingProfiles = transcodingProfiles.ToArray(); - - DirectPlayProfiles = new[] - { - new DirectPlayProfile - { - Container = "mp4", - VideoCodec = "h264,mpeg4", - AudioCodec = "aac", - Type = DlnaProfileType.Video - }, - - new DirectPlayProfile - { - Container = "mp4,aac", - AudioCodec = "aac", - Type = DlnaProfileType.Audio - }, - - new DirectPlayProfile - { - Container = "mp3", - AudioCodec = "mp3", - Type = DlnaProfileType.Audio - }, - - new DirectPlayProfile - { - Container = "flac", - AudioCodec = "flac", - Type = DlnaProfileType.Audio - }, - - new DirectPlayProfile - { - Container = "ogg", - AudioCodec = "vorbis", - Type = DlnaProfileType.Audio - }, - - new DirectPlayProfile - { - Container = "jpeg,png,gif,bmp", - Type = DlnaProfileType.Photo - } - }; - - CodecProfiles = new[] - { - new CodecProfile - { - Type = CodecType.Video, - Codec= "h264", - - Conditions = new [] - { - new ProfileCondition(ProfileConditionType.EqualsAny, ProfileConditionValue.VideoProfile, string.Join("|", supportedH264Profiles)), - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"), - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"), - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"), - new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true"), - new ProfileCondition(ProfileConditionType.Equals, ProfileConditionValue.IsCabac, "true") - } - }, - - new CodecProfile - { - Type = CodecType.Video, - - Conditions = new [] - { - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"), - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"), - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"), - new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true") - } - }, - - new CodecProfile - { - Type = CodecType.VideoAudio, - Codec = "aac", - Conditions = new [] - { - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2") - } - }, - - new CodecProfile - { - Type = CodecType.Audio, - Codec = "aac", - Conditions = new [] - { - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2") - } - }, - - new CodecProfile - { - Type = CodecType.Audio, - Codec = "mp3", - Conditions = new [] - { - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioChannels, "2"), - new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.AudioBitrate, "320000") - } - } - }; - - } - } -} diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 4907abfd73..fb26f1ff8c 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -298,7 +298,6 @@ namespace MediaBrowser.Model.Dlna playlistItem.VideoCodec = transcodingProfile.VideoCodec; playlistItem.Protocol = transcodingProfile.Protocol; playlistItem.AudioStreamIndex = audioStreamIndex; - playlistItem.VideoProfile = transcodingProfile.VideoProfile; List<ProfileCondition> videoTranscodingConditions = new List<ProfileCondition>(); foreach (CodecProfile i in options.Profile.CodecProfiles) diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs index ad82d6facd..d9963eb750 100644 --- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs @@ -29,9 +29,6 @@ namespace MediaBrowser.Model.Dlna [XmlAttribute("transcodeSeekInfo")] public TranscodeSeekInfo TranscodeSeekInfo { get; set; } - [XmlAttribute("videoProfile")] - public string VideoProfile { get; set; } - [XmlAttribute("context")] public EncodingContext Context { get; set; } diff --git a/MediaBrowser.Model/Drawing/ImageOutputFormat.cs b/MediaBrowser.Model/Drawing/ImageFormat.cs index ec32f64f26..0172c9754f 100644 --- a/MediaBrowser.Model/Drawing/ImageOutputFormat.cs +++ b/MediaBrowser.Model/Drawing/ImageFormat.cs @@ -4,7 +4,7 @@ namespace MediaBrowser.Model.Drawing /// <summary> /// Enum ImageOutputFormat /// </summary> - public enum ImageOutputFormat + public enum ImageFormat { /// <summary> /// The BMP diff --git a/MediaBrowser.Model/Drawing/ImageSize.cs b/MediaBrowser.Model/Drawing/ImageSize.cs index 076e2ddbfa..5ed6e72933 100644 --- a/MediaBrowser.Model/Drawing/ImageSize.cs +++ b/MediaBrowser.Model/Drawing/ImageSize.cs @@ -55,6 +55,12 @@ namespace MediaBrowser.Model.Drawing ParseValue(value); } + public ImageSize(int width, int height) + { + _width = width; + _height = height; + } + private void ParseValue(string value) { if (!string.IsNullOrEmpty(value)) diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index a9f13374bc..45f6810665 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -64,7 +64,7 @@ namespace MediaBrowser.Model.Dto public float? Metascore { get; set; } - public bool IsUnidentified { get; set; } + public bool? IsUnidentified { get; set; } public int? AnimeSeriesIndex { get; set; } @@ -186,6 +186,12 @@ namespace MediaBrowser.Model.Dto /// </summary> /// <value>The genres.</value> public List<string> Genres { get; set; } + + /// <summary> + /// Gets or sets the series genres. + /// </summary> + /// <value>The series genres.</value> + public List<string> SeriesGenres { get; set; } /// <summary> /// Gets or sets the community rating. @@ -218,6 +224,12 @@ namespace MediaBrowser.Model.Dto public long? RunTimeTicks { 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 play access. /// </summary> /// <value>The play access.</value> @@ -236,13 +248,6 @@ namespace MediaBrowser.Model.Dto public int? ProductionYear { get; set; } /// <summary> - /// Gets or sets the recursive unplayed item count. - /// </summary> - /// <value>The recursive unplayed item count.</value> - [Obsolete] - public int? RecursiveUnplayedItemCount { get; set; } - - /// <summary> /// Gets or sets the season count. /// </summary> /// <value>The season count.</value> @@ -709,11 +714,6 @@ namespace MediaBrowser.Model.Dto /// <value>The game count.</value> public int? GameCount { get; set; } /// <summary> - /// Gets or sets the trailer count. - /// </summary> - /// <value>The trailer count.</value> - public int? TrailerCount { get; set; } - /// <summary> /// Gets or sets the song count. /// </summary> /// <value>The song count.</value> diff --git a/MediaBrowser.Model/Dto/DtoOptions.cs b/MediaBrowser.Model/Dto/DtoOptions.cs new file mode 100644 index 0000000000..069d71fceb --- /dev/null +++ b/MediaBrowser.Model/Dto/DtoOptions.cs @@ -0,0 +1,32 @@ +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/ImageOptions.cs b/MediaBrowser.Model/Dto/ImageOptions.cs index 037be4a877..8e35c1323f 100644 --- a/MediaBrowser.Model/Dto/ImageOptions.cs +++ b/MediaBrowser.Model/Dto/ImageOptions.cs @@ -73,7 +73,7 @@ namespace MediaBrowser.Model.Dto /// Gets or sets the format. /// </summary> /// <value>The format.</value> - public ImageOutputFormat? Format { get; set; } + public ImageFormat? Format { get; set; } /// <summary> /// Gets or sets a value indicating whether [add played indicator]. diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index b09f694c64..e370ad8e03 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -113,11 +113,11 @@ <Compile Include="Connect\PinStatusResult.cs" /> <Compile Include="Connect\UserLinkType.cs" /> <Compile Include="Devices\DeviceOptions.cs" /> + <Compile Include="Devices\DeviceQuery.cs" /> <Compile Include="Devices\LocalFileInfo.cs" /> <Compile Include="Devices\DeviceInfo.cs" /> <Compile Include="Devices\DevicesOptions.cs" /> <Compile Include="Dlna\EncodingContext.cs" /> - <Compile Include="Dlna\Profiles\AndroidProfile.cs" /> <Compile Include="Dlna\Profiles\DefaultProfile.cs" /> <Compile Include="Dlna\ResolutionConfiguration.cs" /> <Compile Include="Dlna\ResolutionNormalizer.cs" /> @@ -125,6 +125,7 @@ <Compile Include="Dlna\SubtitleDeliveryMethod.cs" /> <Compile Include="Dlna\SubtitleStreamInfo.cs" /> <Compile Include="Drawing\ImageOrientation.cs" /> + <Compile Include="Dto\DtoOptions.cs" /> <Compile Include="Dto\IHasServerId.cs" /> <Compile Include="MediaInfo\LiveMediaInfoResult.cs" /> <Compile Include="Dto\MediaSourceType.cs" /> @@ -191,7 +192,7 @@ <Compile Include="Dlna\TranscodingProfile.cs" /> <Compile Include="Dlna\VideoOptions.cs" /> <Compile Include="Dlna\XmlAttribute.cs" /> - <Compile Include="Drawing\ImageOutputFormat.cs" /> + <Compile Include="Drawing\ImageFormat.cs" /> <Compile Include="Drawing\ImageSize.cs" /> <Compile Include="Dto\BaseItemPerson.cs" /> <Compile Include="Dto\ChapterInfoDto.cs" /> @@ -364,10 +365,11 @@ <Compile Include="Sync\SyncJob.cs" /> <Compile Include="Sync\SyncJobCreationResult.cs" /> <Compile Include="Sync\SyncJobItem.cs" /> + <Compile Include="Sync\SyncJobItemQuery.cs" /> + <Compile Include="Sync\SyncJobItemStatus.cs" /> <Compile Include="Sync\SyncJobQuery.cs" /> <Compile Include="Sync\SyncJobRequest.cs" /> <Compile Include="Sync\SyncJobStatus.cs" /> - <Compile Include="Sync\SyncLimitType.cs" /> <Compile Include="Sync\SyncQuality.cs" /> <Compile Include="Sync\SyncTarget.cs" /> <Compile Include="System\LogFile.cs" /> @@ -412,6 +414,7 @@ <Compile Include="Users\ForgotPasswordAction.cs" /> <Compile Include="Users\ForgotPasswordResult.cs" /> <Compile Include="Users\PinRedeemResult.cs" /> + <Compile Include="Users\UserPolicy.cs" /> <None Include="Fody.targets" /> <None Include="FodyWeavers.xml" /> <None Include="MediaBrowser.Model.snk" /> diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 9ceca311c3..19e30cd8a7 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -7,6 +7,11 @@ namespace MediaBrowser.Model.Querying public enum ItemFields { /// <summary> + /// The alternate episode numbers + /// </summary> + AlternateEpisodeNumbers, + + /// <summary> /// The awards summary /// </summary> AwardSummary, @@ -82,11 +87,21 @@ namespace MediaBrowser.Model.Querying Keywords, /// <summary> + /// The media source count + /// </summary> + MediaSourceCount, + + /// <summary> /// The media versions /// </summary> MediaSources, /// <summary> + /// The metascore + /// </summary> + Metascore, + + /// <summary> /// The metadata settings /// </summary> Settings, @@ -127,6 +142,11 @@ namespace MediaBrowser.Model.Querying PrimaryImageAspectRatio, /// <summary> + /// The original primary image aspect ratio + /// </summary> + OriginalPrimaryImageAspectRatio, + + /// <summary> /// The revenue /// </summary> Revenue, @@ -142,6 +162,16 @@ namespace MediaBrowser.Model.Querying ScreenshotImageTags, /// <summary> + /// The series genres + /// </summary> + SeriesGenres, + + /// <summary> + /// The series studio + /// </summary> + SeriesStudio, + + /// <summary> /// The soundtrack ids /// </summary> SoundtrackIds, @@ -172,6 +202,11 @@ namespace MediaBrowser.Model.Querying Tags, /// <summary> + /// The vote count + /// </summary> + VoteCount, + + /// <summary> /// The TMDB collection name /// </summary> TmdbCollectionName, diff --git a/MediaBrowser.Model/Querying/ItemQuery.cs b/MediaBrowser.Model/Querying/ItemQuery.cs index 3969eedaa8..0f929fa9bb 100644 --- a/MediaBrowser.Model/Querying/ItemQuery.cs +++ b/MediaBrowser.Model/Querying/ItemQuery.cs @@ -97,7 +97,7 @@ namespace MediaBrowser.Model.Querying /// </summary> /// <value>The genres.</value> public string[] AllGenres { get; set; } - + /// <summary> /// Limit results to items containing specific studios /// </summary> @@ -211,7 +211,7 @@ namespace MediaBrowser.Model.Querying /// </summary> /// <value>The max players.</value> public int? MaxPlayers { get; set; } - + /// <summary> /// Gets or sets the name starts with or greater. /// </summary> @@ -223,7 +223,7 @@ namespace MediaBrowser.Model.Querying /// </summary> /// <value>The name starts with or greater.</value> public string NameStartsWith { get; set; } - + /// <summary> /// Gets or sets the name starts with. /// </summary> @@ -267,7 +267,7 @@ namespace MediaBrowser.Model.Querying public bool? CollapseBoxSetItems { get; set; } public bool? IsPlayed { get; set; } - + /// <summary> /// Gets or sets the exclude location types. /// </summary> @@ -282,7 +282,11 @@ namespace MediaBrowser.Model.Querying public DateTime? MinPremiereDate { get; set; } public DateTime? MaxPremiereDate { get; set; } - + + public bool? EnableImages { get; set; } + public int? ImageTypeLimit { get; set; } + public ImageType[] EnableImageTypes { get; set; } + /// <summary> /// Initializes a new instance of the <see cref="ItemQuery" /> class. /// </summary> @@ -290,16 +294,16 @@ namespace MediaBrowser.Model.Querying { LocationTypes = new LocationType[] { }; ExcludeLocationTypes = new LocationType[] { }; - + SortBy = new string[] { }; - Filters = new ItemFilter[] {}; + Filters = new ItemFilter[] { }; - Fields = new ItemFields[] {}; + Fields = new ItemFields[] { }; - MediaTypes = new string[] {}; + MediaTypes = new string[] { }; - VideoTypes = new VideoType[] {}; + VideoTypes = new VideoType[] { }; Genres = new string[] { }; Studios = new string[] { }; @@ -313,6 +317,7 @@ namespace MediaBrowser.Model.Querying ImageTypes = new ImageType[] { }; AirDays = new DayOfWeek[] { }; SeriesStatuses = new SeriesStatus[] { }; + EnableImageTypes = new ImageType[] { }; } } } diff --git a/MediaBrowser.Model/Querying/ItemsByNameQuery.cs b/MediaBrowser.Model/Querying/ItemsByNameQuery.cs index bef2f7aed3..578f22f600 100644 --- a/MediaBrowser.Model/Querying/ItemsByNameQuery.cs +++ b/MediaBrowser.Model/Querying/ItemsByNameQuery.cs @@ -101,7 +101,22 @@ namespace MediaBrowser.Model.Querying /// </summary> /// <value><c>null</c> if [is played] contains no value, <c>true</c> if [is played]; otherwise, <c>false</c>.</value> public bool? IsPlayed { get; set; } - + /// <summary> + /// Gets or sets a value indicating whether [enable images]. + /// </summary> + /// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value> + public bool? EnableImages { get; set; } + /// <summary> + /// Gets or sets the image type limit. + /// </summary> + /// <value>The image type limit.</value> + public int? ImageTypeLimit { get; set; } + /// <summary> + /// Gets or sets the enable image types. + /// </summary> + /// <value>The enable image types.</value> + public ImageType[] EnableImageTypes { get; set; } + /// <summary> /// Initializes a new instance of the <see cref="ItemsByNameQuery" /> class. /// </summary> @@ -115,6 +130,7 @@ namespace MediaBrowser.Model.Querying SortBy = new string[] { }; ExcludeItemTypes = new string[] { }; IncludeItemTypes = new string[] { }; + EnableImageTypes = new ImageType[] { }; } } } diff --git a/MediaBrowser.Model/Querying/LatestItemsQuery.cs b/MediaBrowser.Model/Querying/LatestItemsQuery.cs index ccf5ab087b..a8086e5cd9 100644 --- a/MediaBrowser.Model/Querying/LatestItemsQuery.cs +++ b/MediaBrowser.Model/Querying/LatestItemsQuery.cs @@ -1,4 +1,6 @@ +using MediaBrowser.Model.Entities; + namespace MediaBrowser.Model.Querying { public class LatestItemsQuery @@ -50,5 +52,25 @@ namespace MediaBrowser.Model.Querying /// </summary> /// <value><c>true</c> if [group items]; otherwise, <c>false</c>.</value> public bool GroupItems { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [enable images]. + /// </summary> + /// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value> + public bool? EnableImages { get; set; } + /// <summary> + /// Gets or sets the image type limit. + /// </summary> + /// <value>The image type limit.</value> + public int? ImageTypeLimit { get; set; } + /// <summary> + /// Gets or sets the enable image types. + /// </summary> + /// <value>The enable image types.</value> + public ImageType[] EnableImageTypes { get; set; } + + public LatestItemsQuery() + { + EnableImageTypes = new ImageType[] {}; + } } } diff --git a/MediaBrowser.Model/Querying/NextUpQuery.cs b/MediaBrowser.Model/Querying/NextUpQuery.cs index 0e9c9882f3..b5f50bde03 100644 --- a/MediaBrowser.Model/Querying/NextUpQuery.cs +++ b/MediaBrowser.Model/Querying/NextUpQuery.cs @@ -1,4 +1,5 @@ - +using MediaBrowser.Model.Entities; + namespace MediaBrowser.Model.Querying { public class NextUpQuery @@ -38,5 +39,25 @@ namespace MediaBrowser.Model.Querying /// </summary> /// <value>The fields.</value> public ItemFields[] Fields { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [enable images]. + /// </summary> + /// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value> + public bool? EnableImages { get; set; } + /// <summary> + /// Gets or sets the image type limit. + /// </summary> + /// <value>The image type limit.</value> + public int? ImageTypeLimit { get; set; } + /// <summary> + /// Gets or sets the enable image types. + /// </summary> + /// <value>The enable image types.</value> + public ImageType[] EnableImageTypes { get; set; } + + public NextUpQuery() + { + EnableImageTypes = new ImageType[] {}; + } } } diff --git a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs index e5a875e883..665b980eb8 100644 --- a/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs +++ b/MediaBrowser.Model/Querying/UpcomingEpisodesQuery.cs @@ -1,4 +1,6 @@ -namespace MediaBrowser.Model.Querying +using MediaBrowser.Model.Entities; + +namespace MediaBrowser.Model.Querying { public class UpcomingEpisodesQuery { @@ -31,5 +33,25 @@ /// </summary> /// <value>The fields.</value> public ItemFields[] Fields { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [enable images]. + /// </summary> + /// <value><c>null</c> if [enable images] contains no value, <c>true</c> if [enable images]; otherwise, <c>false</c>.</value> + public bool? EnableImages { get; set; } + /// <summary> + /// Gets or sets the image type limit. + /// </summary> + /// <value>The image type limit.</value> + public int? ImageTypeLimit { get; set; } + /// <summary> + /// Gets or sets the enable image types. + /// </summary> + /// <value>The enable image types.</value> + public ImageType[] EnableImageTypes { get; set; } + + public UpcomingEpisodesQuery() + { + EnableImageTypes = new ImageType[] {}; + } } }
\ No newline at end of file diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs index cbc1501d20..f2faa0545e 100644 --- a/MediaBrowser.Model/Session/ClientCapabilities.cs +++ b/MediaBrowser.Model/Session/ClientCapabilities.cs @@ -13,11 +13,14 @@ namespace MediaBrowser.Model.Session public string MessageCallbackUrl { get; set; } public bool SupportsContentUploading { get; set; } + public bool SupportsUniqueIdentifier { get; set; } + public bool SupportsSync { get; set; } public ClientCapabilities() { PlayableMediaTypes = new List<string>(); SupportedCommands = new List<string>(); + SupportsUniqueIdentifier = true; } } }
\ No newline at end of file diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs index f69fccae50..db67f3cbb5 100644 --- a/MediaBrowser.Model/Sync/SyncJob.cs +++ b/MediaBrowser.Model/Sync/SyncJob.cs @@ -46,26 +46,26 @@ namespace MediaBrowser.Model.Sync /// <value><c>true</c> if [unwatched only]; otherwise, <c>false</c>.</value> public bool UnwatchedOnly { get; set; } /// <summary> - /// Gets or sets the limit. + /// Gets or sets a value indicating whether [remove when watched]. /// </summary> - /// <value>The limit.</value> - public long? Limit { get; set; } + /// <value><c>true</c> if [remove when watched]; otherwise, <c>false</c>.</value> + public bool RemoveWhenWatched { get; set; } /// <summary> - /// Gets or sets the type of the limit. + /// Gets or sets a value indicating whether [synchronize new content]. /// </summary> - /// <value>The type of the limit.</value> - public SyncLimitType? LimitType { get; set; } + /// <value><c>true</c> if [synchronize new content]; otherwise, <c>false</c>.</value> + public bool SyncNewContent { get; set; } + /// <summary> + /// Gets or sets the item limit. + /// </summary> + /// <value>The item limit.</value> + public int? ItemLimit { get; set; } /// <summary> /// Gets or sets the requested item ids. /// </summary> /// <value>The requested item ids.</value> public List<string> RequestedItemIds { get; set; } /// <summary> - /// Gets or sets a value indicating whether this instance is dynamic. - /// </summary> - /// <value><c>true</c> if this instance is dynamic; otherwise, <c>false</c>.</value> - public bool IsDynamic { get; set; } - /// <summary> /// Gets or sets the date created. /// </summary> /// <value>The date created.</value> diff --git a/MediaBrowser.Model/Sync/SyncJobItem.cs b/MediaBrowser.Model/Sync/SyncJobItem.cs index 141546eb5a..063f7feb25 100644 --- a/MediaBrowser.Model/Sync/SyncJobItem.cs +++ b/MediaBrowser.Model/Sync/SyncJobItem.cs @@ -1,4 +1,5 @@ - +using System; + namespace MediaBrowser.Model.Sync { public class SyncJobItem @@ -37,12 +38,18 @@ namespace MediaBrowser.Model.Sync /// Gets or sets the status. /// </summary> /// <value>The status.</value> - public SyncJobStatus Status { get; set; } + public SyncJobItemStatus Status { get; set; } /// <summary> /// Gets or sets the current progress. /// </summary> /// <value>The current progress.</value> - public double? CurrentProgress { get; set; } + public double? Progress { get; set; } + + /// <summary> + /// Gets or sets the date created. + /// </summary> + /// <value>The date created.</value> + public DateTime DateCreated { get; set; } } } diff --git a/MediaBrowser.Model/Sync/SyncJobItemQuery.cs b/MediaBrowser.Model/Sync/SyncJobItemQuery.cs new file mode 100644 index 0000000000..e9af642acd --- /dev/null +++ b/MediaBrowser.Model/Sync/SyncJobItemQuery.cs @@ -0,0 +1,27 @@ + +namespace MediaBrowser.Model.Sync +{ + public class SyncJobItemQuery + { + /// <summary> + /// Gets or sets the start index. + /// </summary> + /// <value>The start index.</value> + public int? StartIndex { get; set; } + /// <summary> + /// Gets or sets the limit. + /// </summary> + /// <value>The limit.</value> + public int? Limit { get; set; } + /// <summary> + /// Gets or sets the job identifier. + /// </summary> + /// <value>The job identifier.</value> + public string JobId { get; set; } + /// <summary> + /// Gets or sets a value indicating whether this instance is completed. + /// </summary> + /// <value><c>null</c> if [is completed] contains no value, <c>true</c> if [is completed]; otherwise, <c>false</c>.</value> + public bool? IsCompleted { get; set; } + } +} diff --git a/MediaBrowser.Model/Sync/SyncJobItemStatus.cs b/MediaBrowser.Model/Sync/SyncJobItemStatus.cs new file mode 100644 index 0000000000..3d0579a3c0 --- /dev/null +++ b/MediaBrowser.Model/Sync/SyncJobItemStatus.cs @@ -0,0 +1,12 @@ + +namespace MediaBrowser.Model.Sync +{ + public enum SyncJobItemStatus + { + Queued = 0, + Converting = 1, + Transferring = 2, + Completed = 3, + Failed = 4 + } +} diff --git a/MediaBrowser.Model/Sync/SyncJobQuery.cs b/MediaBrowser.Model/Sync/SyncJobQuery.cs index 74b35186e0..218b3823e9 100644 --- a/MediaBrowser.Model/Sync/SyncJobQuery.cs +++ b/MediaBrowser.Model/Sync/SyncJobQuery.cs @@ -13,5 +13,10 @@ namespace MediaBrowser.Model.Sync /// </summary> /// <value>The limit.</value> public int? Limit { get; set; } + /// <summary> + /// Gets or sets a value indicating whether this instance is completed. + /// </summary> + /// <value><c>null</c> if [is completed] contains no value, <c>true</c> if [is completed]; otherwise, <c>false</c>.</value> + public bool? IsCompleted { get; set; } } } diff --git a/MediaBrowser.Model/Sync/SyncJobRequest.cs b/MediaBrowser.Model/Sync/SyncJobRequest.cs index 987f396e40..4e044d62a2 100644 --- a/MediaBrowser.Model/Sync/SyncJobRequest.cs +++ b/MediaBrowser.Model/Sync/SyncJobRequest.cs @@ -35,19 +35,25 @@ namespace MediaBrowser.Model.Sync /// <value><c>true</c> if [unwatched only]; otherwise, <c>false</c>.</value> public bool UnwatchedOnly { get; set; } /// <summary> - /// Gets or sets the limit. + /// Gets or sets a value indicating whether [remove when watched]. /// </summary> - /// <value>The limit.</value> - public long? Limit { get; set; } + /// <value><c>true</c> if [remove when watched]; otherwise, <c>false</c>.</value> + public bool RemoveWhenWatched { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [synchronize new content]. + /// </summary> + /// <value><c>true</c> if [synchronize new content]; otherwise, <c>false</c>.</value> + public bool SyncNewContent { get; set; } /// <summary> - /// Gets or sets the type of the limit. + /// Gets or sets the limit. /// </summary> - /// <value>The type of the limit.</value> - public SyncLimitType? LimitType { get; set; } + /// <value>The limit.</value> + public int? ItemLimit { get; set; } public SyncJobRequest() { ItemIds = new List<string>(); + SyncNewContent = true; } } } diff --git a/MediaBrowser.Model/Sync/SyncJobStatus.cs b/MediaBrowser.Model/Sync/SyncJobStatus.cs index ebe375ad80..961ccf5446 100644 --- a/MediaBrowser.Model/Sync/SyncJobStatus.cs +++ b/MediaBrowser.Model/Sync/SyncJobStatus.cs @@ -4,10 +4,8 @@ namespace MediaBrowser.Model.Sync public enum SyncJobStatus { Queued = 0, - Transcoding = 1, - TranscodingFailed = 2, - Transferring = 3, - Completed = 4, - Cancelled = 5 + InProgress = 1, + Completed = 2, + CompletedWithError = 3 } } diff --git a/MediaBrowser.Model/Sync/SyncLimitType.cs b/MediaBrowser.Model/Sync/SyncLimitType.cs deleted file mode 100644 index d20f9e33d1..0000000000 --- a/MediaBrowser.Model/Sync/SyncLimitType.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace MediaBrowser.Model.Sync -{ - public enum SyncLimitType - { - ItemCount = 0 - } -}
\ No newline at end of file diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs new file mode 100644 index 0000000000..02d1777472 --- /dev/null +++ b/MediaBrowser.Model/Users/UserPolicy.cs @@ -0,0 +1,11 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace MediaBrowser.Model.Users +{ + public class UserPolicy + { + } +} |
