aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-08 16:26:20 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-05-08 16:26:20 -0400
commitbb031f553b940d21fa89f319d294745484c2234e (patch)
tree29aac2660ab9186b5d43941fb0c6ef249ce33a71 /MediaBrowser.Model/Entities
parentf02c3260273a09f465c4e7a97d8b90f0f6909734 (diff)
fix portable and 3.5 project references
Diffstat (limited to 'MediaBrowser.Model/Entities')
-rw-r--r--MediaBrowser.Model/Entities/DisplayPreferences.cs30
-rw-r--r--MediaBrowser.Model/Entities/EmptyRequestResult.cs (renamed from MediaBrowser.Model/Entities/RequestResult.cs)0
-rw-r--r--MediaBrowser.Model/Entities/IHasProviderIds.cs101
-rw-r--r--MediaBrowser.Model/Entities/IsoType.cs17
-rw-r--r--MediaBrowser.Model/Entities/MediaInfo.cs26
-rw-r--r--MediaBrowser.Model/Entities/MediaStream.cs48
-rw-r--r--MediaBrowser.Model/Entities/MediaStreamType.cs25
-rw-r--r--MediaBrowser.Model/Entities/MediaUrl.cs6
-rw-r--r--MediaBrowser.Model/Entities/PackageReviewInfo.cs4
-rw-r--r--MediaBrowser.Model/Entities/ProviderIdsExtensions.cs103
-rw-r--r--MediaBrowser.Model/Entities/ScrollDirection.cs17
-rw-r--r--MediaBrowser.Model/Entities/SortOrder.cs17
-rw-r--r--MediaBrowser.Model/Entities/VideoSize.cs8
-rw-r--r--MediaBrowser.Model/Entities/VideoType.cs15
14 files changed, 215 insertions, 202 deletions
diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs
index 62233ac27..2fdab9799 100644
--- a/MediaBrowser.Model/Entities/DisplayPreferences.cs
+++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs
@@ -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
- }
}
diff --git a/MediaBrowser.Model/Entities/RequestResult.cs b/MediaBrowser.Model/Entities/EmptyRequestResult.cs
index 5c9a725fd..5c9a725fd 100644
--- a/MediaBrowser.Model/Entities/RequestResult.cs
+++ b/MediaBrowser.Model/Entities/EmptyRequestResult.cs
diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs
index efb75412f..796850dbd 100644
--- a/MediaBrowser.Model/Entities/IHasProviderIds.cs
+++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs
@@ -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);
- }
- }
}
diff --git a/MediaBrowser.Model/Entities/IsoType.cs b/MediaBrowser.Model/Entities/IsoType.cs
new file mode 100644
index 000000000..567b98ab9
--- /dev/null
+++ b/MediaBrowser.Model/Entities/IsoType.cs
@@ -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
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/MediaInfo.cs b/MediaBrowser.Model/Entities/MediaInfo.cs
new file mode 100644
index 000000000..ef26cfa14
--- /dev/null
+++ b/MediaBrowser.Model/Entities/MediaInfo.cs
@@ -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>();
+ }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs
index d54e3c0ef..66163c1ef 100644
--- a/MediaBrowser.Model/Entities/MediaStream.cs
+++ b/MediaBrowser.Model/Entities/MediaStream.cs
@@ -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>();
- }
- }
}
diff --git a/MediaBrowser.Model/Entities/MediaStreamType.cs b/MediaBrowser.Model/Entities/MediaStreamType.cs
new file mode 100644
index 000000000..084a411f9
--- /dev/null
+++ b/MediaBrowser.Model/Entities/MediaStreamType.cs
@@ -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
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/MediaUrl.cs b/MediaBrowser.Model/Entities/MediaUrl.cs
index 857e91fec..9aa7207ed 100644
--- a/MediaBrowser.Model/Entities/MediaUrl.cs
+++ b/MediaBrowser.Model/Entities/MediaUrl.cs
@@ -8,10 +8,4 @@ namespace MediaBrowser.Model.Entities
public VideoSize? VideoSize { get; set; }
public bool IsDirectLink { get; set; }
}
-
- public enum VideoSize
- {
- StandardDefinition,
- HighDefinition
- }
}
diff --git a/MediaBrowser.Model/Entities/PackageReviewInfo.cs b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
index c350935f4..52500a41e 100644
--- a/MediaBrowser.Model/Entities/PackageReviewInfo.cs
+++ b/MediaBrowser.Model/Entities/PackageReviewInfo.cs
@@ -1,8 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
namespace MediaBrowser.Model.Entities
{
diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
new file mode 100644
index 000000000..e10232baa
--- /dev/null
+++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs
@@ -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);
+ }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/ScrollDirection.cs b/MediaBrowser.Model/Entities/ScrollDirection.cs
new file mode 100644
index 000000000..ed2210300
--- /dev/null
+++ b/MediaBrowser.Model/Entities/ScrollDirection.cs
@@ -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
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/SortOrder.cs b/MediaBrowser.Model/Entities/SortOrder.cs
new file mode 100644
index 000000000..5130449ba
--- /dev/null
+++ b/MediaBrowser.Model/Entities/SortOrder.cs
@@ -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
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/VideoSize.cs b/MediaBrowser.Model/Entities/VideoSize.cs
new file mode 100644
index 000000000..0100f3b90
--- /dev/null
+++ b/MediaBrowser.Model/Entities/VideoSize.cs
@@ -0,0 +1,8 @@
+namespace MediaBrowser.Model.Entities
+{
+ public enum VideoSize
+ {
+ StandardDefinition,
+ HighDefinition
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Model/Entities/VideoType.cs b/MediaBrowser.Model/Entities/VideoType.cs
index b2742add1..aa9a3c55f 100644
--- a/MediaBrowser.Model/Entities/VideoType.cs
+++ b/MediaBrowser.Model/Entities/VideoType.cs
@@ -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
- }
}