mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-06 07:48:50 +01:00
fix portable and 3.5 project references
This commit is contained in:
@@ -122,34 +122,4 @@ namespace MediaBrowser.Model.Entities
|
||||
PrimaryImageHeight = Convert.ToInt32(size.Height);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum ScrollDirection
|
||||
/// </summary>
|
||||
public enum ScrollDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// The horizontal
|
||||
/// </summary>
|
||||
Horizontal,
|
||||
/// <summary>
|
||||
/// The vertical
|
||||
/// </summary>
|
||||
Vertical
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum SortOrder
|
||||
/// </summary>
|
||||
public enum SortOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// The ascending
|
||||
/// </summary>
|
||||
Ascending,
|
||||
/// <summary>
|
||||
/// The descending
|
||||
/// </summary>
|
||||
Descending
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
@@ -14,102 +13,4 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <value>The provider ids.</value>
|
||||
Dictionary<string, string> ProviderIds { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class ProviderIdsExtensions
|
||||
/// </summary>
|
||||
public static class ProviderIdsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines whether [has provider identifier] [the specified instance].
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
|
||||
public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
{
|
||||
return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
{
|
||||
return instance.GetProviderId(provider.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string GetProviderId(this IHasProviderIds instance, string name)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
throw new ArgumentNullException("instance");
|
||||
}
|
||||
|
||||
if (instance.ProviderIds == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string id;
|
||||
instance.ProviderIds.TryGetValue(name, out id);
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public static void SetProviderId(this IHasProviderIds instance, string name, string value)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
throw new ArgumentNullException("instance");
|
||||
}
|
||||
|
||||
// If it's null remove the key from the dictionary
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
if (instance.ProviderIds != null)
|
||||
{
|
||||
if (instance.ProviderIds.ContainsKey(name))
|
||||
{
|
||||
instance.ProviderIds.Remove(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ensure it exists
|
||||
if (instance.ProviderIds == null)
|
||||
{
|
||||
instance.ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
instance.ProviderIds[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
|
||||
{
|
||||
instance.SetProviderId(provider.ToString(), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
MediaBrowser.Model/Entities/IsoType.cs
Normal file
17
MediaBrowser.Model/Entities/IsoType.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum IsoType
|
||||
/// </summary>
|
||||
public enum IsoType
|
||||
{
|
||||
/// <summary>
|
||||
/// The DVD
|
||||
/// </summary>
|
||||
Dvd,
|
||||
/// <summary>
|
||||
/// The blu ray
|
||||
/// </summary>
|
||||
BluRay
|
||||
}
|
||||
}
|
||||
26
MediaBrowser.Model/Entities/MediaInfo.cs
Normal file
26
MediaBrowser.Model/Entities/MediaInfo.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
public class MediaInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the media streams.
|
||||
/// </summary>
|
||||
/// <value>The media streams.</value>
|
||||
public List<MediaStream> MediaStreams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the format.
|
||||
/// </summary>
|
||||
/// <value>The format.</value>
|
||||
public string Format { get; set; }
|
||||
|
||||
public int? TotalBitrate { get; set; }
|
||||
|
||||
public MediaInfo()
|
||||
{
|
||||
MediaStreams = new List<MediaStream>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
@@ -147,49 +146,4 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <value>The level.</value>
|
||||
public double? Level { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum MediaStreamType
|
||||
/// </summary>
|
||||
public enum MediaStreamType
|
||||
{
|
||||
/// <summary>
|
||||
/// The audio
|
||||
/// </summary>
|
||||
Audio,
|
||||
/// <summary>
|
||||
/// The video
|
||||
/// </summary>
|
||||
Video,
|
||||
/// <summary>
|
||||
/// The subtitle
|
||||
/// </summary>
|
||||
Subtitle,
|
||||
/// <summary>
|
||||
/// The embedded image
|
||||
/// </summary>
|
||||
EmbeddedImage
|
||||
}
|
||||
|
||||
public class MediaInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the media streams.
|
||||
/// </summary>
|
||||
/// <value>The media streams.</value>
|
||||
public List<MediaStream> MediaStreams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the format.
|
||||
/// </summary>
|
||||
/// <value>The format.</value>
|
||||
public string Format { get; set; }
|
||||
|
||||
public int? TotalBitrate { get; set; }
|
||||
|
||||
public MediaInfo()
|
||||
{
|
||||
MediaStreams = new List<MediaStream>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
25
MediaBrowser.Model/Entities/MediaStreamType.cs
Normal file
25
MediaBrowser.Model/Entities/MediaStreamType.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum MediaStreamType
|
||||
/// </summary>
|
||||
public enum MediaStreamType
|
||||
{
|
||||
/// <summary>
|
||||
/// The audio
|
||||
/// </summary>
|
||||
Audio,
|
||||
/// <summary>
|
||||
/// The video
|
||||
/// </summary>
|
||||
Video,
|
||||
/// <summary>
|
||||
/// The subtitle
|
||||
/// </summary>
|
||||
Subtitle,
|
||||
/// <summary>
|
||||
/// The embedded image
|
||||
/// </summary>
|
||||
EmbeddedImage
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,4 @@ namespace MediaBrowser.Model.Entities
|
||||
public VideoSize? VideoSize { get; set; }
|
||||
public bool IsDirectLink { get; set; }
|
||||
}
|
||||
|
||||
public enum VideoSize
|
||||
{
|
||||
StandardDefinition,
|
||||
HighDefinition
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
|
||||
103
MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
Normal file
103
MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ProviderIdsExtensions
|
||||
/// </summary>
|
||||
public static class ProviderIdsExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines whether [has provider identifier] [the specified instance].
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
|
||||
public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
{
|
||||
return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
{
|
||||
return instance.GetProviderId(provider.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string GetProviderId(this IHasProviderIds instance, string name)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
throw new ArgumentNullException("instance");
|
||||
}
|
||||
|
||||
if (instance.ProviderIds == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
string id;
|
||||
instance.ProviderIds.TryGetValue(name, out id);
|
||||
return id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public static void SetProviderId(this IHasProviderIds instance, string name, string value)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
throw new ArgumentNullException("instance");
|
||||
}
|
||||
|
||||
// If it's null remove the key from the dictionary
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
if (instance.ProviderIds != null)
|
||||
{
|
||||
if (instance.ProviderIds.ContainsKey(name))
|
||||
{
|
||||
instance.ProviderIds.Remove(name);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Ensure it exists
|
||||
if (instance.ProviderIds == null)
|
||||
{
|
||||
instance.ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
instance.ProviderIds[name] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets a provider id
|
||||
/// </summary>
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
|
||||
{
|
||||
instance.SetProviderId(provider.ToString(), value);
|
||||
}
|
||||
}
|
||||
}
|
||||
17
MediaBrowser.Model/Entities/ScrollDirection.cs
Normal file
17
MediaBrowser.Model/Entities/ScrollDirection.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum ScrollDirection
|
||||
/// </summary>
|
||||
public enum ScrollDirection
|
||||
{
|
||||
/// <summary>
|
||||
/// The horizontal
|
||||
/// </summary>
|
||||
Horizontal,
|
||||
/// <summary>
|
||||
/// The vertical
|
||||
/// </summary>
|
||||
Vertical
|
||||
}
|
||||
}
|
||||
17
MediaBrowser.Model/Entities/SortOrder.cs
Normal file
17
MediaBrowser.Model/Entities/SortOrder.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum SortOrder
|
||||
/// </summary>
|
||||
public enum SortOrder
|
||||
{
|
||||
/// <summary>
|
||||
/// The ascending
|
||||
/// </summary>
|
||||
Ascending,
|
||||
/// <summary>
|
||||
/// The descending
|
||||
/// </summary>
|
||||
Descending
|
||||
}
|
||||
}
|
||||
8
MediaBrowser.Model/Entities/VideoSize.cs
Normal file
8
MediaBrowser.Model/Entities/VideoSize.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
public enum VideoSize
|
||||
{
|
||||
StandardDefinition,
|
||||
HighDefinition
|
||||
}
|
||||
}
|
||||
@@ -27,19 +27,4 @@ namespace MediaBrowser.Model.Entities
|
||||
/// </summary>
|
||||
HdDvd
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum IsoType
|
||||
/// </summary>
|
||||
public enum IsoType
|
||||
{
|
||||
/// <summary>
|
||||
/// The DVD
|
||||
/// </summary>
|
||||
Dvd,
|
||||
/// <summary>
|
||||
/// The blu ray
|
||||
/// </summary>
|
||||
BluRay
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user