mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-29 11:58:27 +01:00
sync updates
This commit is contained in:
@@ -370,6 +370,7 @@
|
||||
<Compile Include="Sync\DeviceFileInfo.cs" />
|
||||
<Compile Include="Sync\ItemFIleInfo.cs" />
|
||||
<Compile Include="Sync\ItemFileType.cs" />
|
||||
<Compile Include="Sync\LocalItem.cs" />
|
||||
<Compile Include="Sync\SyncCategory.cs" />
|
||||
<Compile Include="Sync\SyncDialogOptions.cs" />
|
||||
<Compile Include="Sync\SyncedItem.cs" />
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace MediaBrowser.Model.Net
|
||||
{".asf", "video/x-ms-asf"},
|
||||
{".m4v", "video/x-m4v"}
|
||||
};
|
||||
|
||||
|
||||
private static readonly Dictionary<string, string> ExtensionLookup =
|
||||
MimeTypeLookup
|
||||
.GroupBy(i => i.Value)
|
||||
@@ -267,7 +267,17 @@ namespace MediaBrowser.Model.Net
|
||||
|
||||
public static string ToExtension(string mimeType)
|
||||
{
|
||||
return ExtensionLookup[mimeType];
|
||||
if (string.IsNullOrEmpty(mimeType))
|
||||
{
|
||||
throw new ArgumentNullException("mimeType");
|
||||
}
|
||||
|
||||
string result;
|
||||
if (ExtensionLookup.TryGetValue(mimeType, out result))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
throw new ArgumentNullException("Unable to determine extension for mimeType: " + mimeType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,5 @@ namespace MediaBrowser.Model.Sync
|
||||
/// </summary>
|
||||
/// <value>The type of the image.</value>
|
||||
public ImageType ImageType { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the item identifier.
|
||||
/// </summary>
|
||||
/// <value>The item identifier.</value>
|
||||
public string ItemId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
33
MediaBrowser.Model/Sync/LocalItem.cs
Normal file
33
MediaBrowser.Model/Sync/LocalItem.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.Sync
|
||||
{
|
||||
public class LocalItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the item.
|
||||
/// </summary>
|
||||
/// <value>The item.</value>
|
||||
public BaseItemDto Item { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the local path.
|
||||
/// </summary>
|
||||
/// <value>The local path.</value>
|
||||
public string[] LocalPath { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the server identifier.
|
||||
/// </summary>
|
||||
/// <value>The server identifier.</value>
|
||||
public string ServerId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier.
|
||||
/// </summary>
|
||||
/// <value>The unique identifier.</value>
|
||||
public string UniqueId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the item identifier.
|
||||
/// </summary>
|
||||
/// <value>The item identifier.</value>
|
||||
public string ItemId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user