mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-20 05:04:18 +01:00
Pushing missing changes
This commit is contained in:
@@ -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; }
|
||||
}
|
||||
}
|
||||
82
MediaBrowser.Model/Entities/BaseItemInfo.cs
Normal file
82
MediaBrowser.Model/Entities/BaseItemInfo.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
32
MediaBrowser.Model/Entities/ChapterInfo.cs
Normal file
32
MediaBrowser.Model/Entities/ChapterInfo.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
182
MediaBrowser.Model/Entities/DisplayPreferences.cs
Normal file
182
MediaBrowser.Model/Entities/DisplayPreferences.cs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
12
MediaBrowser.Model/Entities/IHasMediaStreams.cs
Normal file
12
MediaBrowser.Model/Entities/IHasMediaStreams.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
35
MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
Normal file
35
MediaBrowser.Model/Entities/LibraryUpdateInfo.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
22
MediaBrowser.Model/Entities/LocationType.cs
Normal file
22
MediaBrowser.Model/Entities/LocationType.cs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
29
MediaBrowser.Model/Entities/MBRegistrationRecord.cs
Normal file
29
MediaBrowser.Model/Entities/MBRegistrationRecord.cs
Normal file
@@ -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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
156
MediaBrowser.Model/Entities/MediaStream.cs
Normal file
156
MediaBrowser.Model/Entities/MediaStream.cs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
22
MediaBrowser.Model/Entities/MediaType.cs
Normal file
22
MediaBrowser.Model/Entities/MediaType.cs
Normal file
@@ -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";
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
25
MediaBrowser.Model/Entities/ParentalRating.cs
Normal file
25
MediaBrowser.Model/Entities/ParentalRating.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
30
MediaBrowser.Model/Entities/PersonType.cs
Normal file
30
MediaBrowser.Model/Entities/PersonType.cs
Normal file
@@ -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";
|
||||
}
|
||||
}
|
||||
32
MediaBrowser.Model/Entities/PluginSecurityInfo.cs
Normal file
32
MediaBrowser.Model/Entities/PluginSecurityInfo.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
9
MediaBrowser.Model/Entities/RequestResult.cs
Normal file
9
MediaBrowser.Model/Entities/RequestResult.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using ProtoBuf;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
[ProtoContract]
|
||||
public class EmptyRequestResult
|
||||
{
|
||||
}
|
||||
}
|
||||
18
MediaBrowser.Model/Entities/SeriesStatus.cs
Normal file
18
MediaBrowser.Model/Entities/SeriesStatus.cs
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
9
MediaBrowser.Model/Entities/VideoFormat.cs
Normal file
9
MediaBrowser.Model/Entities/VideoFormat.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
public enum VideoFormat
|
||||
{
|
||||
Standard,
|
||||
Digital3D,
|
||||
Sbs3D
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
26
MediaBrowser.Model/Entities/VirtualFolderInfo.cs
Normal file
26
MediaBrowser.Model/Entities/VirtualFolderInfo.cs
Normal file
@@ -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; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user