aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-06 22:25:23 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-06 22:25:23 -0500
commit504e2099e2f11203c48dff94a67ec797a454d459 (patch)
tree5371a9339be0530ed5e17988251c91a2dc030ee2 /MediaBrowser.Model
parent7320567b9eb9179fabebf918df226a187ae2d55f (diff)
update dlna profiles
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/ApiClient/IApiClient.cs31
-rw-r--r--MediaBrowser.Model/Dlna/AudioOptions.cs11
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs2
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs9
4 files changed, 36 insertions, 17 deletions
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index 03802fc28..8b489453e 100644
--- a/MediaBrowser.Model/ApiClient/IApiClient.cs
+++ b/MediaBrowser.Model/ApiClient/IApiClient.cs
@@ -41,7 +41,7 @@ namespace MediaBrowser.Model.ApiClient
/// Occurs when [authenticated].
/// </summary>
event EventHandler<GenericEventArgs<AuthenticationResult>> Authenticated;
-
+
/// <summary>
/// Gets the API URL.
/// </summary>
@@ -201,7 +201,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;HttpResponse&gt;.</returns>
Task<HttpResponse> GetResponse(string url, CancellationToken cancellationToken = default(CancellationToken));
-
+
/// <summary>
/// Updates the user configuration.
/// </summary>
@@ -225,7 +225,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="query">The query.</param>
/// <returns>Task&lt;QueryResult&lt;BaseItemDto&gt;&gt;.</returns>
Task<BaseItemDto[]> GetLatestItems(LatestItemsQuery query);
-
+
/// <summary>
/// Gets the intros async.
/// </summary>
@@ -324,7 +324,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;ItemsResult&gt;.</returns>
Task<ItemsResult> GetUserViews(string userId, CancellationToken cancellationToken = default(CancellationToken));
-
+
/// <summary>
/// Gets the instant mix from song async.
/// </summary>
@@ -563,7 +563,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="id">The identifier.</param>
/// <returns>Task&lt;UserDto&gt;.</returns>
Task<UserDto> GetOfflineUserAsync(string id);
-
+
/// <summary>
/// Gets the parental ratings async.
/// </summary>
@@ -761,7 +761,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="password">The password.</param>
/// <returns>Task.</returns>
/// <exception cref="ArgumentNullException">userId</exception>
- Task<AuthenticationResult> AuthenticateUserAsync(string username,
+ Task<AuthenticationResult> AuthenticateUserAsync(string username,
string password);
/// <summary>
@@ -874,7 +874,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="accessToken">The access token.</param>
/// <param name="userId">The user identifier.</param>
void SetAuthenticationInfo(string accessToken, string userId);
-
+
/// <summary>
/// Sets the authentication information.
/// </summary>
@@ -921,7 +921,7 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
/// <returns>Task.</returns>
Task StopReceivingSyncJobsUpdates();
-
+
/// <summary>
/// Starts the receiving session updates.
/// </summary>
@@ -934,7 +934,7 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
/// <returns>Task.</returns>
Task StopReceivingSessionUpdates();
-
+
/// <summary>
/// Gets the image URL.
/// </summary>
@@ -1378,7 +1378,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="file">The file.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task.</returns>
- Task UploadFile(Stream stream,
+ Task UploadFile(Stream stream,
LocalFileInfo file,
CancellationToken cancellationToken);
@@ -1439,7 +1439,7 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;Stream&gt;.</returns>
Task<Stream> GetSyncJobItemAdditionalFile(string id, string name, CancellationToken cancellationToken);
-
+
/// <summary>
/// Opens the web socket.
/// </summary>
@@ -1503,5 +1503,14 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="id">The identifier.</param>
/// <returns>Task.</returns>
Task EnableCancelledSyncJobItem(string id);
+ /// <summary>
+ /// Gets the synchronize options.
+ /// </summary>
+ /// <param name="userId">The user identifier.</param>
+ /// <param name="itemIds">The item ids.</param>
+ /// <param name="parentId">The parent identifier.</param>
+ /// <param name="category">The category.</param>
+ /// <returns>Task&lt;SyncOptions&gt;.</returns>
+ Task<SyncOptions> GetSyncOptions(IEnumerable<string> 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 dd6dad261..cddfd8955 100644
--- a/MediaBrowser.Model/Dlna/AudioOptions.cs
+++ b/MediaBrowser.Model/Dlna/AudioOptions.cs
@@ -48,6 +48,17 @@ namespace MediaBrowser.Model.Dlna
public int? AudioTranscodingBitrate { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether [supports direct remote content].
+ /// </summary>
+ /// <value><c>true</c> if [supports direct remote content]; otherwise, <c>false</c>.</value>
+ public bool SupportsDirectRemoteContent { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether [supports custom HTTP headers].
+ /// </summary>
+ /// <value><c>true</c> if [supports custom HTTP headers]; otherwise, <c>false</c>.</value>
+ public bool SupportsCustomHttpHeaders { get; set; }
+
+ /// <summary>
/// Gets the maximum bitrate.
/// </summary>
/// <returns>System.Nullable&lt;System.Int32&gt;.</returns>
diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs
index 3bbef28c5..4b137a268 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 8b929425a..6076637b4 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;
}