mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-20 09:06:38 +00:00
sync updates
This commit is contained in:
@@ -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;
|
||||
@@ -185,6 +186,22 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <exception cref="ArgumentNullException">url</exception>
|
||||
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<Stream>.</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<HttpResponse>.</returns>
|
||||
Task<HttpResponse> GetResponse(string url, CancellationToken cancellationToken = default(CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// Updates the user configuration.
|
||||
/// </summary>
|
||||
@@ -1299,15 +1316,6 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <returns>Task<QueryResult<BaseItemDto>>.</returns>
|
||||
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>
|
||||
@@ -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<SyncedItem>.</returns>
|
||||
Task<List<SyncedItem>> GetReadySyncItems(string targetId);
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,64 @@ 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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
64
MediaBrowser.Model/Net/HttpResponse.cs
Normal file
64
MediaBrowser.Model/Net/HttpResponse.cs
Normal file
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
273
MediaBrowser.Model/Net/MimeTypes.cs
Normal file
273
MediaBrowser.Model/Net/MimeTypes.cs
Normal file
@@ -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];
|
||||
}
|
||||
}
|
||||
}
|
||||
28
MediaBrowser.Model/Sync/ItemFIleInfo.cs
Normal file
28
MediaBrowser.Model/Sync/ItemFIleInfo.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
19
MediaBrowser.Model/Sync/ItemFileType.cs
Normal file
19
MediaBrowser.Model/Sync/ItemFileType.cs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class SyncItem
|
||||
{
|
||||
public BaseItemDto Item { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,12 @@ namespace MediaBrowser.Model.Sync
|
||||
/// <value>The item identifier.</value>
|
||||
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>
|
||||
|
||||
38
MediaBrowser.Model/Sync/SyncedItem.cs
Normal file
38
MediaBrowser.Model/Sync/SyncedItem.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
14
MediaBrowser.Model/Users/UserAction.cs
Normal file
14
MediaBrowser.Model/Users/UserAction.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
8
MediaBrowser.Model/Users/UserActionType.cs
Normal file
8
MediaBrowser.Model/Users/UserActionType.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
namespace MediaBrowser.Model.Users
|
||||
{
|
||||
public enum UserActionType
|
||||
{
|
||||
PlayedItem = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user