aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke <luke.pulverenti@gmail.com>2015-02-09 16:58:30 -0500
committerLuke <luke.pulverenti@gmail.com>2015-02-09 16:58:30 -0500
commit4cc3b2f0ccd7c092a4acf72db4903415e175037a (patch)
treef9f90f8665b726253b8b357674f2f141aa43abc9 /MediaBrowser.Model
parente7037a9b80843c127712f11430239f8fa3cb4aed (diff)
parent3d7089a7dbabb652730c892206ca050f52f832b1 (diff)
Merge pull request #1005 from MediaBrowser/dev
3.0.5518.0
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/ApiClient/ApiClientExtensions.cs6
-rw-r--r--MediaBrowser.Model/ApiClient/ConnectionResult.cs2
-rw-r--r--MediaBrowser.Model/ApiClient/ConnectionState.cs4
-rw-r--r--MediaBrowser.Model/ApiClient/IApiClient.cs137
-rw-r--r--MediaBrowser.Model/ApiClient/IConnectionManager.cs9
-rw-r--r--MediaBrowser.Model/ApiClient/IServerEvents.cs18
-rw-r--r--MediaBrowser.Model/ApiClient/ServerCredentials.cs6
-rw-r--r--MediaBrowser.Model/ApiClient/ServerInfo.cs48
-rw-r--r--MediaBrowser.Model/ApiClient/ServerUserInfo.cs9
-rw-r--r--MediaBrowser.Model/Branding/BrandingOptions.cs5
-rw-r--r--MediaBrowser.Model/Configuration/FanartOptions.cs17
-rw-r--r--MediaBrowser.Model/Configuration/ServerConfiguration.cs43
-rw-r--r--MediaBrowser.Model/Configuration/TheMovieDbOptions.cs12
-rw-r--r--MediaBrowser.Model/Configuration/TvdbOptions.cs12
-rw-r--r--MediaBrowser.Model/Configuration/UserConfiguration.cs35
-rw-r--r--MediaBrowser.Model/Connect/ConnectAuthorization.cs8
-rw-r--r--MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs8
-rw-r--r--MediaBrowser.Model/Devices/DeviceQuery.cs2
-rw-r--r--MediaBrowser.Model/Dlna/AudioOptions.cs11
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs3
-rw-r--r--MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs2
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs78
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs20
-rw-r--r--MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs1
-rw-r--r--MediaBrowser.Model/Dto/BaseItemDto.cs11
-rw-r--r--MediaBrowser.Model/Dto/UserDto.cs25
-rw-r--r--MediaBrowser.Model/Dto/VideoStreamOptions.cs158
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs24
-rw-r--r--MediaBrowser.Model/Entities/MetadataProviders.cs3
-rw-r--r--MediaBrowser.Model/Extensions/StringHelper.cs31
-rw-r--r--MediaBrowser.Model/LiveTv/RecordingInfoDto.cs6
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj8
-rw-r--r--MediaBrowser.Model/News/NewsChannel.cs12
-rw-r--r--MediaBrowser.Model/Notifications/NotificationType.cs3
-rw-r--r--MediaBrowser.Model/Querying/ItemFields.cs13
-rw-r--r--MediaBrowser.Model/Session/ClientCapabilities.cs10
-rw-r--r--MediaBrowser.Model/Sync/CompleteSyncJobInfo.cs15
-rw-r--r--MediaBrowser.Model/Sync/ItemFIleInfo.cs7
-rw-r--r--MediaBrowser.Model/Sync/LocalItem.cs11
-rw-r--r--MediaBrowser.Model/Sync/SyncDataRequest.cs2
-rw-r--r--MediaBrowser.Model/Sync/SyncDataResponse.cs2
-rw-r--r--MediaBrowser.Model/Sync/SyncDialogOptions.cs4
-rw-r--r--MediaBrowser.Model/Sync/SyncHelper.cs36
-rw-r--r--MediaBrowser.Model/Sync/SyncJob.cs6
-rw-r--r--MediaBrowser.Model/Sync/SyncJobCreationResult.cs9
-rw-r--r--MediaBrowser.Model/Sync/SyncJobItem.cs36
-rw-r--r--MediaBrowser.Model/Sync/SyncJobItemStatus.cs11
-rw-r--r--MediaBrowser.Model/Sync/SyncJobQuery.cs23
-rw-r--r--MediaBrowser.Model/Sync/SyncJobStatus.cs10
-rw-r--r--MediaBrowser.Model/Sync/SyncOptions.cs8
-rw-r--r--MediaBrowser.Model/Sync/SyncParameter.cs12
-rw-r--r--MediaBrowser.Model/Sync/SyncQuality.cs6
-rw-r--r--MediaBrowser.Model/Sync/SyncedItem.cs11
-rw-r--r--MediaBrowser.Model/System/SystemInfo.cs24
-rw-r--r--MediaBrowser.Model/Tasks/TaskResult.cs6
-rw-r--r--MediaBrowser.Model/Users/UserPolicy.cs21
56 files changed, 672 insertions, 388 deletions
diff --git a/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs b/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs
index 4b0effa55..b5bf29990 100644
--- a/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs
+++ b/MediaBrowser.Model/ApiClient/ApiClientExtensions.cs
@@ -1,5 +1,6 @@
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Querying;
+using MediaBrowser.Model.Sync;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -31,5 +32,10 @@ namespace MediaBrowser.Model.ApiClient
{
return apiClient.GetItemsAsync(query, CancellationToken.None);
}
+
+ public static Task<SyncDialogOptions> GetSyncOptions(this IApiClient apiClient, SyncJob job)
+ {
+ return apiClient.GetSyncOptions(job.RequestedItemIds, job.UserId, job.ParentId, job.Category);
+ }
}
}
diff --git a/MediaBrowser.Model/ApiClient/ConnectionResult.cs b/MediaBrowser.Model/ApiClient/ConnectionResult.cs
index 12a80ee15..32a80d1a3 100644
--- a/MediaBrowser.Model/ApiClient/ConnectionResult.cs
+++ b/MediaBrowser.Model/ApiClient/ConnectionResult.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Model.Connect;
+using MediaBrowser.Model.Dto;
using System.Collections.Generic;
namespace MediaBrowser.Model.ApiClient
@@ -9,6 +10,7 @@ namespace MediaBrowser.Model.ApiClient
public List<ServerInfo> Servers { get; set; }
public IApiClient ApiClient { get; set; }
public ConnectUser ConnectUser { get; set; }
+ public UserDto OfflineUser { get; set; }
public ConnectionResult()
{
diff --git a/MediaBrowser.Model/ApiClient/ConnectionState.cs b/MediaBrowser.Model/ApiClient/ConnectionState.cs
index 5e47d688e..9b753c7bb 100644
--- a/MediaBrowser.Model/ApiClient/ConnectionState.cs
+++ b/MediaBrowser.Model/ApiClient/ConnectionState.cs
@@ -6,6 +6,8 @@ namespace MediaBrowser.Model.ApiClient
ServerSignIn = 2,
SignedIn = 3,
ServerSelection = 4,
- ConnectSignIn = 5
+ ConnectSignIn = 5,
+ OfflineSignIn = 6,
+ OfflineSignedIn = 7
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index 9faa8fced..ca49c6c5a 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>
@@ -558,6 +558,13 @@ namespace MediaBrowser.Model.ApiClient
Task<UserDto> GetUserAsync(string id);
/// <summary>
+ /// Gets the offline user asynchronous.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>Task&lt;UserDto&gt;.</returns>
+ Task<UserDto> GetOfflineUserAsync(string id);
+
+ /// <summary>
/// Gets the parental ratings async.
/// </summary>
/// <returns>Task{List{ParentalRating}}.</returns>
@@ -754,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>
@@ -867,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>
@@ -887,6 +894,35 @@ namespace MediaBrowser.Model.ApiClient
void ChangeServerLocation(string address, bool keepExistingAuth = false);
/// <summary>
+ /// Starts the receiving synchronize job updates.
+ /// </summary>
+ /// <param name="intervalMs">The interval ms.</param>
+ /// <param name="jobId">The job identifier.</param>
+ /// <returns>Task.</returns>
+ Task StartReceivingSyncJobUpdates(int intervalMs, string jobId);
+
+ /// <summary>
+ /// Stops the receiving synchronize job updates.
+ /// </summary>
+ /// <returns>Task.</returns>
+ Task StopReceivingSyncJobUpdates();
+
+ /// <summary>
+ /// Starts the receiving synchronize jobs updates.
+ /// </summary>
+ /// <param name="intervalMs">The interval ms.</param>
+ /// <param name="userId">The user identifier.</param>
+ /// <param name="targetId">The target identifier.</param>
+ /// <returns>Task.</returns>
+ Task StartReceivingSyncJobsUpdates(int intervalMs, string userId, string targetId);
+
+ /// <summary>
+ /// Stops the receiving synchronize jobs updates.
+ /// </summary>
+ /// <returns>Task.</returns>
+ Task StopReceivingSyncJobsUpdates();
+
+ /// <summary>
/// Starts the receiving session updates.
/// </summary>
/// <param name="intervalMs">The interval ms.</param>
@@ -898,7 +934,7 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
/// <returns>Task.</returns>
Task StopReceivingSessionUpdates();
-
+
/// <summary>
/// Gets the image URL.
/// </summary>
@@ -1317,24 +1353,6 @@ namespace MediaBrowser.Model.ApiClient
Task<QueryResult<BaseItemDto>> GetPlaylistItems(PlaylistItemQuery query);
/// <summary>
- /// Gets the url needed to stream a video file
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">options</exception>
- [Obsolete]
- string GetVideoStreamUrl(VideoStreamOptions options);
-
- /// <summary>
- /// Formulates a url for streaming video using the HLS protocol
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">options</exception>
- [Obsolete]
- string GetHlsVideoStreamUrl(VideoStreamOptions options);
-
- /// <summary>
/// Sends the context message asynchronous.
/// </summary>
/// <param name="itemType">Type of the item.</param>
@@ -1360,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);
@@ -1385,6 +1403,13 @@ namespace MediaBrowser.Model.ApiClient
Task<SyncJob> CreateSyncJob(SyncJobRequest request);
/// <summary>
+ /// Updates the synchronize job.
+ /// </summary>
+ /// <param name="job">The job.</param>
+ /// <returns>Task.</returns>
+ Task UpdateSyncJob(SyncJob job);
+
+ /// <summary>
/// Gets the synchronize jobs.
/// </summary>
/// <param name="query">The query.</param>
@@ -1414,6 +1439,15 @@ namespace MediaBrowser.Model.ApiClient
Task<Stream> GetSyncJobItemFile(string id, CancellationToken cancellationToken);
/// <summary>
+ /// Gets the synchronize job item additional file.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <param name="name">The name.</param>
+ /// <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>
/// <param name="webSocketFactory">The web socket factory.</param>
@@ -1440,5 +1474,56 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="request">The request.</param>
/// <returns>Task&lt;SyncDataResponse&gt;.</returns>
Task<SyncDataResponse> SyncData(SyncDataRequest request);
+ /// <summary>
+ /// Gets the synchronize job item file URL.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>System.String.</returns>
+ string GetSyncJobItemFileUrl(string id);
+ /// <summary>
+ /// Marks the synchronize job item for removal.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>Task.</returns>
+ Task MarkSyncJobItemForRemoval(string id);
+ /// <summary>
+ /// Unmarks the synchronize job item for removal.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>Task.</returns>
+ Task UnmarkSyncJobItemForRemoval(string id);
+ /// <summary>
+ /// Queues the failed synchronize job item for retry.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>Task.</returns>
+ Task QueueFailedSyncJobItemForRetry(string id);
+ /// <summary>
+ /// Cancels the synchronize job.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>Task.</returns>
+ Task CancelSyncJob(string id);
+ /// <summary>
+ /// Cancels the synchronize job item.
+ /// </summary>
+ /// <param name="id">The identifier.</param>
+ /// <returns>Task.</returns>
+ Task CancelSyncJobItem(string id);
+ /// <summary>
+ /// Enables the cancelled synchronize job item.
+ /// </summary>
+ /// <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<SyncDialogOptions> GetSyncOptions(IEnumerable<string> itemIds, string userId, string parentId = null, SyncCategory? category = null);
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/ApiClient/IConnectionManager.cs b/MediaBrowser.Model/ApiClient/IConnectionManager.cs
index a54c330ac..658c71ac5 100644
--- a/MediaBrowser.Model/ApiClient/IConnectionManager.cs
+++ b/MediaBrowser.Model/ApiClient/IConnectionManager.cs
@@ -136,5 +136,14 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
/// <param name="cancellationToken">The cancellation token.</param>
Task<List<ServerInfo>> GetAvailableServers(CancellationToken cancellationToken);
+
+ /// <summary>
+ /// Authenticates an offline user with their password
+ /// </summary>
+ /// <param name="user">The user.</param>
+ /// <param name="password">The password.</param>
+ /// <param name="rememberCredentials">if set to <c>true</c> [remember credentials].</param>
+ /// <returns>Task.</returns>
+ Task AuthenticateOffline(UserDto user, string password, bool rememberCredentials);
}
}
diff --git a/MediaBrowser.Model/ApiClient/IServerEvents.cs b/MediaBrowser.Model/ApiClient/IServerEvents.cs
index 88faad388..ae2d5d323 100644
--- a/MediaBrowser.Model/ApiClient/IServerEvents.cs
+++ b/MediaBrowser.Model/ApiClient/IServerEvents.cs
@@ -3,9 +3,11 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Events;
using MediaBrowser.Model.Plugins;
using MediaBrowser.Model.Session;
+using MediaBrowser.Model.Sync;
using MediaBrowser.Model.Tasks;
using MediaBrowser.Model.Updates;
using System;
+using System.Collections.Generic;
namespace MediaBrowser.Model.ApiClient
{
@@ -130,5 +132,21 @@ namespace MediaBrowser.Model.ApiClient
/// Occurs when [session ended].
/// </summary>
event EventHandler<GenericEventArgs<SessionInfoDto>> SessionEnded;
+ /// <summary>
+ /// Occurs when [synchronize job created].
+ /// </summary>
+ event EventHandler<GenericEventArgs<SyncJobCreationResult>> SyncJobCreated;
+ /// <summary>
+ /// Occurs when [synchronize job cancelled].
+ /// </summary>
+ event EventHandler<GenericEventArgs<SyncJob>> SyncJobCancelled;
+ /// <summary>
+ /// Occurs when [synchronize jobs updated].
+ /// </summary>
+ event EventHandler<GenericEventArgs<List<SyncJob>>> SyncJobsUpdated;
+ /// <summary>
+ /// Occurs when [synchronize job updated].
+ /// </summary>
+ event EventHandler<GenericEventArgs<CompleteSyncJobInfo>> SyncJobUpdated;
}
}
diff --git a/MediaBrowser.Model/ApiClient/ServerCredentials.cs b/MediaBrowser.Model/ApiClient/ServerCredentials.cs
index fbbc6c05d..d911f8121 100644
--- a/MediaBrowser.Model/ApiClient/ServerCredentials.cs
+++ b/MediaBrowser.Model/ApiClient/ServerCredentials.cs
@@ -70,6 +70,10 @@ namespace MediaBrowser.Model.ApiClient
{
existing.LastConnectionMode = server.LastConnectionMode;
}
+ foreach (ServerUserInfo user in server.Users)
+ {
+ existing.AddOrUpdate(user);
+ }
}
else
{
@@ -85,7 +89,7 @@ namespace MediaBrowser.Model.ApiClient
foreach (var server in servers)
{
- if (StringHelper.Equals(id, server.Id))
+ if (StringHelper.EqualsIgnoreCase(id, server.Id))
{
return index;
}
diff --git a/MediaBrowser.Model/ApiClient/ServerInfo.cs b/MediaBrowser.Model/ApiClient/ServerInfo.cs
index 46cc560af..cc062f2f6 100644
--- a/MediaBrowser.Model/ApiClient/ServerInfo.cs
+++ b/MediaBrowser.Model/ApiClient/ServerInfo.cs
@@ -1,12 +1,16 @@
using MediaBrowser.Model.Connect;
+using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.System;
using System;
using System.Collections.Generic;
+using System.Linq;
namespace MediaBrowser.Model.ApiClient
{
public class ServerInfo
{
+ public List<ServerUserInfo> Users { get; set; }
+
public String Name { get; set; }
public String Id { get; set; }
public String LocalAddress { get; set; }
@@ -23,6 +27,7 @@ namespace MediaBrowser.Model.ApiClient
public ServerInfo()
{
WakeOnLanInfos = new List<WakeOnLanInfo>();
+ Users = new List<ServerUserInfo>();
}
public void ImportInfo(PublicSystemInfo systemInfo)
@@ -70,5 +75,48 @@ namespace MediaBrowser.Model.ApiClient
throw new ArgumentException("Unexpected ConnectionMode");
}
}
+
+ public void AddOrUpdate(ServerUserInfo user)
+ {
+ if (user == null)
+ {
+ throw new ArgumentNullException("user");
+ }
+
+ var list = Users.ToList();
+
+ var index = FindIndex(list, user.Id);
+
+ if (index != -1)
+ {
+ var existing = list[index];
+
+ // Merge the data
+ existing.IsSignedInOffline = user.IsSignedInOffline;
+ }
+ else
+ {
+ list.Add(user);
+ }
+
+ Users = list;
+ }
+
+ private int FindIndex(List<ServerUserInfo> users, string id)
+ {
+ var index = 0;
+
+ foreach (var user in users)
+ {
+ if (StringHelper.EqualsIgnoreCase(id, user.Id))
+ {
+ return index;
+ }
+
+ index++;
+ }
+
+ return -1;
+ }
}
}
diff --git a/MediaBrowser.Model/ApiClient/ServerUserInfo.cs b/MediaBrowser.Model/ApiClient/ServerUserInfo.cs
new file mode 100644
index 000000000..812da7402
--- /dev/null
+++ b/MediaBrowser.Model/ApiClient/ServerUserInfo.cs
@@ -0,0 +1,9 @@
+
+namespace MediaBrowser.Model.ApiClient
+{
+ public class ServerUserInfo
+ {
+ public string Id { get; set; }
+ public bool IsSignedInOffline { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Branding/BrandingOptions.cs b/MediaBrowser.Model/Branding/BrandingOptions.cs
index 737cb5c48..3b207d345 100644
--- a/MediaBrowser.Model/Branding/BrandingOptions.cs
+++ b/MediaBrowser.Model/Branding/BrandingOptions.cs
@@ -8,5 +8,10 @@ namespace MediaBrowser.Model.Branding
/// </summary>
/// <value>The login disclaimer.</value>
public string LoginDisclaimer { get; set; }
+ /// <summary>
+ /// Gets or sets the custom CSS.
+ /// </summary>
+ /// <value>The custom CSS.</value>
+ public string CustomCss { get; set; }
}
}
diff --git a/MediaBrowser.Model/Configuration/FanartOptions.cs b/MediaBrowser.Model/Configuration/FanartOptions.cs
new file mode 100644
index 000000000..e992abe5d
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/FanartOptions.cs
@@ -0,0 +1,17 @@
+
+namespace MediaBrowser.Model.Configuration
+{
+ public class FanartOptions
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether [enable automatic updates].
+ /// </summary>
+ /// <value><c>true</c> if [enable automatic updates]; otherwise, <c>false</c>.</value>
+ public bool EnableAutomaticUpdates { get; set; }
+ /// <summary>
+ /// Gets or sets the user API key.
+ /// </summary>
+ /// <value>The user API key.</value>
+ public string UserApiKey { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
index f9c5c6567..c15c76004 100644
--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs
@@ -21,6 +21,12 @@ namespace MediaBrowser.Model.Configuration
public int PublicPort { get; set; }
/// <summary>
+ /// Gets or sets the public HTTPS port.
+ /// </summary>
+ /// <value>The public HTTPS port.</value>
+ public int PublicHttpsPort { get; set; }
+
+ /// <summary>
/// Gets or sets the HTTP server port number.
/// </summary>
/// <value>The HTTP server port number.</value>
@@ -31,7 +37,19 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value>The HTTPS server port number.</value>
public int HttpsPortNumber { get; set; }
-
+
+ /// <summary>
+ /// Gets or sets a value indicating whether [use HTTPS].
+ /// </summary>
+ /// <value><c>true</c> if [use HTTPS]; otherwise, <c>false</c>.</value>
+ public bool EnableHttps { get; set; }
+
+ /// <summary>
+ /// Gets or sets the value pointing to the file system where the ssl certiifcate is located..
+ /// </summary>
+ /// <value>The value pointing to the file system where the ssl certiifcate is located..</value>
+ public string CertificatePath { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether [enable internet providers].
/// </summary>
@@ -73,6 +91,12 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value><c>true</c> if [enable localized guids]; otherwise, <c>false</c>.</value>
public bool EnableLocalizedGuids { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether [enable library metadata sub folder].
+ /// </summary>
+ /// <value><c>true</c> if [enable library metadata sub folder]; otherwise, <c>false</c>.</value>
+ public bool EnableLibraryMetadataSubFolder { get; set; }
/// <summary>
/// Gets or sets the preferred metadata language.
@@ -136,6 +160,7 @@ namespace MediaBrowser.Model.Configuration
/// </summary>
/// <value><c>true</c> if [enable dashboard response caching]; otherwise, <c>false</c>.</value>
public bool EnableDashboardResponseCaching { get; set; }
+ public bool EnableDashboardResourceMinification { get; set; }
/// <summary>
/// Allows the dashboard to be served from a custom path.
@@ -143,13 +168,8 @@ namespace MediaBrowser.Model.Configuration
/// <value>The dashboard source path.</value>
public string DashboardSourcePath { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether [enable tv db updates].
- /// </summary>
- /// <value><c>true</c> if [enable tv db updates]; otherwise, <c>false</c>.</value>
- public bool EnableTvDbUpdates { get; set; }
- public bool EnableTmdbUpdates { get; set; }
- public bool EnableFanArtUpdates { get; set; }
+ public bool MergeMetadataAndImagesByName { get; set; }
+ public bool EnableStandaloneMetadata { get; set; }
/// <summary>
/// Gets or sets the image saving convention.
@@ -177,13 +197,14 @@ namespace MediaBrowser.Model.Configuration
public string[] InsecureApps8 { get; set; }
public bool SaveMetadataHidden { get; set; }
- public bool EnableWin8HttpListener { get; set; }
public NameValuePair[] ContentTypes { get; set; }
public bool EnableAudioArchiveFiles { get; set; }
public bool EnableVideoArchiveFiles { get; set; }
+ public bool EnableLegacyCollections { get; set; }
+
/// <summary>
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
/// </summary>
@@ -192,12 +213,14 @@ namespace MediaBrowser.Model.Configuration
{
ImageSavingConvention = ImageSavingConvention.Compatible;
PublicPort = 8096;
+ PublicHttpsPort = 8920;
HttpServerPortNumber = 8096;
HttpsPortNumber = 8920;
+ EnableHttps = false;
EnableDashboardResponseCaching = true;
+ EnableDashboardResourceMinification = true;
EnableAutomaticRestart = true;
- EnableWin8HttpListener = true;
EnableUPnP = true;
diff --git a/MediaBrowser.Model/Configuration/TheMovieDbOptions.cs b/MediaBrowser.Model/Configuration/TheMovieDbOptions.cs
new file mode 100644
index 000000000..9a73e3476
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/TheMovieDbOptions.cs
@@ -0,0 +1,12 @@
+
+namespace MediaBrowser.Model.Configuration
+{
+ public class TheMovieDbOptions
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether [enable automatic updates].
+ /// </summary>
+ /// <value><c>true</c> if [enable automatic updates]; otherwise, <c>false</c>.</value>
+ public bool EnableAutomaticUpdates { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Configuration/TvdbOptions.cs b/MediaBrowser.Model/Configuration/TvdbOptions.cs
new file mode 100644
index 000000000..034af609c
--- /dev/null
+++ b/MediaBrowser.Model/Configuration/TvdbOptions.cs
@@ -0,0 +1,12 @@
+
+namespace MediaBrowser.Model.Configuration
+{
+ public class TvdbOptions
+ {
+ /// <summary>
+ /// Gets or sets a value indicating whether [enable automatic updates].
+ /// </summary>
+ /// <value><c>true</c> if [enable automatic updates]; otherwise, <c>false</c>.</value>
+ public bool EnableAutomaticUpdates { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Configuration/UserConfiguration.cs b/MediaBrowser.Model/Configuration/UserConfiguration.cs
index 9e33c1c36..aa49ee50d 100644
--- a/MediaBrowser.Model/Configuration/UserConfiguration.cs
+++ b/MediaBrowser.Model/Configuration/UserConfiguration.cs
@@ -7,12 +7,6 @@ namespace MediaBrowser.Model.Configuration
public class UserConfiguration
{
/// <summary>
- /// Gets or sets the max parental rating.
- /// </summary>
- /// <value>The max parental rating.</value>
- public int? MaxParentalRating { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether this instance is administrator.
/// </summary>
/// <value><c>true</c> if this instance is administrator; otherwise, <c>false</c>.</value>
@@ -36,22 +30,8 @@ namespace MediaBrowser.Model.Configuration
/// <value>The subtitle language preference.</value>
public string SubtitleLanguagePreference { get; set; }
- /// <summary>
- /// Gets or sets a value indicating whether this instance is hidden.
- /// </summary>
- /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value>
- public bool IsHidden { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether this instance is disabled.
- /// </summary>
- /// <value><c>true</c> if this instance is disabled; otherwise, <c>false</c>.</value>
- public bool IsDisabled { get; set; }
-
public bool DisplayMissingEpisodes { get; set; }
public bool DisplayUnairedEpisodes { get; set; }
- public bool EnableRemoteControlOfOtherUsers { get; set; }
- public bool EnableSharedDeviceControl { get; set; }
public bool EnableLiveTvManagement { get; set; }
public bool EnableLiveTvAccess { get; set; }
@@ -61,9 +41,6 @@ namespace MediaBrowser.Model.Configuration
public bool GroupMoviesIntoBoxSets { get; set; }
- public string[] BlockedMediaFolders { get; set; }
- public string[] BlockedChannels { get; set; }
-
public string[] DisplayChannelsWithinViews { get; set; }
public string[] ExcludeFoldersFromGrouping { get; set; }
@@ -82,12 +59,7 @@ namespace MediaBrowser.Model.Configuration
public bool EnableCinemaMode { get; set; }
- public AccessSchedule[] AccessSchedules { get; set; }
-
- public bool EnableUserPreferenceAccess { get; set; }
-
public string[] LatestItemsExcludes { get; set; }
- public string[] BlockedTags { get; set; }
public bool HasMigratedToPolicy { get; set; }
@@ -100,14 +72,10 @@ namespace MediaBrowser.Model.Configuration
EnableLiveTvManagement = true;
EnableMediaPlayback = true;
EnableLiveTvAccess = true;
- EnableSharedDeviceControl = true;
LatestItemsExcludes = new string[] { };
OrderedViews = new string[] { };
- BlockedMediaFolders = new string[] { };
DisplayChannelsWithinViews = new string[] { };
- BlockedTags = new string[] { };
- BlockedChannels = new string[] { };
BlockUnratedItems = new UnratedItem[] { };
ExcludeFoldersFromGrouping = new string[] { };
@@ -115,9 +83,6 @@ namespace MediaBrowser.Model.Configuration
IncludeTrailersInSuggestions = true;
EnableCinemaMode = true;
- EnableUserPreferenceAccess = true;
-
- AccessSchedules = new AccessSchedule[] { };
}
}
}
diff --git a/MediaBrowser.Model/Connect/ConnectAuthorization.cs b/MediaBrowser.Model/Connect/ConnectAuthorization.cs
index 0c545f4ba..e8baf7269 100644
--- a/MediaBrowser.Model/Connect/ConnectAuthorization.cs
+++ b/MediaBrowser.Model/Connect/ConnectAuthorization.cs
@@ -7,14 +7,14 @@ namespace MediaBrowser.Model.Connect
public string UserName { get; set; }
public string ImageUrl { get; set; }
public string Id { get; set; }
- public string[] ExcludedLibraries { get; set; }
+ public string[] EnabledLibraries { get; set; }
public bool EnableLiveTv { get; set; }
- public string[] ExcludedChannels { get; set; }
+ public string[] EnabledChannels { get; set; }
public ConnectAuthorization()
{
- ExcludedLibraries = new string[] { };
- ExcludedChannels = new string[] { };
+ EnabledLibraries = new string[] { };
+ EnabledChannels = new string[] { };
}
}
}
diff --git a/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs b/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs
index d40d353f0..6baea15a9 100644
--- a/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs
+++ b/MediaBrowser.Model/Connect/ConnectAuthorizationRequest.cs
@@ -5,14 +5,14 @@ namespace MediaBrowser.Model.Connect
{
public string SendingUserId { get; set; }
public string ConnectUserName { get; set; }
- public string[] ExcludedLibraries { get; set; }
+ public string[] EnabledLibraries { get; set; }
public bool EnableLiveTv { get; set; }
- public string[] ExcludedChannels { get; set; }
+ public string[] EnabledChannels { get; set; }
public ConnectAuthorizationRequest()
{
- ExcludedLibraries = new string[] { };
- ExcludedChannels = new string[] { };
+ EnabledLibraries = new string[] { };
+ EnabledChannels = new string[] { };
}
}
}
diff --git a/MediaBrowser.Model/Devices/DeviceQuery.cs b/MediaBrowser.Model/Devices/DeviceQuery.cs
index 2cd2389d8..9ae498606 100644
--- a/MediaBrowser.Model/Devices/DeviceQuery.cs
+++ b/MediaBrowser.Model/Devices/DeviceQuery.cs
@@ -12,7 +12,7 @@ namespace MediaBrowser.Model.Devices
/// 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; }
+ public bool? SupportsPersistentIdentifier { get; set; }
/// <summary>
/// Gets or sets a value indicating whether [supports synchronize].
/// </summary>
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 1fb553010..4b137a268 100644
--- a/MediaBrowser.Model/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs
@@ -76,8 +76,7 @@ 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/MediaFormatProfileResolver.cs b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
index 5101bbe5a..ffff0f27d 100644
--- a/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
+++ b/MediaBrowser.Model/Dlna/MediaFormatProfileResolver.cs
@@ -109,7 +109,7 @@ namespace MediaBrowser.Model.Dlna
return new List<MediaFormatProfile> { MediaFormatProfile.AVC_TS_HD_DTS_T };
}
- if (StringHelper.EqualsIgnoreCase(audioCodec, "mp3"))
+ if (StringHelper.EqualsIgnoreCase(audioCodec, "mp2"))
{
if (timestampType == TransportStreamTimestamp.None)
{
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 7c47b0d44..6fa29a533 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -10,8 +10,6 @@ namespace MediaBrowser.Model.Dlna
{
public class StreamBuilder
{
- private readonly string[] _serverTextSubtitleOutputs = { "srt", "vtt", "ttml" };
-
public StreamInfo BuildAudioItem(AudioOptions options)
{
ValidateAudioInput(options);
@@ -110,7 +108,8 @@ namespace MediaBrowser.Model.Dlna
MediaType = DlnaProfileType.Audio,
MediaSource = item,
RunTimeTicks = item.RunTimeTicks,
- Context = options.Context
+ Context = options.Context,
+ DeviceProfile = options.Profile
};
int? maxBitrateSetting = options.GetMaxBitrate();
@@ -242,7 +241,8 @@ namespace MediaBrowser.Model.Dlna
MediaType = DlnaProfileType.Video,
MediaSource = item,
RunTimeTicks = item.RunTimeTicks,
- Context = options.Context
+ Context = options.Context,
+ DeviceProfile = options.Profile
};
int? audioStreamIndex = options.AudioStreamIndex ?? item.DefaultAudioStreamIndex;
@@ -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)
{
@@ -267,7 +267,10 @@ namespace MediaBrowser.Model.Dlna
if (subtitleStream != null)
{
- playlistItem.SubtitleDeliveryMethod = GetSubtitleDeliveryMethod(subtitleStream, options);
+ SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile);
+
+ playlistItem.SubtitleDeliveryMethod = subtitleProfile.Method;
+ playlistItem.SubtitleFormat = subtitleProfile.Format;
}
return playlistItem;
@@ -289,7 +292,10 @@ namespace MediaBrowser.Model.Dlna
{
if (subtitleStream != null)
{
- playlistItem.SubtitleDeliveryMethod = GetSubtitleDeliveryMethod(subtitleStream, options);
+ SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile);
+
+ playlistItem.SubtitleDeliveryMethod = subtitleProfile.Method;
+ playlistItem.SubtitleFormat = subtitleProfile.Format;
}
playlistItem.PlayMethod = PlayMethod.Transcode;
@@ -374,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)
@@ -498,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;
}
@@ -520,14 +527,9 @@ namespace MediaBrowser.Model.Dlna
{
if (subtitleStream != null)
{
- if (!subtitleStream.IsTextSubtitleStream)
- {
- return false;
- }
-
- SubtitleDeliveryMethod subtitleMethod = GetSubtitleDeliveryMethod(subtitleStream, options);
+ SubtitleProfile subtitleProfile = GetSubtitleProfile(subtitleStream, options.Profile);
- if (subtitleMethod != SubtitleDeliveryMethod.External && subtitleMethod != SubtitleDeliveryMethod.Embed)
+ if (subtitleProfile.Method != SubtitleDeliveryMethod.External && subtitleProfile.Method != SubtitleDeliveryMethod.Embed)
{
return false;
}
@@ -536,43 +538,33 @@ namespace MediaBrowser.Model.Dlna
return IsAudioEligibleForDirectPlay(item, maxBitrate);
}
- private SubtitleDeliveryMethod GetSubtitleDeliveryMethod(MediaStream subtitleStream,
- VideoOptions options)
+ public static SubtitleProfile GetSubtitleProfile(MediaStream subtitleStream, DeviceProfile deviceProfile)
{
- if (subtitleStream.IsTextSubtitleStream)
+ // Look for an external profile that matches the stream type (text/graphical)
+ foreach (SubtitleProfile profile in deviceProfile.SubtitleProfiles)
{
- // See if the device can retrieve the subtitles externally
- bool supportsSubsExternally = options.Context == EncodingContext.Streaming &&
- ContainsSubtitleFormat(options.Profile.SubtitleProfiles, SubtitleDeliveryMethod.External, _serverTextSubtitleOutputs);
-
- if (supportsSubsExternally)
- {
- return SubtitleDeliveryMethod.External;
- }
-
- // See if the device can retrieve the subtitles externally
- bool supportsEmbedded = ContainsSubtitleFormat(options.Profile.SubtitleProfiles, SubtitleDeliveryMethod.Embed, _serverTextSubtitleOutputs);
-
- if (supportsEmbedded)
+ if (subtitleStream.SupportsExternalStream)
{
- return SubtitleDeliveryMethod.Embed;
+ if (profile.Method == SubtitleDeliveryMethod.External && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
+ {
+ return profile;
+ }
}
}
- return SubtitleDeliveryMethod.Encode;
- }
-
- private bool ContainsSubtitleFormat(SubtitleProfile[] profiles, SubtitleDeliveryMethod method, string[] formats)
- {
- foreach (SubtitleProfile profile in profiles)
+ foreach (SubtitleProfile profile in deviceProfile.SubtitleProfiles)
{
- if (method == profile.Method && ListHelper.ContainsIgnoreCase(formats, profile.Format))
+ if (profile.Method == SubtitleDeliveryMethod.Embed && subtitleStream.IsTextSubtitleStream == MediaStream.IsTextFormat(profile.Format))
{
- return true;
+ return profile;
}
}
- return false;
+ return new SubtitleProfile
+ {
+ Method = SubtitleDeliveryMethod.Encode,
+ Format = subtitleStream.Codec
+ };
}
private bool IsAudioEligibleForDirectPlay(MediaSourceInfo item, int? maxBitrate)
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 22eb0cf6c..3c2f39b74 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -54,6 +54,7 @@ namespace MediaBrowser.Model.Dlna
public float? MaxFramerate { get; set; }
+ public DeviceProfile DeviceProfile { get; set; }
public string DeviceProfileId { get; set; }
public string DeviceId { get; set; }
@@ -160,11 +161,6 @@ namespace MediaBrowser.Model.Dlna
List<SubtitleStreamInfo> list = new List<SubtitleStreamInfo>();
- if (SubtitleDeliveryMethod != SubtitleDeliveryMethod.External)
- {
- return list;
- }
-
// HLS will preserve timestamps so we can just grab the full subtitle stream
long startPositionTicks = StringHelper.EqualsIgnoreCase(Protocol, "hls")
? 0
@@ -175,7 +171,7 @@ namespace MediaBrowser.Model.Dlna
{
foreach (MediaStream stream in MediaSource.MediaStreams)
{
- if (stream.Type == MediaStreamType.Subtitle && stream.IsTextSubtitleStream && stream.Index == SubtitleStreamIndex.Value)
+ if (stream.Type == MediaStreamType.Subtitle && stream.Index == SubtitleStreamIndex.Value)
{
AddSubtitle(list, stream, baseUrl, startPositionTicks);
}
@@ -186,7 +182,7 @@ namespace MediaBrowser.Model.Dlna
{
foreach (MediaStream stream in MediaSource.MediaStreams)
{
- if (stream.Type == MediaStreamType.Subtitle && stream.IsTextSubtitleStream && (!SubtitleStreamIndex.HasValue || stream.Index != SubtitleStreamIndex.Value))
+ if (stream.Type == MediaStreamType.Subtitle && (!SubtitleStreamIndex.HasValue || stream.Index != SubtitleStreamIndex.Value))
{
AddSubtitle(list, stream, baseUrl, startPositionTicks);
}
@@ -198,6 +194,13 @@ namespace MediaBrowser.Model.Dlna
private void AddSubtitle(List<SubtitleStreamInfo> list, MediaStream stream, string baseUrl, long startPositionTicks)
{
+ var subtitleProfile = StreamBuilder.GetSubtitleProfile(stream, DeviceProfile);
+
+ if (subtitleProfile.Method != SubtitleDeliveryMethod.External)
+ {
+ return;
+ }
+
string url = string.Format("{0}/Videos/{1}/{2}/Subtitles/{3}/{4}/Stream.{5}",
baseUrl,
ItemId,
@@ -212,7 +215,8 @@ namespace MediaBrowser.Model.Dlna
IsForced = stream.IsForced,
Language = stream.Language,
Name = stream.Language ?? "Unknown",
- Format = SubtitleFormat
+ Format = SubtitleFormat,
+ Index = stream.Index
});
}
diff --git a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
index 1600408d6..a7a8da3ba 100644
--- a/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/SubtitleStreamInfo.cs
@@ -7,5 +7,6 @@ namespace MediaBrowser.Model.Dlna
public string Name { get; set; }
public bool IsForced { get; set; }
public string Format { get; set; }
+ public int Index { get; set; }
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs
index 2383d4809..be3cd99be 100644
--- a/MediaBrowser.Model/Dto/BaseItemDto.cs
+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs
@@ -56,6 +56,8 @@ namespace MediaBrowser.Model.Dto
public int? AirsBeforeEpisodeNumber { get; set; }
public int? AbsoluteEpisodeNumber { get; set; }
public bool? DisplaySpecialsWithSeasons { get; set; }
+ public bool? CanDelete { get; set; }
+ public bool? CanDownload { get; set; }
public string PreferredMetadataLanguage { get; set; }
public string PreferredMetadataCountryCode { get; set; }
@@ -69,7 +71,8 @@ namespace MediaBrowser.Model.Dto
public int? AnimeSeriesIndex { get; set; }
public bool? SupportsSync { get; set; }
-
+ public bool? HasSyncJob { get; set; }
+
/// <summary>
/// Gets or sets the DVD season number.
/// </summary>
@@ -224,12 +227,6 @@ 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>
diff --git a/MediaBrowser.Model/Dto/UserDto.cs b/MediaBrowser.Model/Dto/UserDto.cs
index 9b6d92030..c66b34150 100644
--- a/MediaBrowser.Model/Dto/UserDto.cs
+++ b/MediaBrowser.Model/Dto/UserDto.cs
@@ -26,7 +26,14 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The server identifier.</value>
public string ServerId { get; set; }
-
+
+ /// <summary>
+ /// Gets or sets the name of the server.
+ /// This is not used by the server and is for client-side usage only.
+ /// </summary>
+ /// <value>The name of the server.</value>
+ public string ServerName { get; set; }
+
/// <summary>
/// Gets or sets the name of the connect user.
/// </summary>
@@ -48,7 +55,13 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value>The id.</value>
public string Id { get; set; }
-
+
+ /// <summary>
+ /// Gets or sets the offline password.
+ /// </summary>
+ /// <value>The offline password.</value>
+ public string OfflinePassword { get; set; }
+
/// <summary>
/// Gets or sets the primary image tag.
/// </summary>
@@ -66,6 +79,12 @@ namespace MediaBrowser.Model.Dto
/// </summary>
/// <value><c>true</c> if this instance has configured password; otherwise, <c>false</c>.</value>
public bool HasConfiguredPassword { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance has configured easy password.
+ /// </summary>
+ /// <value><c>true</c> if this instance has configured easy password; otherwise, <c>false</c>.</value>
+ public bool HasConfiguredEasyPassword { get; set; }
/// <summary>
/// Gets or sets the last login date.
@@ -102,7 +121,7 @@ namespace MediaBrowser.Model.Dto
/// </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>
diff --git a/MediaBrowser.Model/Dto/VideoStreamOptions.cs b/MediaBrowser.Model/Dto/VideoStreamOptions.cs
deleted file mode 100644
index e9a83bd12..000000000
--- a/MediaBrowser.Model/Dto/VideoStreamOptions.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-using System;
-
-namespace MediaBrowser.Model.Dto
-{
- /// <summary>
- /// Class VideoStreamOptions
- /// </summary>
- [Obsolete]
- 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>
- /// <value>The video codec.</value>
- public string 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>
- /// Gets or sets the baseline stream audio bit rate.
- /// </summary>
- /// <value>The baseline stream audio bit rate.</value>
- public int? BaselineStreamAudioBitRate { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether [append baseline stream].
- /// </summary>
- /// <value><c>true</c> if [append baseline stream]; otherwise, <c>false</c>.</value>
- public bool AppendBaselineStream { get; set; }
-
- /// <summary>
- /// Gets or sets the time stamp offset ms. Only used with HLS.
- /// </summary>
- /// <value>The time stamp offset ms.</value>
- public int? TimeStampOffsetMs { get; set; }
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index 4a9b765c2..4af32bb50 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -50,7 +50,7 @@ namespace MediaBrowser.Model.Entities
/// </summary>
/// <value>The reference frames.</value>
public int? RefFrames { get; set; }
-
+
/// <summary>
/// Gets or sets the length of the packet.
/// </summary>
@@ -141,16 +141,26 @@ namespace MediaBrowser.Model.Entities
{
if (Type != MediaStreamType.Subtitle) return false;
- string codec = Codec ?? string.Empty;
+ return IsTextFormat(Codec);
+ }
+ }
+
+ public static bool IsTextFormat(string format)
+ {
+ string codec = format ?? string.Empty;
- // sub = external .sub file
+ // sub = external .sub file
- return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
- StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1 &&
- !StringHelper.EqualsIgnoreCase(codec, "sub");
- }
+ return StringHelper.IndexOfIgnoreCase(codec, "pgs") == -1 &&
+ StringHelper.IndexOfIgnoreCase(codec, "dvd") == -1 &&
+ !StringHelper.EqualsIgnoreCase(codec, "sub");
}
+ /// <summary>
+ /// Gets or sets a value indicating whether [supports external stream].
+ /// </summary>
+ /// <value><c>true</c> if [supports external stream]; otherwise, <c>false</c>.</value>
+ public bool SupportsExternalStream { get; set; }
/// <summary>
/// Gets or sets the filename.
diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProviders.cs
index e86773789..7644b150a 100644
--- a/MediaBrowser.Model/Entities/MetadataProviders.cs
+++ b/MediaBrowser.Model/Entities/MetadataProviders.cs
@@ -40,6 +40,7 @@ namespace MediaBrowser.Model.Entities
NesBoxRom = 14,
TvRage = 15,
AudioDbArtist = 16,
- AudioDbAlbum = 17
+ AudioDbAlbum = 17,
+ MusicBrainzTrack = 18
}
}
diff --git a/MediaBrowser.Model/Extensions/StringHelper.cs b/MediaBrowser.Model/Extensions/StringHelper.cs
index 206723467..99bec68a7 100644
--- a/MediaBrowser.Model/Extensions/StringHelper.cs
+++ b/MediaBrowser.Model/Extensions/StringHelper.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using System.Text;
using System.Text.RegularExpressions;
namespace MediaBrowser.Model.Extensions
@@ -94,5 +95,35 @@ namespace MediaBrowser.Model.Extensions
{
return new Regex(term).Split(str, limit);
}
+
+ /// <summary>
+ /// Replaces the specified STR.
+ /// </summary>
+ /// <param name="str">The STR.</param>
+ /// <param name="oldValue">The old value.</param>
+ /// <param name="newValue">The new value.</param>
+ /// <param name="comparison">The comparison.</param>
+ /// <returns>System.String.</returns>
+ public static string Replace(this string str, string oldValue, string newValue, StringComparison comparison)
+ {
+ var sb = new StringBuilder();
+
+ var previousIndex = 0;
+ var index = str.IndexOf(oldValue, comparison);
+
+ while (index != -1)
+ {
+ sb.Append(str.Substring(previousIndex, index - previousIndex));
+ sb.Append(newValue);
+ index += oldValue.Length;
+
+ previousIndex = index;
+ index = str.IndexOf(oldValue, index, comparison);
+ }
+
+ sb.Append(str.Substring(previousIndex));
+
+ return sb.ToString();
+ }
}
}
diff --git a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs b/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs
index 15378a9af..a6cd85d8d 100644
--- a/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs
+++ b/MediaBrowser.Model/LiveTv/RecordingInfoDto.cs
@@ -100,6 +100,12 @@ namespace MediaBrowser.Model.LiveTv
public string Path { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance can delete.
+ /// </summary>
+ /// <value><c>null</c> if [can delete] contains no value, <c>true</c> if [can delete]; otherwise, <c>false</c>.</value>
+ public bool? CanDelete { get; set; }
+
+ /// <summary>
/// Overview of the recording.
/// </summary>
public string Overview { get; set; }
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index 2a1b0b659..c8e09dd82 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -76,6 +76,7 @@
<Compile Include="ApiClient\ServerCredentials.cs" />
<Compile Include="ApiClient\ServerDiscoveryInfo.cs" />
<Compile Include="ApiClient\ServerInfo.cs" />
+ <Compile Include="ApiClient\ServerUserInfo.cs" />
<Compile Include="ApiClient\SessionUpdatesEventArgs.cs" />
<Compile Include="ApiClient\WakeOnLanInfo.cs" />
<Compile Include="Branding\BrandingOptions.cs" />
@@ -97,8 +98,11 @@
<Compile Include="Configuration\ChapterOptions.cs" />
<Compile Include="Configuration\CinemaModeConfiguration.cs" />
<Compile Include="Configuration\EncodingOptions.cs" />
+ <Compile Include="Configuration\FanartOptions.cs" />
<Compile Include="Configuration\MetadataConfiguration.cs" />
<Compile Include="Configuration\PeopleMetadataOptions.cs" />
+ <Compile Include="Configuration\TheMovieDbOptions.cs" />
+ <Compile Include="Configuration\TvdbOptions.cs" />
<Compile Include="Configuration\XbmcMetadataOptions.cs" />
<Compile Include="Configuration\SubtitlePlaybackMode.cs" />
<Compile Include="Connect\ConnectAuthenticationExchangeResult.cs" />
@@ -132,7 +136,6 @@
<Compile Include="Dto\NameValuePair.cs" />
<Compile Include="MediaInfo\LiveMediaInfoResult.cs" />
<Compile Include="Dto\MediaSourceType.cs" />
- <Compile Include="Dto\VideoStreamOptions.cs" />
<Compile Include="Configuration\DynamicDayOfWeek.cs" />
<Compile Include="Entities\ExtraType.cs" />
<Compile Include="Entities\SupporterInfo.cs" />
@@ -262,7 +265,6 @@
<Compile Include="MediaInfo\SubtitleFormat.cs" />
<Compile Include="MediaInfo\TransportStreamTimestamp.cs" />
<Compile Include="MediaInfo\VideoCodec.cs" />
- <Compile Include="News\NewsChannel.cs" />
<Compile Include="News\NewsItem.cs" />
<Compile Include="News\NewsQuery.cs" />
<Compile Include="Notifications\NotificationRequest.cs" />
@@ -366,6 +368,7 @@
<Compile Include="Session\TranscodingInfo.cs" />
<Compile Include="Session\UserDataChangeInfo.cs" />
<Compile Include="Devices\ContentUploadHistory.cs" />
+ <Compile Include="Sync\CompleteSyncJobInfo.cs" />
<Compile Include="Sync\DeviceFileInfo.cs" />
<Compile Include="Sync\ItemFIleInfo.cs" />
<Compile Include="Sync\ItemFileType.cs" />
@@ -385,6 +388,7 @@
<Compile Include="Sync\SyncJobRequest.cs" />
<Compile Include="Sync\SyncJobStatus.cs" />
<Compile Include="Sync\SyncOptions.cs" />
+ <Compile Include="Sync\SyncParameter.cs" />
<Compile Include="Sync\SyncQuality.cs" />
<Compile Include="Sync\SyncTarget.cs" />
<Compile Include="System\LogFile.cs" />
diff --git a/MediaBrowser.Model/News/NewsChannel.cs b/MediaBrowser.Model/News/NewsChannel.cs
deleted file mode 100644
index c3955b0a0..000000000
--- a/MediaBrowser.Model/News/NewsChannel.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System.Collections.Generic;
-
-namespace MediaBrowser.Model.News
-{
- public class NewsChannel
- {
- public string Title { get; set; }
- public string Link { get; set; }
- public string Description { get; set; }
- public List<NewsItem> Items { get; set; }
- }
-} \ No newline at end of file
diff --git a/MediaBrowser.Model/Notifications/NotificationType.cs b/MediaBrowser.Model/Notifications/NotificationType.cs
index 34e4d32b5..269e27a4f 100644
--- a/MediaBrowser.Model/Notifications/NotificationType.cs
+++ b/MediaBrowser.Model/Notifications/NotificationType.cs
@@ -18,6 +18,7 @@ namespace MediaBrowser.Model.Notifications
NewLibraryContent,
NewLibraryContentMultiple,
ServerRestartRequired,
- TaskFailed
+ TaskFailed,
+ CameraImageUploaded
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs
index 5018f8e51..7a91d77ff 100644
--- a/MediaBrowser.Model/Querying/ItemFields.cs
+++ b/MediaBrowser.Model/Querying/ItemFields.cs
@@ -1,5 +1,4 @@
-
-namespace MediaBrowser.Model.Querying
+namespace MediaBrowser.Model.Querying
{
/// <summary>
/// Used to control the data that gets attached to DtoBaseItems
@@ -27,6 +26,16 @@ namespace MediaBrowser.Model.Querying
Budget,
/// <summary>
+ /// The can delete
+ /// </summary>
+ CanDelete,
+
+ /// <summary>
+ /// The can download
+ /// </summary>
+ CanDownload,
+
+ /// <summary>
/// The chapters
/// </summary>
Chapters,
diff --git a/MediaBrowser.Model/Session/ClientCapabilities.cs b/MediaBrowser.Model/Session/ClientCapabilities.cs
index 5a806a867..6ca4507c0 100644
--- a/MediaBrowser.Model/Session/ClientCapabilities.cs
+++ b/MediaBrowser.Model/Session/ClientCapabilities.cs
@@ -14,16 +14,22 @@ namespace MediaBrowser.Model.Session
public string MessageCallbackUrl { get; set; }
public bool SupportsContentUploading { get; set; }
- public bool SupportsUniqueIdentifier { get; set; }
+ public bool SupportsPersistentIdentifier { get; set; }
public bool SupportsSync { get; set; }
+ public bool SupportsOfflineAccess { get; set; }
public DeviceProfile DeviceProfile { get; set; }
+ /// <summary>
+ /// Usage should be migrated to SupportsPersistentIdentifier. Keeping this to preserve data.
+ /// </summary>
+ public bool? SupportsUniqueIdentifier { get; set; }
+
public ClientCapabilities()
{
PlayableMediaTypes = new List<string>();
SupportedCommands = new List<string>();
- SupportsUniqueIdentifier = true;
+ SupportsPersistentIdentifier = true;
}
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/Sync/CompleteSyncJobInfo.cs b/MediaBrowser.Model/Sync/CompleteSyncJobInfo.cs
new file mode 100644
index 000000000..52d3fab3c
--- /dev/null
+++ b/MediaBrowser.Model/Sync/CompleteSyncJobInfo.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+
+namespace MediaBrowser.Model.Sync
+{
+ public class CompleteSyncJobInfo
+ {
+ public SyncJob Job { get; set; }
+ public List<SyncJobItem> JobItems { get; set; }
+
+ public CompleteSyncJobInfo()
+ {
+ JobItems = new List<SyncJobItem>();
+ }
+ }
+}
diff --git a/MediaBrowser.Model/Sync/ItemFIleInfo.cs b/MediaBrowser.Model/Sync/ItemFIleInfo.cs
index b110af6b5..e023572fd 100644
--- a/MediaBrowser.Model/Sync/ItemFIleInfo.cs
+++ b/MediaBrowser.Model/Sync/ItemFIleInfo.cs
@@ -23,6 +23,11 @@ namespace MediaBrowser.Model.Sync
/// Gets or sets the type of the image.
/// </summary>
/// <value>The type of the image.</value>
- public ImageType ImageType { get; set; }
+ public ImageType? ImageType { get; set; }
+ /// <summary>
+ /// Gets or sets the index.
+ /// </summary>
+ /// <value>The index.</value>
+ public int Index { get; set; }
}
}
diff --git a/MediaBrowser.Model/Sync/LocalItem.cs b/MediaBrowser.Model/Sync/LocalItem.cs
index ec4544524..c6a10298f 100644
--- a/MediaBrowser.Model/Sync/LocalItem.cs
+++ b/MediaBrowser.Model/Sync/LocalItem.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Model.Dto;
+using System.Collections.Generic;
namespace MediaBrowser.Model.Sync
{
@@ -29,5 +30,15 @@ namespace MediaBrowser.Model.Sync
/// </summary>
/// <value>The item identifier.</value>
public string ItemId { get; set; }
+ /// <summary>
+ /// Gets or sets the user ids with access.
+ /// </summary>
+ /// <value>The user ids with access.</value>
+ public List<string> UserIdsWithAccess { get; set; }
+
+ public LocalItem()
+ {
+ UserIdsWithAccess = new List<string>();
+ }
}
}
diff --git a/MediaBrowser.Model/Sync/SyncDataRequest.cs b/MediaBrowser.Model/Sync/SyncDataRequest.cs
index 3eb447b3f..dc33239a0 100644
--- a/MediaBrowser.Model/Sync/SyncDataRequest.cs
+++ b/MediaBrowser.Model/Sync/SyncDataRequest.cs
@@ -5,12 +5,14 @@ namespace MediaBrowser.Model.Sync
public class SyncDataRequest
{
public List<string> LocalItemIds { get; set; }
+ public List<string> OfflineUserIds { get; set; }
public string TargetId { get; set; }
public SyncDataRequest()
{
LocalItemIds = new List<string>();
+ OfflineUserIds = new List<string>();
}
}
}
diff --git a/MediaBrowser.Model/Sync/SyncDataResponse.cs b/MediaBrowser.Model/Sync/SyncDataResponse.cs
index ac7ff5c84..3799e9455 100644
--- a/MediaBrowser.Model/Sync/SyncDataResponse.cs
+++ b/MediaBrowser.Model/Sync/SyncDataResponse.cs
@@ -5,10 +5,12 @@ namespace MediaBrowser.Model.Sync
public class SyncDataResponse
{
public List<string> ItemIdsToRemove { get; set; }
+ public Dictionary<string, List<string>> ItemUserAccess { get; set; }
public SyncDataResponse()
{
ItemIdsToRemove = new List<string>();
+ ItemUserAccess = new Dictionary<string, List<string>>();
}
}
}
diff --git a/MediaBrowser.Model/Sync/SyncDialogOptions.cs b/MediaBrowser.Model/Sync/SyncDialogOptions.cs
index 0154b16ec..304e10ccc 100644
--- a/MediaBrowser.Model/Sync/SyncDialogOptions.cs
+++ b/MediaBrowser.Model/Sync/SyncDialogOptions.cs
@@ -13,12 +13,12 @@ namespace MediaBrowser.Model.Sync
/// Gets or sets the options.
/// </summary>
/// <value>The options.</value>
- public List<SyncOptions> Options { get; set; }
+ public List<SyncJobOption> Options { get; set; }
public SyncDialogOptions()
{
Targets = new List<SyncTarget>();
- Options = new List<SyncOptions>();
+ Options = new List<SyncJobOption>();
}
}
}
diff --git a/MediaBrowser.Model/Sync/SyncHelper.cs b/MediaBrowser.Model/Sync/SyncHelper.cs
index c2a446fbe..34a5ba995 100644
--- a/MediaBrowser.Model/Sync/SyncHelper.cs
+++ b/MediaBrowser.Model/Sync/SyncHelper.cs
@@ -5,13 +5,13 @@ namespace MediaBrowser.Model.Sync
{
public static class SyncHelper
{
- public static List<SyncOptions> GetSyncOptions(List<BaseItemDto> items)
+ public static List<SyncJobOption> GetSyncOptions(List<BaseItemDto> items)
{
- List<SyncOptions> options = new List<SyncOptions>();
+ List<SyncJobOption> options = new List<SyncJobOption>();
if (items.Count > 1)
{
- options.Add(SyncOptions.Name);
+ options.Add(SyncJobOption.Name);
}
foreach (BaseItemDto item in items)
@@ -20,23 +20,23 @@ namespace MediaBrowser.Model.Sync
{
if (item.IsVideo)
{
- options.Add(SyncOptions.Quality);
+ options.Add(SyncJobOption.Quality);
if (items.Count > 1)
{
- options.Add(SyncOptions.UnwatchedOnly);
+ options.Add(SyncJobOption.UnwatchedOnly);
}
break;
}
if (item.IsFolder && !item.IsMusicGenre && !item.IsArtist && !item.IsType("musicalbum") && !item.IsGameGenre)
{
- options.Add(SyncOptions.Quality);
- options.Add(SyncOptions.UnwatchedOnly);
+ options.Add(SyncJobOption.Quality);
+ options.Add(SyncJobOption.UnwatchedOnly);
break;
}
if (item.IsGenre)
{
- options.Add(SyncOptions.SyncNewContent);
- options.Add(SyncOptions.ItemLimit);
+ options.Add(SyncJobOption.SyncNewContent);
+ options.Add(SyncJobOption.ItemLimit);
break;
}
}
@@ -48,8 +48,8 @@ namespace MediaBrowser.Model.Sync
{
if (item.IsFolder || item.IsGameGenre || item.IsMusicGenre || item.IsGenre || item.IsArtist || item.IsStudio || item.IsPerson)
{
- options.Add(SyncOptions.SyncNewContent);
- options.Add(SyncOptions.ItemLimit);
+ options.Add(SyncJobOption.SyncNewContent);
+ options.Add(SyncJobOption.ItemLimit);
break;
}
}
@@ -58,15 +58,15 @@ namespace MediaBrowser.Model.Sync
return options;
}
- public static List<SyncOptions> GetSyncOptions(SyncCategory category)
+ public static List<SyncJobOption> GetSyncOptions(SyncCategory category)
{
- List<SyncOptions> options = new List<SyncOptions>();
+ List<SyncJobOption> options = new List<SyncJobOption>();
- options.Add(SyncOptions.Name);
- options.Add(SyncOptions.Quality);
- options.Add(SyncOptions.UnwatchedOnly);
- options.Add(SyncOptions.SyncNewContent);
- options.Add(SyncOptions.ItemLimit);
+ options.Add(SyncJobOption.Name);
+ options.Add(SyncJobOption.Quality);
+ options.Add(SyncJobOption.UnwatchedOnly);
+ options.Add(SyncJobOption.SyncNewContent);
+ options.Add(SyncJobOption.ItemLimit);
return options;
}
diff --git a/MediaBrowser.Model/Sync/SyncJob.cs b/MediaBrowser.Model/Sync/SyncJob.cs
index 24680d172..93e73d22e 100644
--- a/MediaBrowser.Model/Sync/SyncJob.cs
+++ b/MediaBrowser.Model/Sync/SyncJob.cs
@@ -16,6 +16,11 @@ namespace MediaBrowser.Model.Sync
/// <value>The device identifier.</value>
public string TargetId { get; set; }
/// <summary>
+ /// Gets or sets the name of the target.
+ /// </summary>
+ /// <value>The name of the target.</value>
+ public string TargetName { get; set; }
+ /// <summary>
/// Gets or sets the quality.
/// </summary>
/// <value>The quality.</value>
@@ -93,6 +98,7 @@ namespace MediaBrowser.Model.Sync
public SyncJob()
{
RequestedItemIds = new List<string>();
+ Quality = SyncQuality.High;
}
}
}
diff --git a/MediaBrowser.Model/Sync/SyncJobCreationResult.cs b/MediaBrowser.Model/Sync/SyncJobCreationResult.cs
index 797318b2a..6723aa2cf 100644
--- a/MediaBrowser.Model/Sync/SyncJobCreationResult.cs
+++ b/MediaBrowser.Model/Sync/SyncJobCreationResult.cs
@@ -1,8 +1,15 @@
-
+using System.Collections.Generic;
+
namespace MediaBrowser.Model.Sync
{
public class SyncJobCreationResult
{
public SyncJob Job { get; set; }
+ public List<SyncJobItem> JobItems { get; set; }
+
+ public SyncJobCreationResult()
+ {
+ JobItems = new List<SyncJobItem>();
+ }
}
}
diff --git a/MediaBrowser.Model/Sync/SyncJobItem.cs b/MediaBrowser.Model/Sync/SyncJobItem.cs
index 3d06943aa..77464be58 100644
--- a/MediaBrowser.Model/Sync/SyncJobItem.cs
+++ b/MediaBrowser.Model/Sync/SyncJobItem.cs
@@ -1,4 +1,6 @@
using System;
+using System.Collections.Generic;
+using MediaBrowser.Model.Dto;
namespace MediaBrowser.Model.Sync
{
@@ -27,12 +29,18 @@ namespace MediaBrowser.Model.Sync
/// </summary>
/// <value>The name of the item.</value>
public string ItemName { get; set; }
-
+
/// <summary>
/// Gets or sets the media source identifier.
/// </summary>
/// <value>The media source identifier.</value>
public string MediaSourceId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the media source.
+ /// </summary>
+ /// <value>The media source.</value>
+ public MediaSourceInfo MediaSource { get; set; }
/// <summary>
/// Gets or sets the target identifier.
@@ -74,9 +82,29 @@ namespace MediaBrowser.Model.Sync
/// <value>The primary image tag.</value>
public string PrimaryImageTag { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether [requires conversion].
+ /// Gets or sets the temporary path.
+ /// </summary>
+ /// <value>The temporary path.</value>
+ public string TemporaryPath { get; set; }
+ /// <summary>
+ /// Gets or sets the additional files.
+ /// </summary>
+ /// <value>The additional files.</value>
+ public List<ItemFileInfo> AdditionalFiles { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether this instance is marked for removal.
/// </summary>
- /// <value><c>true</c> if [requires conversion]; otherwise, <c>false</c>.</value>
- public bool RequiresConversion { get; set; }
+ /// <value><c>true</c> if this instance is marked for removal; otherwise, <c>false</c>.</value>
+ public bool IsMarkedForRemoval { get; set; }
+ /// <summary>
+ /// Gets or sets the index of the job item.
+ /// </summary>
+ /// <value>The index of the job item.</value>
+ public int JobItemIndex { get; set; }
+
+ public SyncJobItem()
+ {
+ AdditionalFiles = new List<ItemFileInfo>();
+ }
}
}
diff --git a/MediaBrowser.Model/Sync/SyncJobItemStatus.cs b/MediaBrowser.Model/Sync/SyncJobItemStatus.cs
index 913f9e259..c4e23c63c 100644
--- a/MediaBrowser.Model/Sync/SyncJobItemStatus.cs
+++ b/MediaBrowser.Model/Sync/SyncJobItemStatus.cs
@@ -5,10 +5,11 @@ namespace MediaBrowser.Model.Sync
{
Queued = 0,
Converting = 1,
- Transferring = 2,
- Synced = 3,
- RemovedFromDevice = 4,
- Failed = 5,
- Cancelled = 6
+ ReadyToTransfer = 2,
+ Transferring = 3,
+ Synced = 4,
+ RemovedFromDevice = 5,
+ Failed = 6,
+ Cancelled = 7
}
}
diff --git a/MediaBrowser.Model/Sync/SyncJobQuery.cs b/MediaBrowser.Model/Sync/SyncJobQuery.cs
index 35f0e076d..233dc7878 100644
--- a/MediaBrowser.Model/Sync/SyncJobQuery.cs
+++ b/MediaBrowser.Model/Sync/SyncJobQuery.cs
@@ -1,4 +1,5 @@
-
+using System.Collections.Generic;
+
namespace MediaBrowser.Model.Sync
{
public class SyncJobQuery
@@ -14,11 +15,6 @@ namespace MediaBrowser.Model.Sync
/// <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; }
- /// <summary>
/// Gets or sets the target identifier.
/// </summary>
/// <value>The target identifier.</value>
@@ -28,5 +24,20 @@ namespace MediaBrowser.Model.Sync
/// </summary>
/// <value>The user identifier.</value>
public string UserId { get; set; }
+ /// <summary>
+ /// Gets or sets the status.
+ /// </summary>
+ /// <value>The status.</value>
+ public List<SyncJobStatus> Statuses { get; set; }
+ /// <summary>
+ /// Gets or sets a value indicating whether [synchronize new content].
+ /// </summary>
+ /// <value><c>null</c> if [synchronize new content] contains no value, <c>true</c> if [synchronize new content]; otherwise, <c>false</c>.</value>
+ public bool? SyncNewContent { get; set; }
+
+ public SyncJobQuery()
+ {
+ Statuses = new List<SyncJobStatus>();
+ }
}
}
diff --git a/MediaBrowser.Model/Sync/SyncJobStatus.cs b/MediaBrowser.Model/Sync/SyncJobStatus.cs
index 961ccf544..ac211a32a 100644
--- a/MediaBrowser.Model/Sync/SyncJobStatus.cs
+++ b/MediaBrowser.Model/Sync/SyncJobStatus.cs
@@ -4,8 +4,12 @@ namespace MediaBrowser.Model.Sync
public enum SyncJobStatus
{
Queued = 0,
- InProgress = 1,
- Completed = 2,
- CompletedWithError = 3
+ Converting = 1,
+ ReadyToTransfer = 2,
+ Transferring = 3,
+ Completed = 4,
+ CompletedWithError = 5,
+ Failed = 6,
+ Cancelled = 7
}
}
diff --git a/MediaBrowser.Model/Sync/SyncOptions.cs b/MediaBrowser.Model/Sync/SyncOptions.cs
index d4a7461f3..294f7bcef 100644
--- a/MediaBrowser.Model/Sync/SyncOptions.cs
+++ b/MediaBrowser.Model/Sync/SyncOptions.cs
@@ -1,12 +1,8 @@

namespace MediaBrowser.Model.Sync
{
- public enum SyncOptions
+ public class SyncOptions
{
- Name = 0,
- Quality = 1,
- UnwatchedOnly = 2,
- SyncNewContent = 3,
- ItemLimit = 4
+ public string TemporaryPath { get; set; }
}
}
diff --git a/MediaBrowser.Model/Sync/SyncParameter.cs b/MediaBrowser.Model/Sync/SyncParameter.cs
new file mode 100644
index 000000000..def4ab3e3
--- /dev/null
+++ b/MediaBrowser.Model/Sync/SyncParameter.cs
@@ -0,0 +1,12 @@
+
+namespace MediaBrowser.Model.Sync
+{
+ public enum SyncJobOption
+ {
+ Name = 0,
+ Quality = 1,
+ UnwatchedOnly = 2,
+ SyncNewContent = 3,
+ ItemLimit = 4
+ }
+}
diff --git a/MediaBrowser.Model/Sync/SyncQuality.cs b/MediaBrowser.Model/Sync/SyncQuality.cs
index d34ad22c2..27ee756a3 100644
--- a/MediaBrowser.Model/Sync/SyncQuality.cs
+++ b/MediaBrowser.Model/Sync/SyncQuality.cs
@@ -16,6 +16,10 @@ namespace MediaBrowser.Model.Sync
/// <summary>
/// The best
/// </summary>
- High = 2
+ High = 2,
+ /// <summary>
+ /// The original
+ /// </summary>
+ Original = 3
}
}
diff --git a/MediaBrowser.Model/Sync/SyncedItem.cs b/MediaBrowser.Model/Sync/SyncedItem.cs
index 784a12bc9..2063506b1 100644
--- a/MediaBrowser.Model/Sync/SyncedItem.cs
+++ b/MediaBrowser.Model/Sync/SyncedItem.cs
@@ -1,4 +1,5 @@
using MediaBrowser.Model.Dto;
+using System.Collections.Generic;
namespace MediaBrowser.Model.Sync
{
@@ -34,5 +35,15 @@ namespace MediaBrowser.Model.Sync
/// </summary>
/// <value>The user identifier.</value>
public string UserId { get; set; }
+ /// <summary>
+ /// Gets or sets the additional files.
+ /// </summary>
+ /// <value>The additional files.</value>
+ public List<ItemFileInfo> AdditionalFiles { get; set; }
+
+ public SyncedItem()
+ {
+ AdditionalFiles = new List<ItemFileInfo>();
+ }
}
}
diff --git a/MediaBrowser.Model/System/SystemInfo.cs b/MediaBrowser.Model/System/SystemInfo.cs
index 415c619ea..8c1fc759f 100644
--- a/MediaBrowser.Model/System/SystemInfo.cs
+++ b/MediaBrowser.Model/System/SystemInfo.cs
@@ -39,6 +39,12 @@ namespace MediaBrowser.Model.System
public bool HasPendingRestart { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether [supports synchronize].
+ /// </summary>
+ /// <value><c>true</c> if [supports synchronize]; otherwise, <c>false</c>.</value>
+ public bool SupportsSync { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether this instance is network deployed.
/// </summary>
/// <value><c>true</c> if this instance is network deployed; otherwise, <c>false</c>.</value>
@@ -63,12 +69,6 @@ namespace MediaBrowser.Model.System
public List<InstallationInfo> CompletedInstallations { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether [supports native web socket].
- /// </summary>
- /// <value><c>true</c> if [supports native web socket]; otherwise, <c>false</c>.</value>
- public bool SupportsNativeWebSocket { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether this instance can self restart.
/// </summary>
/// <value><c>true</c> if this instance can self restart; otherwise, <c>false</c>.</value>
@@ -129,6 +129,18 @@ namespace MediaBrowser.Model.System
public int HttpServerPortNumber { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether [enable HTTPS].
+ /// </summary>
+ /// <value><c>true</c> if [enable HTTPS]; otherwise, <c>false</c>.</value>
+ public bool SupportsHttps { get; set; }
+
+ /// <summary>
+ /// Gets or sets the HTTPS server port number.
+ /// </summary>
+ /// <value>The HTTPS server port number.</value>
+ public int HttpsPortNumber { get; set; }
+
+ /// <summary>
/// Gets or sets a value indicating whether this instance has update available.
/// </summary>
/// <value><c>true</c> if this instance has update available; otherwise, <c>false</c>.</value>
diff --git a/MediaBrowser.Model/Tasks/TaskResult.cs b/MediaBrowser.Model/Tasks/TaskResult.cs
index 956d68ae4..39eacdf66 100644
--- a/MediaBrowser.Model/Tasks/TaskResult.cs
+++ b/MediaBrowser.Model/Tasks/TaskResult.cs
@@ -32,6 +32,12 @@ namespace MediaBrowser.Model.Tasks
public string Name { get; set; }
/// <summary>
+ /// Gets or sets the key.
+ /// </summary>
+ /// <value>The key.</value>
+ public string Key { get; set; }
+
+ /// <summary>
/// Gets or sets the id.
/// </summary>
/// <value>The id.</value>
diff --git a/MediaBrowser.Model/Users/UserPolicy.cs b/MediaBrowser.Model/Users/UserPolicy.cs
index 0a6a37696..410cdc51f 100644
--- a/MediaBrowser.Model/Users/UserPolicy.cs
+++ b/MediaBrowser.Model/Users/UserPolicy.cs
@@ -42,7 +42,8 @@ namespace MediaBrowser.Model.Users
public bool EnableMediaPlayback { get; set; }
public bool EnableContentDeletion { get; set; }
-
+ public bool EnableContentDownloading { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether [enable synchronize].
/// </summary>
@@ -52,6 +53,12 @@ namespace MediaBrowser.Model.Users
public string[] EnabledDevices { get; set; }
public bool EnableAllDevices { get; set; }
+ public string[] EnabledChannels { get; set; }
+ public bool EnableAllChannels { get; set; }
+
+ public string[] EnabledFolders { get; set; }
+ public bool EnableAllFolders { get; set; }
+
public UserPolicy()
{
EnableLiveTvManagement = true;
@@ -59,17 +66,23 @@ namespace MediaBrowser.Model.Users
EnableLiveTvAccess = true;
EnableSharedDeviceControl = true;
- BlockedMediaFolders = new string[] { };
BlockedTags = new string[] { };
- BlockedChannels = new string[] { };
BlockUnratedItems = new UnratedItem[] { };
EnableUserPreferenceAccess = true;
AccessSchedules = new AccessSchedule[] { };
+ EnableAllChannels = true;
+ EnabledChannels = new string[] { };
+
+ EnableAllFolders = true;
+ EnabledFolders = new string[] { };
+
EnabledDevices = new string[] { };
EnableAllDevices = true;
+
+ EnableContentDownloading = true;
}
}
-}
+} \ No newline at end of file