diff options
| author | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
|---|---|---|
| committer | LukePulverenti <luke.pulverenti@gmail.com> | 2013-02-20 20:33:05 -0500 |
| commit | 767cdc1f6f6a63ce997fc9476911e2c361f9d402 (patch) | |
| tree | 49add55976f895441167c66cfa95e5c7688d18ce /MediaBrowser.Model/Entities | |
| parent | 845554722efaed872948a9e0f7202e3ef52f1b6e (diff) | |
Pushing missing changes
Diffstat (limited to 'MediaBrowser.Model/Entities')
23 files changed, 940 insertions, 159 deletions
diff --git a/MediaBrowser.Model/Entities/AudioStream.cs b/MediaBrowser.Model/Entities/AudioStream.cs deleted file mode 100644 index 8a4cea4eed..0000000000 --- a/MediaBrowser.Model/Entities/AudioStream.cs +++ /dev/null @@ -1,26 +0,0 @@ -using ProtoBuf;
-
-namespace MediaBrowser.Model.Entities
-{
- [ProtoContract]
- public class AudioStream
- {
- [ProtoMember(1)]
- public string Codec { get; set; }
-
- [ProtoMember(2)]
- public string Language { get; set; }
-
- [ProtoMember(3)]
- public int BitRate { get; set; }
-
- [ProtoMember(4)]
- public int Channels { get; set; }
-
- [ProtoMember(5)]
- public int SampleRate { get; set; }
-
- [ProtoMember(6)]
- public bool IsDefault { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Entities/BaseItemInfo.cs b/MediaBrowser.Model/Entities/BaseItemInfo.cs new file mode 100644 index 0000000000..c7483f0735 --- /dev/null +++ b/MediaBrowser.Model/Entities/BaseItemInfo.cs @@ -0,0 +1,82 @@ +using ProtoBuf; +using System; +using System.Runtime.Serialization; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// This is a stub class containing only basic information about an item + /// </summary> + [ProtoContract] + public class BaseItemInfo + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(1)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the id. + /// </summary> + /// <value>The id.</value> + [ProtoMember(2)] + public string Id { get; set; } + + /// <summary> + /// Gets or sets the type. + /// </summary> + /// <value>The type.</value> + [ProtoMember(3)] + public string Type { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is folder. + /// </summary> + /// <value><c>true</c> if this instance is folder; otherwise, <c>false</c>.</value> + [ProtoMember(4)] + public bool IsFolder { get; set; } + + /// <summary> + /// Gets or sets the run time ticks. + /// </summary> + /// <value>The run time ticks.</value> + [ProtoMember(5)] + public long? RunTimeTicks { get; set; } + + /// <summary> + /// Gets or sets the primary image tag. + /// </summary> + /// <value>The primary image tag.</value> + [ProtoMember(6)] + public Guid? PrimaryImageTag { get; set; } + + /// <summary> + /// Gets or sets the backdrop image tag. + /// </summary> + /// <value>The backdrop image tag.</value> + [ProtoMember(7)] + public Guid? BackdropImageTag { get; set; } + + /// <summary> + /// Gets a value indicating whether this instance has primary image. + /// </summary> + /// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasPrimaryImage + { + get { return PrimaryImageTag.HasValue; } + } + + /// <summary> + /// Gets a value indicating whether this instance has backdrop. + /// </summary> + /// <value><c>true</c> if this instance has backdrop; otherwise, <c>false</c>.</value> + [IgnoreDataMember] + public bool HasBackdrop + { + get { return BackdropImageTag.HasValue; } + } + } +} diff --git a/MediaBrowser.Model/Entities/ChapterInfo.cs b/MediaBrowser.Model/Entities/ChapterInfo.cs new file mode 100644 index 0000000000..72e2fe1fda --- /dev/null +++ b/MediaBrowser.Model/Entities/ChapterInfo.cs @@ -0,0 +1,32 @@ +using ProtoBuf; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class ChapterInfo + /// </summary> + [ProtoContract] + public class ChapterInfo + { + /// <summary> + /// Gets or sets the start position ticks. + /// </summary> + /// <value>The start position ticks.</value> + [ProtoMember(1)] + public long StartPositionTicks { get; set; } + + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(2)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the image path. + /// </summary> + /// <value>The image path.</value> + [ProtoMember(3)] + public string ImagePath { get; set; } + } +} diff --git a/MediaBrowser.Model/Entities/DisplayPreferences.cs b/MediaBrowser.Model/Entities/DisplayPreferences.cs new file mode 100644 index 0000000000..2fe4ae5646 --- /dev/null +++ b/MediaBrowser.Model/Entities/DisplayPreferences.cs @@ -0,0 +1,182 @@ +using MediaBrowser.Model.Drawing; +using ProtoBuf; +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Defines the display preferences for any item that supports them (usually Folders) + /// </summary> + [ProtoContract] + public class DisplayPreferences + { + /// <summary> + /// The image scale + /// </summary> + private const double ImageScale = .9; + + /// <summary> + /// Initializes a new instance of the <see cref="DisplayPreferences" /> class. + /// </summary> + public DisplayPreferences() + { + ViewType = ViewTypes.Poster; + PrimaryImageType = ImageType.Primary; + RememberIndexing = false; + PrimaryImageHeight = 250; + PrimaryImageWidth = 250; + CustomPrefs = new Dictionary<string, string>(); + } + + /// <summary> + /// Gets or sets the user id. + /// </summary> + /// <value>The user id.</value> + [ProtoMember(1)] + public Guid UserId { get; set; } + /// <summary> + /// Gets or sets the type of the view. + /// </summary> + /// <value>The type of the view.</value> + [ProtoMember(2)] + public ViewTypes ViewType { get; set; } + /// <summary> + /// Gets or sets the type of the primary image. + /// </summary> + /// <value>The type of the primary image.</value> + [ProtoMember(3)] + public ImageType PrimaryImageType { get; set; } + /// <summary> + /// Gets or sets the sort by. + /// </summary> + /// <value>The sort by.</value> + [ProtoMember(4)] + public string SortBy { get; set; } + /// <summary> + /// Gets or sets the index by. + /// </summary> + /// <value>The index by.</value> + [ProtoMember(5)] + public string IndexBy { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [remember indexing]. + /// </summary> + /// <value><c>true</c> if [remember indexing]; otherwise, <c>false</c>.</value> + [ProtoMember(6)] + public bool RememberIndexing { get; set; } + /// <summary> + /// Gets or sets the height of the primary image. + /// </summary> + /// <value>The height of the primary image.</value> + [ProtoMember(7)] + public int PrimaryImageHeight { get; set; } + /// <summary> + /// Gets or sets the width of the primary image. + /// </summary> + /// <value>The width of the primary image.</value> + [ProtoMember(8)] + public int PrimaryImageWidth { get; set; } + /// <summary> + /// Gets or sets the custom prefs. + /// </summary> + /// <value>The custom prefs.</value> + [ProtoMember(9)] + public Dictionary<string, string> CustomPrefs { get; set; } + /// <summary> + /// Gets or sets the scroll direction. + /// </summary> + /// <value>The scroll direction.</value> + [ProtoMember(10)] + public ScrollDirection ScrollDirection { get; set; } + /// <summary> + /// Gets or sets a value indicating whether [remember sorting]. + /// </summary> + /// <value><c>true</c> if [remember sorting]; otherwise, <c>false</c>.</value> + [ProtoMember(11)] + public bool RememberSorting { get; set; } + /// <summary> + /// Gets or sets the sort order. + /// </summary> + /// <value>The sort order.</value> + [ProtoMember(12)] + public SortOrder SortOrder { get; set; } + + /// <summary> + /// Increases the size of the image. + /// </summary> + public void IncreaseImageSize() + { + var newWidth = PrimaryImageWidth / ImageScale; + + var size = DrawingUtils.Resize(PrimaryImageWidth, PrimaryImageHeight, newWidth); + + PrimaryImageWidth = Convert.ToInt32(size.Width); + PrimaryImageHeight = Convert.ToInt32(size.Height); + } + + /// <summary> + /// Decreases the size of the image. + /// </summary> + public void DecreaseImageSize() + { + var size = DrawingUtils.Scale(PrimaryImageWidth, PrimaryImageHeight, ImageScale); + + PrimaryImageWidth = Convert.ToInt32(size.Width); + PrimaryImageHeight = Convert.ToInt32(size.Height); + } + } + + /// <summary> + /// Enum ViewTypes + /// </summary> + public enum ViewTypes + { + /// <summary> + /// The poster + /// </summary> + Poster, + /// <summary> + /// The cover flow + /// </summary> + CoverFlow, + /// <summary> + /// The thumb strip + /// </summary> + ThumbStrip, + /// <summary> + /// The list + /// </summary> + List + } + + /// <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/IHasMediaStreams.cs b/MediaBrowser.Model/Entities/IHasMediaStreams.cs new file mode 100644 index 0000000000..a0312aa7b1 --- /dev/null +++ b/MediaBrowser.Model/Entities/IHasMediaStreams.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// This is essentially a marker interface + /// </summary> + public interface IHasMediaStreams + { + List<MediaStream> MediaStreams { get; set; } + } +} diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs index 96eb78f243..2ddf8ffad1 100644 --- a/MediaBrowser.Model/Entities/IHasProviderIds.cs +++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs @@ -1,57 +1,94 @@ -using System.Collections.Generic;
-
-namespace MediaBrowser.Model.Entities
-{
- /// <summary>
- /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repition by using extension methods
- /// </summary>
- public interface IHasProviderIds
- {
- Dictionary<string, string> ProviderIds { get; set; }
- }
-
- public static class ProviderIdsExtensions
- {
- /// <summary>
- /// Gets a provider id
- /// </summary>
- public static string GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
- {
- return instance.GetProviderId(provider.ToString());
- }
-
- /// <summary>
- /// Gets a provider id
- /// </summary>
- public static string GetProviderId(this IHasProviderIds instance, string name)
- {
- if (instance.ProviderIds == null)
- {
- return null;
- }
-
- return instance.ProviderIds[name];
- }
-
- /// <summary>
- /// Sets a provider id
- /// </summary>
- public static void SetProviderId(this IHasProviderIds instance, string name, string value)
- {
- if (instance.ProviderIds == null)
- {
- instance.ProviderIds = new Dictionary<string, string>();
- }
-
- instance.ProviderIds[name] = value;
- }
-
- /// <summary>
- /// Sets a provider id
- /// </summary>
- public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
- {
- instance.SetProviderId(provider.ToString(), value);
- }
- }
-}
+using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Since BaseItem and DTOBaseItem both have ProviderIds, this interface helps avoid code repition by using extension methods + /// </summary> + public interface IHasProviderIds + { + /// <summary> + /// Gets or sets the provider ids. + /// </summary> + /// <value>The provider ids.</value> + Dictionary<string, string> ProviderIds { get; set; } + } + + /// <summary> + /// Class ProviderIdsExtensions + /// </summary> + public static class ProviderIdsExtensions + { + /// <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.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 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/ImageType.cs b/MediaBrowser.Model/Entities/ImageType.cs index d9bb06cbca..aaae8dda37 100644 --- a/MediaBrowser.Model/Entities/ImageType.cs +++ b/MediaBrowser.Model/Entities/ImageType.cs @@ -1,13 +1,54 @@ -
-namespace MediaBrowser.Model.Entities
-{
- public enum ImageType
- {
- Primary,
- Art,
- Backdrop,
- Banner,
- Logo,
- Thumbnail
- }
-}
+ +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Enum ImageType + /// </summary> + public enum ImageType + { + /// <summary> + /// The primary + /// </summary> + Primary, + /// <summary> + /// The art + /// </summary> + Art, + /// <summary> + /// The backdrop + /// </summary> + Backdrop, + /// <summary> + /// The banner + /// </summary> + Banner, + /// <summary> + /// The logo + /// </summary> + Logo, + /// <summary> + /// The thumb + /// </summary> + Thumb, + /// <summary> + /// The disc + /// </summary> + Disc, + /// <summary> + /// The box + /// </summary> + Box, + /// <summary> + /// The screenshot + /// </summary> + Screenshot, + /// <summary> + /// The menu + /// </summary> + Menu, + /// <summary> + /// The chapter image + /// </summary> + ChapterImage + } +} diff --git a/MediaBrowser.Model/Entities/ItemSpecialCounts.cs b/MediaBrowser.Model/Entities/ItemSpecialCounts.cs deleted file mode 100644 index b57be6ca8b..0000000000 --- a/MediaBrowser.Model/Entities/ItemSpecialCounts.cs +++ /dev/null @@ -1,23 +0,0 @@ -using ProtoBuf;
-
-namespace MediaBrowser.Model.Entities
-{
- /// <summary>
- /// Since it can be slow to collect this data, this class helps provide a way to calculate them all at once.
- /// </summary>
- [ProtoContract]
- public class ItemSpecialCounts
- {
- [ProtoMember(1)]
- public int RecentlyAddedItemCount { get; set; }
-
- [ProtoMember(2)]
- public int RecentlyAddedUnPlayedItemCount { get; set; }
-
- [ProtoMember(3)]
- public int InProgressItemCount { get; set; }
-
- [ProtoMember(4)]
- public decimal PlayedPercentage { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs new file mode 100644 index 0000000000..1ad117009b --- /dev/null +++ b/MediaBrowser.Model/Entities/LibraryUpdateInfo.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class LibraryUpdateInfo + /// </summary> + public class LibraryUpdateInfo + { + /// <summary> + /// Gets or sets the folder. + /// </summary> + /// <value>The folder.</value> + public BaseItemInfo Folder { get; set; } + + /// <summary> + /// Gets or sets the items added. + /// </summary> + /// <value>The items added.</value> + public IEnumerable<BaseItemInfo> ItemsAdded { get; set; } + + /// <summary> + /// Gets or sets the items removed. + /// </summary> + /// <value>The items removed.</value> + public IEnumerable<Guid> ItemsRemoved { get; set; } + + /// <summary> + /// Gets or sets the items updated. + /// </summary> + /// <value>The items updated.</value> + public IEnumerable<Guid> ItemsUpdated { get; set; } + } +} diff --git a/MediaBrowser.Model/Entities/LocationType.cs b/MediaBrowser.Model/Entities/LocationType.cs new file mode 100644 index 0000000000..3adf030247 --- /dev/null +++ b/MediaBrowser.Model/Entities/LocationType.cs @@ -0,0 +1,22 @@ + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Enum LocationType + /// </summary> + public enum LocationType + { + /// <summary> + /// The file system + /// </summary> + FileSystem, + /// <summary> + /// The remote + /// </summary> + Remote, + /// <summary> + /// The virtual + /// </summary> + Virtual + } +} diff --git a/MediaBrowser.Model/Entities/MBRegistrationRecord.cs b/MediaBrowser.Model/Entities/MBRegistrationRecord.cs new file mode 100644 index 0000000000..1349da4d33 --- /dev/null +++ b/MediaBrowser.Model/Entities/MBRegistrationRecord.cs @@ -0,0 +1,29 @@ +using System; + +namespace Mediabrowser.Model.Entities +{ + public class MBRegistrationRecord + { + public DateTime ExpirationDate = DateTime.MinValue; + public bool IsRegistered = false; + public bool RegChecked = false; + public bool RegError = false; + private bool? _isInTrial; + public bool TrialVersion + { + get + { + if (_isInTrial == null) + { + if (!RegChecked) return false; //don't set this until we've successfully obtained exp date + _isInTrial = ExpirationDate > DateTime.Now; + } + return (_isInTrial.Value && !IsRegistered); + } + } + public bool IsValid + { + get { return !RegChecked || (IsRegistered || TrialVersion); } + } + } +}
\ No newline at end of file diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs new file mode 100644 index 0000000000..fe008aa0c1 --- /dev/null +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -0,0 +1,156 @@ +using ProtoBuf; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class MediaStream + /// </summary> + [ProtoContract] + public class MediaStream + { + /// <summary> + /// Gets or sets the codec. + /// </summary> + /// <value>The codec.</value> + [ProtoMember(1)] + public string Codec { get; set; } + + /// <summary> + /// Gets or sets the language. + /// </summary> + /// <value>The language.</value> + [ProtoMember(2)] + public string Language { get; set; } + + /// <summary> + /// Gets or sets the bit rate. + /// </summary> + /// <value>The bit rate.</value> + [ProtoMember(3)] + public int? BitRate { get; set; } + + /// <summary> + /// Gets or sets the channels. + /// </summary> + /// <value>The channels.</value> + [ProtoMember(4)] + public int? Channels { get; set; } + + /// <summary> + /// Gets or sets the sample rate. + /// </summary> + /// <value>The sample rate.</value> + [ProtoMember(5)] + public int? SampleRate { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is default. + /// </summary> + /// <value><c>true</c> if this instance is default; otherwise, <c>false</c>.</value> + [ProtoMember(6)] + public bool IsDefault { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is forced. + /// </summary> + /// <value><c>true</c> if this instance is forced; otherwise, <c>false</c>.</value> + [ProtoMember(7)] + public bool IsForced { get; set; } + + /// <summary> + /// Gets or sets the height. + /// </summary> + /// <value>The height.</value> + [ProtoMember(8)] + public int? Height { get; set; } + + /// <summary> + /// Gets or sets the width. + /// </summary> + /// <value>The width.</value> + [ProtoMember(9)] + public int? Width { get; set; } + + /// <summary> + /// Gets or sets the type of the scan. + /// </summary> + /// <value>The type of the scan.</value> + [ProtoMember(10)] + public string ScanType { get; set; } + + /// <summary> + /// Gets or sets the average frame rate. + /// </summary> + /// <value>The average frame rate.</value> + [ProtoMember(11)] + public float? AverageFrameRate { get; set; } + + /// <summary> + /// Gets or sets the real frame rate. + /// </summary> + /// <value>The real frame rate.</value> + [ProtoMember(12)] + public float? RealFrameRate { get; set; } + + /// <summary> + /// Gets or sets the profile. + /// </summary> + /// <value>The profile.</value> + [ProtoMember(13)] + public string Profile { get; set; } + + /// <summary> + /// Gets or sets the type. + /// </summary> + /// <value>The type.</value> + [ProtoMember(14)] + public MediaStreamType Type { get; set; } + + /// <summary> + /// Gets or sets the aspect ratio. + /// </summary> + /// <value>The aspect ratio.</value> + [ProtoMember(15)] + public string AspectRatio { get; set; } + + /// <summary> + /// Gets or sets the index. + /// </summary> + /// <value>The index.</value> + [ProtoMember(16)] + public int Index { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is external. + /// </summary> + /// <value><c>true</c> if this instance is external; otherwise, <c>false</c>.</value> + [ProtoMember(17)] + public bool IsExternal { get; set; } + + /// <summary> + /// Gets or sets the filename. + /// </summary> + /// <value>The filename.</value> + [ProtoMember(18)] + public string Path { get; set; } + } + + /// <summary> + /// Enum MediaStreamType + /// </summary> + public enum MediaStreamType + { + /// <summary> + /// The audio + /// </summary> + Audio, + /// <summary> + /// The video + /// </summary> + Video, + /// <summary> + /// The subtitle + /// </summary> + Subtitle + } +} diff --git a/MediaBrowser.Model/Entities/MediaType.cs b/MediaBrowser.Model/Entities/MediaType.cs new file mode 100644 index 0000000000..7a5f4c3c91 --- /dev/null +++ b/MediaBrowser.Model/Entities/MediaType.cs @@ -0,0 +1,22 @@ + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class MediaType + /// </summary> + public class MediaType + { + /// <summary> + /// The video + /// </summary> + public const string Video = "Video"; + /// <summary> + /// The audio + /// </summary> + public const string Audio = "Audio"; + /// <summary> + /// The game + /// </summary> + public const string Game = "Game"; + } +} diff --git a/MediaBrowser.Model/Entities/MetadataProviders.cs b/MediaBrowser.Model/Entities/MetadataProviders.cs index b32ec20394..e5324e1e3d 100644 --- a/MediaBrowser.Model/Entities/MetadataProviders.cs +++ b/MediaBrowser.Model/Entities/MetadataProviders.cs @@ -1,11 +1,26 @@ -
-namespace MediaBrowser.Model.Entities
-{
- public enum MetadataProviders
- {
- Imdb,
- Tmdb,
- Tvdb,
- Tvcom
- }
-}
+ +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Enum MetadataProviders + /// </summary> + public enum MetadataProviders + { + /// <summary> + /// The imdb + /// </summary> + Imdb, + /// <summary> + /// The TMDB + /// </summary> + Tmdb, + /// <summary> + /// The TVDB + /// </summary> + Tvdb, + /// <summary> + /// The tvcom + /// </summary> + Tvcom + } +} diff --git a/MediaBrowser.Model/Entities/ParentalRating.cs b/MediaBrowser.Model/Entities/ParentalRating.cs new file mode 100644 index 0000000000..bc3c43c2a6 --- /dev/null +++ b/MediaBrowser.Model/Entities/ParentalRating.cs @@ -0,0 +1,25 @@ +using ProtoBuf; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class ParentalRating + /// </summary> + [ProtoContract] + public class ParentalRating + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(1)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the value. + /// </summary> + /// <value>The value.</value> + [ProtoMember(2)] + public int Value { get; set; } + } +} diff --git a/MediaBrowser.Model/Entities/PersonType.cs b/MediaBrowser.Model/Entities/PersonType.cs new file mode 100644 index 0000000000..fca1fbf201 --- /dev/null +++ b/MediaBrowser.Model/Entities/PersonType.cs @@ -0,0 +1,30 @@ + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Struct PersonType + /// </summary> + public class PersonType + { + /// <summary> + /// The actor + /// </summary> + public const string Actor = "Actor"; + /// <summary> + /// The director + /// </summary> + public const string Director = "Director"; + /// <summary> + /// The composer + /// </summary> + public const string Composer = "Composer"; + /// <summary> + /// The writer + /// </summary> + public const string Writer = "Writer"; + /// <summary> + /// The music artist + /// </summary> + public const string MusicArtist = "MusicArtist"; + } +} diff --git a/MediaBrowser.Model/Entities/PluginSecurityInfo.cs b/MediaBrowser.Model/Entities/PluginSecurityInfo.cs new file mode 100644 index 0000000000..53cbbdbfae --- /dev/null +++ b/MediaBrowser.Model/Entities/PluginSecurityInfo.cs @@ -0,0 +1,32 @@ +using ProtoBuf; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Class PluginSecurityInfo + /// </summary> + [ProtoContract] + public class PluginSecurityInfo + { + /// <summary> + /// Gets or sets the supporter key. + /// </summary> + /// <value>The supporter key.</value> + [ProtoMember(1)] + public string SupporterKey { get; set; } + + /// <summary> + /// Gets or sets the legacy supporter key. + /// </summary> + /// <value><c>The legacy supporter key</value> + [ProtoMember(2)] + public string LegacyKey { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is MB supporter. + /// </summary> + /// <value><c>true</c> if this instance is MB supporter; otherwise, <c>false</c>.</value> + [ProtoMember(3)] + public bool IsMBSupporter { get; set; } + } +} diff --git a/MediaBrowser.Model/Entities/RequestResult.cs b/MediaBrowser.Model/Entities/RequestResult.cs new file mode 100644 index 0000000000..88bd6e2ecd --- /dev/null +++ b/MediaBrowser.Model/Entities/RequestResult.cs @@ -0,0 +1,9 @@ +using ProtoBuf; + +namespace MediaBrowser.Model.Entities +{ + [ProtoContract] + public class EmptyRequestResult + { + } +} diff --git a/MediaBrowser.Model/Entities/SeriesStatus.cs b/MediaBrowser.Model/Entities/SeriesStatus.cs new file mode 100644 index 0000000000..d04a2856cf --- /dev/null +++ b/MediaBrowser.Model/Entities/SeriesStatus.cs @@ -0,0 +1,18 @@ + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Enum SeriesStatus + /// </summary> + public enum SeriesStatus + { + /// <summary> + /// The continuing + /// </summary> + Continuing, + /// <summary> + /// The ended + /// </summary> + Ended + } +} diff --git a/MediaBrowser.Model/Entities/SubtitleStream.cs b/MediaBrowser.Model/Entities/SubtitleStream.cs deleted file mode 100644 index 7a59d93024..0000000000 --- a/MediaBrowser.Model/Entities/SubtitleStream.cs +++ /dev/null @@ -1,17 +0,0 @@ -using ProtoBuf;
-
-namespace MediaBrowser.Model.Entities
-{
- [ProtoContract]
- public class SubtitleStream
- {
- [ProtoMember(1)]
- public string Language { get; set; }
-
- [ProtoMember(2)]
- public bool IsDefault { get; set; }
-
- [ProtoMember(3)]
- public bool IsForced { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Entities/VideoFormat.cs b/MediaBrowser.Model/Entities/VideoFormat.cs new file mode 100644 index 0000000000..107d20c141 --- /dev/null +++ b/MediaBrowser.Model/Entities/VideoFormat.cs @@ -0,0 +1,9 @@ +namespace MediaBrowser.Model.Entities +{ + public enum VideoFormat + { + Standard, + Digital3D, + Sbs3D + } +} diff --git a/MediaBrowser.Model/Entities/VideoType.cs b/MediaBrowser.Model/Entities/VideoType.cs index 0d46ff7700..b2742add16 100644 --- a/MediaBrowser.Model/Entities/VideoType.cs +++ b/MediaBrowser.Model/Entities/VideoType.cs @@ -1,12 +1,45 @@ -
-namespace MediaBrowser.Model.Entities
-{
- public enum VideoType
- {
- VideoFile,
- Iso,
- Dvd,
- BluRay,
- HdDvd
- }
-}
+ +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Enum VideoType + /// </summary> + public enum VideoType + { + /// <summary> + /// The video file + /// </summary> + VideoFile, + /// <summary> + /// The iso + /// </summary> + Iso, + /// <summary> + /// The DVD + /// </summary> + Dvd, + /// <summary> + /// The blu ray + /// </summary> + BluRay, + /// <summary> + /// The hd DVD + /// </summary> + HdDvd + } + + /// <summary> + /// Enum IsoType + /// </summary> + public enum IsoType + { + /// <summary> + /// The DVD + /// </summary> + Dvd, + /// <summary> + /// The blu ray + /// </summary> + BluRay + } +} diff --git a/MediaBrowser.Model/Entities/VirtualFolderInfo.cs b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs new file mode 100644 index 0000000000..390e51d422 --- /dev/null +++ b/MediaBrowser.Model/Entities/VirtualFolderInfo.cs @@ -0,0 +1,26 @@ +using ProtoBuf; +using System.Collections.Generic; + +namespace MediaBrowser.Model.Entities +{ + /// <summary> + /// Used to hold information about a user's list of configured virtual folders + /// </summary> + [ProtoContract] + public class VirtualFolderInfo + { + /// <summary> + /// Gets or sets the name. + /// </summary> + /// <value>The name.</value> + [ProtoMember(1)] + public string Name { get; set; } + + /// <summary> + /// Gets or sets the locations. + /// </summary> + /// <value>The locations.</value> + [ProtoMember(2)] + public List<string> Locations { get; set; } + } +} |
