aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/ApiClient/IApiClient.cs40
-rw-r--r--MediaBrowser.Model/Dto/StreamOptions.cs67
-rw-r--r--MediaBrowser.Model/Dto/VideoStreamOptions.cs58
-rw-r--r--MediaBrowser.Model/MediaBrowser.Model.csproj9
-rw-r--r--MediaBrowser.Model/Net/HttpResponse.cs64
-rw-r--r--MediaBrowser.Model/Net/MimeTypes.cs273
-rw-r--r--MediaBrowser.Model/Sync/ItemFIleInfo.cs28
-rw-r--r--MediaBrowser.Model/Sync/ItemFileType.cs19
-rw-r--r--MediaBrowser.Model/Sync/SyncItem.cs9
-rw-r--r--MediaBrowser.Model/Sync/SyncJobItem.cs6
-rw-r--r--MediaBrowser.Model/Sync/SyncedItem.cs38
-rw-r--r--MediaBrowser.Model/Users/UserAction.cs14
-rw-r--r--MediaBrowser.Model/Users/UserActionType.cs8
13 files changed, 545 insertions, 88 deletions
diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs
index 0181325fe..883e54308 100644
--- a/MediaBrowser.Model/ApiClient/IApiClient.cs
+++ b/MediaBrowser.Model/ApiClient/IApiClient.cs
@@ -7,6 +7,7 @@ using MediaBrowser.Model.Events;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.LiveTv;
using MediaBrowser.Model.MediaInfo;
+using MediaBrowser.Model.Net;
using MediaBrowser.Model.Notifications;
using MediaBrowser.Model.Playlists;
using MediaBrowser.Model.Plugins;
@@ -186,6 +187,22 @@ namespace MediaBrowser.Model.ApiClient
Task<Stream> GetImageStreamAsync(string url, CancellationToken cancellationToken = default(CancellationToken));
/// <summary>
+ /// Gets the stream.
+ /// </summary>
+ /// <param name="url">The URL.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>Task&lt;Stream&gt;.</returns>
+ Task<Stream> GetStream(string url, CancellationToken cancellationToken = default(CancellationToken));
+
+ /// <summary>
+ /// Gets the response.
+ /// </summary>
+ /// <param name="url">The URL.</param>
+ /// <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>
/// <param name="userId">The user identifier.</param>
@@ -1300,15 +1317,6 @@ namespace MediaBrowser.Model.ApiClient
Task<QueryResult<BaseItemDto>> GetPlaylistItems(PlaylistItemQuery query);
/// <summary>
- /// Gets the url needed to stream an audio file
- /// </summary>
- /// <param name="options">The options.</param>
- /// <returns>System.String.</returns>
- /// <exception cref="ArgumentNullException">options</exception>
- [Obsolete]
- string GetAudioStreamUrl(StreamOptions options);
-
- /// <summary>
/// Gets the url needed to stream a video file
/// </summary>
/// <param name="options">The options.</param>
@@ -1411,5 +1419,19 @@ namespace MediaBrowser.Model.ApiClient
/// <param name="webSocketFactory">The web socket factory.</param>
/// <param name="keepAliveTimerMs">The keep alive timer ms.</param>
void OpenWebSocket(Func<IClientWebSocket> webSocketFactory, int keepAliveTimerMs = 60000);
+
+ /// <summary>
+ /// Reports the offline actions.
+ /// </summary>
+ /// <param name="actions">The actions.</param>
+ /// <returns>Task.</returns>
+ Task ReportOfflineActions(List<UserAction> actions);
+
+ /// <summary>
+ /// Gets the ready synchronize items.
+ /// </summary>
+ /// <param name="targetId">The target identifier.</param>
+ /// <returns>List&lt;SyncedItem&gt;.</returns>
+ Task<List<SyncedItem>> GetReadySyncItems(string targetId);
}
} \ No newline at end of file
diff --git a/MediaBrowser.Model/Dto/StreamOptions.cs b/MediaBrowser.Model/Dto/StreamOptions.cs
deleted file mode 100644
index 5b7cdc6fb..000000000
--- a/MediaBrowser.Model/Dto/StreamOptions.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-
-namespace MediaBrowser.Model.Dto
-{
- /// <summary>
- /// Class StreamOptions
- /// </summary>
- [Obsolete]
- public class StreamOptions
- {
- /// <summary>
- /// Gets or sets the audio bit rate.
- /// </summary>
- /// <value>The audio bit rate.</value>
- public int? AudioBitRate { get; set; }
-
- /// <summary>
- /// Gets or sets the audio codec.
- /// Omit to copy the original stream
- /// </summary>
- /// <value>The audio encoding format.</value>
- public string AudioCodec { get; set; }
-
- /// <summary>
- /// Gets or sets the item id.
- /// </summary>
- /// <value>The item id.</value>
- public string ItemId { get; set; }
-
- /// <summary>
- /// Gets or sets the max audio channels.
- /// </summary>
- /// <value>The max audio channels.</value>
- public int? MaxAudioChannels { get; set; }
-
- /// <summary>
- /// Gets or sets the max audio sample rate.
- /// </summary>
- /// <value>The max audio sample rate.</value>
- public int? MaxAudioSampleRate { get; set; }
-
- /// <summary>
- /// Gets or sets the start time ticks.
- /// </summary>
- /// <value>The start time ticks.</value>
- public long? StartTimeTicks { get; set; }
-
- /// <summary>
- /// Gets or sets a value indicating whether the original media should be served statically
- /// Only used with progressive streaming
- /// </summary>
- /// <value><c>true</c> if static; otherwise, <c>false</c>.</value>
- public bool? Static { get; set; }
-
- /// <summary>
- /// Gets or sets the output file extension.
- /// </summary>
- /// <value>The output file extension.</value>
- public string OutputFileExtension { get; set; }
-
- /// <summary>
- /// Gets or sets the device id.
- /// </summary>
- /// <value>The device id.</value>
- public string DeviceId { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Dto/VideoStreamOptions.cs b/MediaBrowser.Model/Dto/VideoStreamOptions.cs
index 606e928f2..e9a83bd12 100644
--- a/MediaBrowser.Model/Dto/VideoStreamOptions.cs
+++ b/MediaBrowser.Model/Dto/VideoStreamOptions.cs
@@ -6,9 +6,65 @@ namespace MediaBrowser.Model.Dto
/// Class VideoStreamOptions
/// </summary>
[Obsolete]
- public class VideoStreamOptions : StreamOptions
+ public class VideoStreamOptions
{
/// <summary>
+ /// Gets or sets the audio bit rate.
+ /// </summary>
+ /// <value>The audio bit rate.</value>
+ public int? AudioBitRate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the audio codec.
+ /// Omit to copy the original stream
+ /// </summary>
+ /// <value>The audio encoding format.</value>
+ public string AudioCodec { get; set; }
+
+ /// <summary>
+ /// Gets or sets the item id.
+ /// </summary>
+ /// <value>The item id.</value>
+ public string ItemId { get; set; }
+
+ /// <summary>
+ /// Gets or sets the max audio channels.
+ /// </summary>
+ /// <value>The max audio channels.</value>
+ public int? MaxAudioChannels { get; set; }
+
+ /// <summary>
+ /// Gets or sets the max audio sample rate.
+ /// </summary>
+ /// <value>The max audio sample rate.</value>
+ public int? MaxAudioSampleRate { get; set; }
+
+ /// <summary>
+ /// Gets or sets the start time ticks.
+ /// </summary>
+ /// <value>The start time ticks.</value>
+ public long? StartTimeTicks { get; set; }
+
+ /// <summary>
+ /// Gets or sets a value indicating whether the original media should be served statically
+ /// Only used with progressive streaming
+ /// </summary>
+ /// <value><c>true</c> if static; otherwise, <c>false</c>.</value>
+ public bool? Static { get; set; }
+
+ /// <summary>
+ /// Gets or sets the output file extension.
+ /// </summary>
+ /// <value>The output file extension.</value>
+ public string OutputFileExtension { get; set; }
+
+ /// <summary>
+ /// Gets or sets the device id.
+ /// </summary>
+ /// <value>The device id.</value>
+ public string DeviceId { get; set; }
+
+ /// <summary>
/// Gets or sets the video codec.
/// Omit to copy
/// </summary>
diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj
index e1f0e78f4..47a31853b 100644
--- a/MediaBrowser.Model/MediaBrowser.Model.csproj
+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj
@@ -133,7 +133,6 @@
<Compile Include="Dto\NameValuePair.cs" />
<Compile Include="MediaInfo\LiveMediaInfoResult.cs" />
<Compile Include="Dto\MediaSourceType.cs" />
- <Compile Include="Dto\StreamOptions.cs" />
<Compile Include="Dto\VideoStreamOptions.cs" />
<Compile Include="Configuration\DynamicDayOfWeek.cs" />
<Compile Include="Entities\ExtraType.cs" />
@@ -155,6 +154,8 @@
<Compile Include="Configuration\MetadataPluginType.cs" />
<Compile Include="Dlna\SubtitleProfile.cs" />
<Compile Include="MediaInfo\MediaProtocol.cs" />
+ <Compile Include="Net\HttpResponse.cs" />
+ <Compile Include="Net\MimeTypes.cs" />
<Compile Include="Notifications\NotificationOption.cs" />
<Compile Include="Notifications\NotificationOptions.cs" />
<Compile Include="Notifications\NotificationType.cs" />
@@ -366,10 +367,12 @@
<Compile Include="Session\TranscodingInfo.cs" />
<Compile Include="Session\UserDataChangeInfo.cs" />
<Compile Include="Devices\ContentUploadHistory.cs" />
+ <Compile Include="Sync\ItemFIleInfo.cs" />
+ <Compile Include="Sync\ItemFileType.cs" />
<Compile Include="Sync\SyncCategory.cs" />
<Compile Include="Sync\SyncDialogOptions.cs" />
+ <Compile Include="Sync\SyncedItem.cs" />
<Compile Include="Sync\SyncHelper.cs" />
- <Compile Include="Sync\SyncItem.cs" />
<Compile Include="Sync\SyncJob.cs" />
<Compile Include="Sync\SyncJobCreationResult.cs" />
<Compile Include="Sync\SyncJobItem.cs" />
@@ -423,6 +426,8 @@
<Compile Include="Users\ForgotPasswordAction.cs" />
<Compile Include="Users\ForgotPasswordResult.cs" />
<Compile Include="Users\PinRedeemResult.cs" />
+ <Compile Include="Users\UserAction.cs" />
+ <Compile Include="Users\UserActionType.cs" />
<Compile Include="Users\UserPolicy.cs" />
<None Include="Fody.targets" />
<None Include="FodyWeavers.xml" />
diff --git a/MediaBrowser.Model/Net/HttpResponse.cs b/MediaBrowser.Model/Net/HttpResponse.cs
new file mode 100644
index 000000000..f4bd8e681
--- /dev/null
+++ b/MediaBrowser.Model/Net/HttpResponse.cs
@@ -0,0 +1,64 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+
+namespace MediaBrowser.Model.Net
+{
+ public class HttpResponse : IDisposable
+ {
+ /// <summary>
+ /// Gets or sets the type of the content.
+ /// </summary>
+ /// <value>The type of the content.</value>
+ public string ContentType { get; set; }
+
+ /// <summary>
+ /// Gets or sets the response URL.
+ /// </summary>
+ /// <value>The response URL.</value>
+ public string ResponseUrl { get; set; }
+
+ /// <summary>
+ /// Gets or sets the content.
+ /// </summary>
+ /// <value>The content.</value>
+ public Stream Content { get; set; }
+
+ /// <summary>
+ /// Gets or sets the status code.
+ /// </summary>
+ /// <value>The status code.</value>
+ public HttpStatusCode StatusCode { get; set; }
+
+ /// <summary>
+ /// Gets or sets the length of the content.
+ /// </summary>
+ /// <value>The length of the content.</value>
+ public long? ContentLength { get; set; }
+
+ /// <summary>
+ /// Gets or sets the headers.
+ /// </summary>
+ /// <value>The headers.</value>
+ public Dictionary<string, string> Headers { get; set; }
+
+ private readonly IDisposable _disposable;
+
+ public HttpResponse(IDisposable disposable)
+ {
+ _disposable = disposable;
+ }
+ public HttpResponse()
+ {
+ }
+
+ public void Dispose()
+ {
+ if (_disposable != null)
+ {
+ _disposable.Dispose();
+ }
+ }
+ }
+}
diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs
new file mode 100644
index 000000000..6eaac8f03
--- /dev/null
+++ b/MediaBrowser.Model/Net/MimeTypes.cs
@@ -0,0 +1,273 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+
+namespace MediaBrowser.Model.Net
+{
+ /// <summary>
+ /// Class MimeTypes
+ /// </summary>
+ public static class MimeTypes
+ {
+ /// <summary>
+ /// Any extension in this list is considered a video file - can be added to at runtime for extensibility
+ /// </summary>
+ private static readonly List<string> VideoFileExtensions = new List<string>
+ {
+ ".mkv",
+ ".m2t",
+ ".m2ts",
+ ".img",
+ ".iso",
+ ".mk3d",
+ ".ts",
+ ".rmvb",
+ ".mov",
+ ".avi",
+ ".mpg",
+ ".mpeg",
+ ".wmv",
+ ".mp4",
+ ".divx",
+ ".dvr-ms",
+ ".wtv",
+ ".ogm",
+ ".ogv",
+ ".asf",
+ ".m4v",
+ ".flv",
+ ".f4v",
+ ".3gp",
+ ".webm",
+ ".mts",
+ ".m2v",
+ ".rec"
+ };
+
+ private static readonly Dictionary<string, string> VideoFileExtensionsDictionary = VideoFileExtensions.ToDictionary(i => i, StringComparer.OrdinalIgnoreCase);
+
+ // http://en.wikipedia.org/wiki/Internet_media_type
+ // Add more as needed
+
+ private static readonly Dictionary<string, string> MimeTypeLookup =
+ new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
+ {
+ {".jpg", "image/jpeg"},
+ {".jpeg", "image/jpeg"},
+ {".tbn", "image/jpeg"},
+ {".png", "image/png"},
+ {".gif", "image/gif"},
+ {".webp", "image/webp"},
+ {".ico", "image/vnd.microsoft.icon"},
+ {".mpg", "video/mpeg"},
+ {".mpeg", "video/mpeg"},
+ {".ogv", "video/ogg"},
+ {".mov", "video/quicktime"},
+ {".webm", "video/webm"},
+ {".mkv", "video/x-matroska"},
+ {".wmv", "video/x-ms-wmv"},
+ {".flv", "video/x-flv"},
+ {".avi", "video/x-msvideo"},
+ {".asf", "video/x-ms-asf"},
+ {".m4v", "video/x-m4v"}
+ };
+
+ private static readonly Dictionary<string, string> ExtensionLookup =
+ MimeTypeLookup
+ .GroupBy(i => i.Value)
+ .ToDictionary(x => x.Key, x => x.First().Key, StringComparer.OrdinalIgnoreCase);
+
+ /// <summary>
+ /// Gets the type of the MIME.
+ /// </summary>
+ /// <param name="path">The path.</param>
+ /// <returns>System.String.</returns>
+ /// <exception cref="ArgumentNullException">path</exception>
+ /// <exception cref="InvalidOperationException">Argument not supported: + path</exception>
+ public static string GetMimeType(string path)
+ {
+ if (string.IsNullOrEmpty(path))
+ {
+ throw new ArgumentNullException("path");
+ }
+
+ var ext = Path.GetExtension(path) ?? string.Empty;
+
+ string result;
+ if (MimeTypeLookup.TryGetValue(ext, out result))
+ {
+ return result;
+ }
+
+ // Type video
+ if (ext.Equals(".3gp", StringComparison.OrdinalIgnoreCase))
+ {
+ return "video/3gpp";
+ }
+ if (ext.Equals(".3g2", StringComparison.OrdinalIgnoreCase))
+ {
+ return "video/3gpp2";
+ }
+ if (ext.Equals(".ts", StringComparison.OrdinalIgnoreCase))
+ {
+ return "video/mp2t";
+ }
+ if (ext.Equals(".mpd", StringComparison.OrdinalIgnoreCase))
+ {
+ return "video/vnd.mpeg.dash.mpd";
+ }
+
+ // Catch-all for all video types that don't require specific mime types
+ if (VideoFileExtensionsDictionary.ContainsKey(ext))
+ {
+ return "video/" + ext.TrimStart('.').ToLower();
+ }
+
+ // Type text
+ if (ext.Equals(".css", StringComparison.OrdinalIgnoreCase))
+ {
+ return "text/css";
+ }
+ if (ext.Equals(".csv", StringComparison.OrdinalIgnoreCase))
+ {
+ return "text/csv";
+ }
+ if (ext.Equals(".html", StringComparison.OrdinalIgnoreCase) || ext.Equals(".htm", StringComparison.OrdinalIgnoreCase))
+ {
+ return "text/html; charset=UTF-8";
+ }
+ if (ext.Equals(".txt", StringComparison.OrdinalIgnoreCase))
+ {
+ return "text/plain";
+ }
+ if (ext.Equals(".xml", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/xml";
+ }
+
+ // Type document
+ if (ext.Equals(".pdf", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/pdf";
+ }
+ if (ext.Equals(".mobi", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/x-mobipocket-ebook";
+ }
+ if (ext.Equals(".epub", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/epub+zip";
+ }
+ if (ext.Equals(".cbz", StringComparison.OrdinalIgnoreCase) || ext.Equals(".cbr", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/x-cdisplay";
+ }
+
+ // Type audio
+ if (ext.Equals(".mp3", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/mpeg";
+ }
+ if (ext.Equals(".m4a", StringComparison.OrdinalIgnoreCase) || ext.Equals(".aac", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/mp4";
+ }
+ if (ext.Equals(".webma", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/webm";
+ }
+ if (ext.Equals(".wav", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/wav";
+ }
+ if (ext.Equals(".wma", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/x-ms-wma";
+ }
+ if (ext.Equals(".flac", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/flac";
+ }
+ if (ext.Equals(".aac", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/x-aac";
+ }
+ if (ext.Equals(".ogg", StringComparison.OrdinalIgnoreCase) || ext.Equals(".oga", StringComparison.OrdinalIgnoreCase))
+ {
+ return "audio/ogg";
+ }
+
+ // Playlists
+ if (ext.Equals(".m3u8", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/x-mpegURL";
+ }
+
+ // Misc
+ if (ext.Equals(".dll", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/octet-stream";
+ }
+
+ // Web
+ if (ext.Equals(".js", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/x-javascript";
+ }
+ if (ext.Equals(".json", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/json";
+ }
+ if (ext.Equals(".map", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/x-javascript";
+ }
+
+ if (ext.Equals(".woff", StringComparison.OrdinalIgnoreCase))
+ {
+ return "font/woff";
+ }
+
+ if (ext.Equals(".ttf", StringComparison.OrdinalIgnoreCase))
+ {
+ return "font/ttf";
+ }
+ if (ext.Equals(".eot", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/vnd.ms-fontobject";
+ }
+ if (ext.Equals(".svg", StringComparison.OrdinalIgnoreCase) || ext.Equals(".svgz", StringComparison.OrdinalIgnoreCase))
+ {
+ return "image/svg+xml";
+ }
+
+ if (ext.Equals(".srt", StringComparison.OrdinalIgnoreCase))
+ {
+ return "text/plain";
+ }
+
+ if (ext.Equals(".vtt", StringComparison.OrdinalIgnoreCase))
+ {
+ return "text/vtt";
+ }
+
+ if (ext.Equals(".ttml", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/ttml+xml";
+ }
+
+ if (ext.Equals(".bif", StringComparison.OrdinalIgnoreCase))
+ {
+ return "application/octet-stream";
+ }
+
+ throw new ArgumentException("Argument not supported: " + path);
+ }
+
+ public static string ToExtension(string mimeType)
+ {
+ return ExtensionLookup[mimeType];
+ }
+ }
+}
diff --git a/MediaBrowser.Model/Sync/ItemFIleInfo.cs b/MediaBrowser.Model/Sync/ItemFIleInfo.cs
new file mode 100644
index 000000000..6ae9ceb18
--- /dev/null
+++ b/MediaBrowser.Model/Sync/ItemFIleInfo.cs
@@ -0,0 +1,28 @@
+using MediaBrowser.Model.Entities;
+
+namespace MediaBrowser.Model.Sync
+{
+ public class ItemFileInfo
+ {
+ /// <summary>
+ /// Gets or sets the type.
+ /// </summary>
+ /// <value>The type.</value>
+ public ItemFileType Type { get; set; }
+ /// <summary>
+ /// Gets or sets the item identifier.
+ /// </summary>
+ /// <value>The item identifier.</value>
+ public string ItemId { get; set; }
+ /// <summary>
+ /// Gets or sets the name.
+ /// </summary>
+ /// <value>The name.</value>
+ public string Name { get; set; }
+ /// <summary>
+ /// Gets or sets the type of the image.
+ /// </summary>
+ /// <value>The type of the image.</value>
+ public ImageType ImageType { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Sync/ItemFileType.cs b/MediaBrowser.Model/Sync/ItemFileType.cs
new file mode 100644
index 000000000..305f4c502
--- /dev/null
+++ b/MediaBrowser.Model/Sync/ItemFileType.cs
@@ -0,0 +1,19 @@
+
+namespace MediaBrowser.Model.Sync
+{
+ public enum ItemFileType
+ {
+ /// <summary>
+ /// The media
+ /// </summary>
+ Media = 0,
+ /// <summary>
+ /// The image
+ /// </summary>
+ Image = 1,
+ /// <summary>
+ /// The subtitles
+ /// </summary>
+ Subtitles = 2
+ }
+}
diff --git a/MediaBrowser.Model/Sync/SyncItem.cs b/MediaBrowser.Model/Sync/SyncItem.cs
deleted file mode 100644
index d50ae98c9..000000000
--- a/MediaBrowser.Model/Sync/SyncItem.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using MediaBrowser.Model.Dto;
-
-namespace MediaBrowser.Model.Sync
-{
- public class SyncItem
- {
- public BaseItemDto Item { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Sync/SyncJobItem.cs b/MediaBrowser.Model/Sync/SyncJobItem.cs
index 063f7feb2..d9fb1ed09 100644
--- a/MediaBrowser.Model/Sync/SyncJobItem.cs
+++ b/MediaBrowser.Model/Sync/SyncJobItem.cs
@@ -23,6 +23,12 @@ namespace MediaBrowser.Model.Sync
public string ItemId { 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 target identifier.
/// </summary>
/// <value>The target identifier.</value>
diff --git a/MediaBrowser.Model/Sync/SyncedItem.cs b/MediaBrowser.Model/Sync/SyncedItem.cs
new file mode 100644
index 000000000..784a12bc9
--- /dev/null
+++ b/MediaBrowser.Model/Sync/SyncedItem.cs
@@ -0,0 +1,38 @@
+using MediaBrowser.Model.Dto;
+
+namespace MediaBrowser.Model.Sync
+{
+ public class SyncedItem
+ {
+ /// <summary>
+ /// Gets or sets the server identifier.
+ /// </summary>
+ /// <value>The server identifier.</value>
+ public string ServerId { get; set; }
+ /// <summary>
+ /// Gets or sets the synchronize job identifier.
+ /// </summary>
+ /// <value>The synchronize job identifier.</value>
+ public string SyncJobId { get; set; }
+ /// <summary>
+ /// Gets or sets the synchronize job item identifier.
+ /// </summary>
+ /// <value>The synchronize job item identifier.</value>
+ public string SyncJobItemId { get; set; }
+ /// <summary>
+ /// Gets or sets the name of the original file.
+ /// </summary>
+ /// <value>The name of the original file.</value>
+ public string OriginalFileName { get; set; }
+ /// <summary>
+ /// Gets or sets the item.
+ /// </summary>
+ /// <value>The item.</value>
+ public BaseItemDto Item { get; set; }
+ /// <summary>
+ /// Gets or sets the user identifier.
+ /// </summary>
+ /// <value>The user identifier.</value>
+ public string UserId { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Users/UserAction.cs b/MediaBrowser.Model/Users/UserAction.cs
new file mode 100644
index 000000000..93c22d726
--- /dev/null
+++ b/MediaBrowser.Model/Users/UserAction.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace MediaBrowser.Model.Users
+{
+ public class UserAction
+ {
+ public string ServerId { get; set; }
+ public string UserId { get; set; }
+ public string ItemId { get; set; }
+ public UserActionType Type { get; set; }
+ public DateTime Date { get; set; }
+ public long? PositionTicks { get; set; }
+ }
+}
diff --git a/MediaBrowser.Model/Users/UserActionType.cs b/MediaBrowser.Model/Users/UserActionType.cs
new file mode 100644
index 000000000..493de6272
--- /dev/null
+++ b/MediaBrowser.Model/Users/UserActionType.cs
@@ -0,0 +1,8 @@
+
+namespace MediaBrowser.Model.Users
+{
+ public enum UserActionType
+ {
+ PlayedItem = 0
+ }
+}