From 504e2099e2f11203c48dff94a67ec797a454d459 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 6 Feb 2015 22:25:23 -0500 Subject: update dlna profiles --- MediaBrowser.Model/ApiClient/IApiClient.cs | 31 +++++++++++++++++++----------- MediaBrowser.Model/Dlna/AudioOptions.cs | 11 +++++++++++ MediaBrowser.Model/Dlna/DeviceProfile.cs | 2 -- MediaBrowser.Model/Dlna/StreamBuilder.cs | 9 +++++---- 4 files changed, 36 insertions(+), 17 deletions(-) (limited to 'MediaBrowser.Model') diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index 03802fc28f..8b489453ec 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -41,7 +41,7 @@ namespace MediaBrowser.Model.ApiClient /// Occurs when [authenticated]. /// event EventHandler> Authenticated; - + /// /// Gets the API URL. /// @@ -201,7 +201,7 @@ namespace MediaBrowser.Model.ApiClient /// The cancellation token. /// Task<HttpResponse>. Task GetResponse(string url, CancellationToken cancellationToken = default(CancellationToken)); - + /// /// Updates the user configuration. /// @@ -225,7 +225,7 @@ namespace MediaBrowser.Model.ApiClient /// The query. /// Task<QueryResult<BaseItemDto>>. Task GetLatestItems(LatestItemsQuery query); - + /// /// Gets the intros async. /// @@ -324,7 +324,7 @@ namespace MediaBrowser.Model.ApiClient /// The cancellation token. /// Task<ItemsResult>. Task GetUserViews(string userId, CancellationToken cancellationToken = default(CancellationToken)); - + /// /// Gets the instant mix from song async. /// @@ -563,7 +563,7 @@ namespace MediaBrowser.Model.ApiClient /// The identifier. /// Task<UserDto>. Task GetOfflineUserAsync(string id); - + /// /// Gets the parental ratings async. /// @@ -761,7 +761,7 @@ namespace MediaBrowser.Model.ApiClient /// The password. /// Task. /// userId - Task AuthenticateUserAsync(string username, + Task AuthenticateUserAsync(string username, string password); /// @@ -874,7 +874,7 @@ namespace MediaBrowser.Model.ApiClient /// The access token. /// The user identifier. void SetAuthenticationInfo(string accessToken, string userId); - + /// /// Sets the authentication information. /// @@ -921,7 +921,7 @@ namespace MediaBrowser.Model.ApiClient /// /// Task. Task StopReceivingSyncJobsUpdates(); - + /// /// Starts the receiving session updates. /// @@ -934,7 +934,7 @@ namespace MediaBrowser.Model.ApiClient /// /// Task. Task StopReceivingSessionUpdates(); - + /// /// Gets the image URL. /// @@ -1378,7 +1378,7 @@ namespace MediaBrowser.Model.ApiClient /// The file. /// The cancellation token. /// Task. - Task UploadFile(Stream stream, + Task UploadFile(Stream stream, LocalFileInfo file, CancellationToken cancellationToken); @@ -1439,7 +1439,7 @@ namespace MediaBrowser.Model.ApiClient /// The cancellation token. /// Task<Stream>. Task GetSyncJobItemAdditionalFile(string id, string name, CancellationToken cancellationToken); - + /// /// Opens the web socket. /// @@ -1503,5 +1503,14 @@ namespace MediaBrowser.Model.ApiClient /// The identifier. /// Task. Task EnableCancelledSyncJobItem(string id); + /// + /// Gets the synchronize options. + /// + /// The user identifier. + /// The item ids. + /// The parent identifier. + /// The category. + /// Task<SyncOptions>. + Task GetSyncOptions(IEnumerable itemIds, string userId, string parentId = null, SyncCategory? category = null); } } \ No newline at end of file diff --git a/MediaBrowser.Model/Dlna/AudioOptions.cs b/MediaBrowser.Model/Dlna/AudioOptions.cs index dd6dad2610..cddfd89559 100644 --- a/MediaBrowser.Model/Dlna/AudioOptions.cs +++ b/MediaBrowser.Model/Dlna/AudioOptions.cs @@ -47,6 +47,17 @@ namespace MediaBrowser.Model.Dlna /// The audio transcoding bitrate. public int? AudioTranscodingBitrate { get; set; } + /// + /// Gets or sets a value indicating whether [supports direct remote content]. + /// + /// true if [supports direct remote content]; otherwise, false. + public bool SupportsDirectRemoteContent { get; set; } + /// + /// Gets or sets a value indicating whether [supports custom HTTP headers]. + /// + /// true if [supports custom HTTP headers]; otherwise, false. + public bool SupportsCustomHttpHeaders { get; set; } + /// /// Gets the maximum bitrate. /// diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 3bbef28c57..4b137a268c 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -76,8 +76,6 @@ namespace MediaBrowser.Model.Dlna public bool RequiresPlainVideoItems { get; set; } public bool RequiresPlainFolders { get; set; } - public bool SupportsDirectRemoteContent { get; set; } - public bool SupportsCustomHttpHeaders { get; set; } public bool EnableMSMediaReceiverRegistrar { get; set; } public XmlAttribute[] XmlRootAttributes { get; set; } diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 8b929425a1..6076637b44 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -258,7 +258,7 @@ namespace MediaBrowser.Model.Dlna if (IsEligibleForDirectPlay(item, maxBitrateSetting, subtitleStream, options)) { // See if it can be direct played - var directPlay = GetVideoDirectPlayProfile(options.Profile, item, videoStream, audioStream); + var directPlay = GetVideoDirectPlayProfile(options, options.Profile, item, videoStream, audioStream); if (directPlay != null) { @@ -380,7 +380,8 @@ namespace MediaBrowser.Model.Dlna return 128000; } - private PlayMethod? GetVideoDirectPlayProfile(DeviceProfile profile, + private PlayMethod? GetVideoDirectPlayProfile(VideoOptions options, + DeviceProfile profile, MediaSourceInfo mediaSource, MediaStream videoStream, MediaStream audioStream) @@ -504,12 +505,12 @@ namespace MediaBrowser.Model.Dlna if (mediaSource.Protocol == MediaProtocol.Http) { - if (!profile.SupportsDirectRemoteContent) + if (!options.SupportsDirectRemoteContent) { return null; } - if (mediaSource.RequiredHttpHeaders.Count > 0 && !profile.SupportsCustomHttpHeaders) + if (mediaSource.RequiredHttpHeaders.Count > 0 && !options.SupportsCustomHttpHeaders) { return null; } -- cgit v1.2.3