aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Entities')
-rw-r--r--MediaBrowser.Model/Entities/Audio.cs14
-rw-r--r--MediaBrowser.Model/Entities/BaseEntity.cs25
-rw-r--r--MediaBrowser.Model/Entities/BaseItem.cs172
-rw-r--r--MediaBrowser.Model/Entities/Folder.cs322
-rw-r--r--MediaBrowser.Model/Entities/Genre.cs7
-rw-r--r--MediaBrowser.Model/Entities/ItemSpecialCounts.cs43
-rw-r--r--MediaBrowser.Model/Entities/Movies/BoxSet.cs7
-rw-r--r--MediaBrowser.Model/Entities/Movies/Movie.cs31
-rw-r--r--MediaBrowser.Model/Entities/Person.cs25
-rw-r--r--MediaBrowser.Model/Entities/Studio.cs7
-rw-r--r--MediaBrowser.Model/Entities/TV/Episode.cs7
-rw-r--r--MediaBrowser.Model/Entities/TV/Season.cs28
-rw-r--r--MediaBrowser.Model/Entities/TV/Series.cs12
-rw-r--r--MediaBrowser.Model/Entities/User.cs21
-rw-r--r--MediaBrowser.Model/Entities/UserItemData.cs67
-rw-r--r--MediaBrowser.Model/Entities/Video.cs63
-rw-r--r--MediaBrowser.Model/Entities/Year.cs7
17 files changed, 43 insertions, 815 deletions
diff --git a/MediaBrowser.Model/Entities/Audio.cs b/MediaBrowser.Model/Entities/Audio.cs
deleted file mode 100644
index fcf33dbeb..000000000
--- a/MediaBrowser.Model/Entities/Audio.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-
-namespace MediaBrowser.Model.Entities
-{
- public class Audio : BaseItem
- {
- public int BitRate { get; set; }
- public int Channels { get; set; }
- public int SampleRate { get; set; }
-
- public string Artist { get; set; }
- public string Album { get; set; }
- public string AlbumArtist { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Entities/BaseEntity.cs b/MediaBrowser.Model/Entities/BaseEntity.cs
deleted file mode 100644
index d8f557a31..000000000
--- a/MediaBrowser.Model/Entities/BaseEntity.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using System;
-
-namespace MediaBrowser.Model.Entities
-{
- /// <summary>
- /// Provides a base entity for all of our types
- /// </summary>
- public abstract class BaseEntity
- {
- public string Name { get; set; }
-
- public Guid Id { get; set; }
-
- public string PrimaryImagePath { get; set; }
-
- public DateTime DateCreated { get; set; }
-
- public DateTime DateModified { get; set; }
-
- public override string ToString()
- {
- return Name;
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/BaseItem.cs b/MediaBrowser.Model/Entities/BaseItem.cs
deleted file mode 100644
index 51cb34a53..000000000
--- a/MediaBrowser.Model/Entities/BaseItem.cs
+++ /dev/null
@@ -1,172 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MediaBrowser.Model.Entities
-{
- public abstract class BaseItem : BaseEntity, IHasProviderIds
- {
- public string SortName { get; set; }
-
- /// <summary>
- /// When the item first debuted. For movies this could be premiere date, episodes would be first aired
- /// </summary>
- public DateTime? PremiereDate { get; set; }
-
- public string Path { get; set; }
-
- public Folder Parent { get; set; }
-
- public string LogoImagePath { get; set; }
-
- public string ArtImagePath { get; set; }
-
- public string ThumbnailImagePath { get; set; }
-
- public string BannerImagePath { get; set; }
-
- public IEnumerable<string> BackdropImagePaths { get; set; }
-
- public string OfficialRating { get; set; }
-
- public string CustomRating { get; set; }
- public string CustomPin { get; set; }
-
- public string Language { get; set; }
- public string Overview { get; set; }
- public List<string> Taglines { get; set; }
-
- /// <summary>
- /// Using a Dictionary to prevent duplicates
- /// </summary>
- public Dictionary<string,PersonInfo> People { get; set; }
-
- public List<string> Studios { get; set; }
-
- public List<string> Genres { get; set; }
-
- public string DisplayMediaType { get; set; }
-
- public float? UserRating { get; set; }
- public long? RunTimeTicks { get; set; }
-
- public string AspectRatio { get; set; }
- public int? ProductionYear { get; set; }
-
- /// <summary>
- /// If the item is part of a series, this is it's number in the series.
- /// This could be episode number, album track number, etc.
- /// </summary>
- public int? IndexNumber { get; set; }
-
- /// <summary>
- /// For an episode this could be the season number, or for a song this could be the disc number.
- /// </summary>
- public int? ParentIndexNumber { get; set; }
-
- public IEnumerable<Video> LocalTrailers { get; set; }
-
- public string TrailerUrl { get; set; }
-
- public Dictionary<string, string> ProviderIds { get; set; }
-
- public Dictionary<Guid, UserItemData> UserData { get; set; }
-
- public UserItemData GetUserData(User user, bool createIfNull)
- {
- if (UserData == null || !UserData.ContainsKey(user.Id))
- {
- if (createIfNull)
- {
- AddUserData(user, new UserItemData());
- }
- else
- {
- return null;
- }
- }
-
- return UserData[user.Id];
- }
-
- private void AddUserData(User user, UserItemData data)
- {
- if (UserData == null)
- {
- UserData = new Dictionary<Guid, UserItemData>();
- }
-
- UserData[user.Id] = data;
- }
-
- /// <summary>
- /// Determines if a given user has access to this item
- /// </summary>
- internal bool IsParentalAllowed(User user)
- {
- return true;
- }
-
- /// <summary>
- /// Finds an item by ID, recursively
- /// </summary>
- public virtual BaseItem FindItemById(Guid id)
- {
- if (Id == id)
- {
- return this;
- }
-
- if (LocalTrailers != null)
- {
- return LocalTrailers.FirstOrDefault(i => i.Id == id);
- }
-
- return null;
- }
-
- public virtual bool IsFolder
- {
- get
- {
- return false;
- }
- }
-
- /// <summary>
- /// Determines if the item is considered new based on user settings
- /// </summary>
- public bool IsRecentlyAdded(User user)
- {
- return (DateTime.UtcNow - DateCreated).TotalDays < user.RecentItemDays;
- }
-
- public void AddPerson(PersonInfo person)
- {
- if (People == null)
- {
- People = new Dictionary<string, PersonInfo>(StringComparer.OrdinalIgnoreCase);
- }
-
- People[person.Name] = person;
- }
-
- /// <summary>
- /// Marks the item as either played or unplayed
- /// </summary>
- public virtual void SetPlayedStatus(User user, bool wasPlayed)
- {
- UserItemData data = GetUserData(user, true);
-
- if (wasPlayed)
- {
- data.PlayCount = Math.Max(data.PlayCount, 1);
- }
- else
- {
- data.PlayCount = 0;
- data.PlaybackPositionTicks = 0;
- }
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/Folder.cs b/MediaBrowser.Model/Entities/Folder.cs
deleted file mode 100644
index ef0507138..000000000
--- a/MediaBrowser.Model/Entities/Folder.cs
+++ /dev/null
@@ -1,322 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MediaBrowser.Model.Entities
-{
- public class Folder : BaseItem
- {
- public override bool IsFolder
- {
- get
- {
- return true;
- }
- }
-
- public bool IsRoot { get; set; }
-
- public bool IsVirtualFolder
- {
- get
- {
- return Parent != null && Parent.IsRoot;
- }
- }
-
- public IEnumerable<BaseItem> Children { get; set; }
-
- /// <summary>
- /// Gets allowed children of an item
- /// </summary>
- public IEnumerable<BaseItem> GetParentalAllowedChildren(User user)
- {
- return Children.Where(c => c.IsParentalAllowed(user));
- }
-
- /// <summary>
- /// Gets allowed recursive children of an item
- /// </summary>
- public IEnumerable<BaseItem> GetParentalAllowedRecursiveChildren(User user)
- {
- foreach (var item in GetParentalAllowedChildren(user))
- {
- yield return item;
-
- var subFolder = item as Folder;
-
- if (subFolder != null)
- {
- foreach (var subitem in subFolder.GetParentalAllowedRecursiveChildren(user))
- {
- yield return subitem;
- }
- }
- }
- }
-
- /// <summary>
- /// Since it can be slow to make all of these calculations at once, this method will provide a way to get them all back together
- /// </summary>
- public ItemSpecialCounts GetSpecialCounts(User user)
- {
- ItemSpecialCounts counts = new ItemSpecialCounts();
-
- IEnumerable<BaseItem> recursiveChildren = GetParentalAllowedRecursiveChildren(user);
-
- counts.RecentlyAddedItemCount = GetRecentlyAddedItems(recursiveChildren, user).Count();
- counts.RecentlyAddedUnPlayedItemCount = GetRecentlyAddedUnplayedItems(recursiveChildren, user).Count();
- counts.InProgressItemCount = GetInProgressItems(recursiveChildren, user).Count();
- counts.PlayedPercentage = GetPlayedPercentage(recursiveChildren, user);
-
- return counts;
- }
-
- /// <summary>
- /// Finds all recursive items within a top-level parent that contain the given genre and are allowed for the current user
- /// </summary>
- public IEnumerable<BaseItem> GetItemsWithGenre(string genre, User user)
- {
- return GetParentalAllowedRecursiveChildren(user).Where(f => f.Genres != null && f.Genres.Any(s => s.Equals(genre, StringComparison.OrdinalIgnoreCase)));
- }
-
- /// <summary>
- /// Finds all recursive items within a top-level parent that contain the given year and are allowed for the current user
- /// </summary>
- public IEnumerable<BaseItem> GetItemsWithYear(int year, User user)
- {
- return GetParentalAllowedRecursiveChildren(user).Where(f => f.ProductionYear.HasValue && f.ProductionYear == year);
- }
-
- /// <summary>
- /// Finds all recursive items within a top-level parent that contain the given studio and are allowed for the current user
- /// </summary>
- public IEnumerable<BaseItem> GetItemsWithStudio(string studio, User user)
- {
- return GetParentalAllowedRecursiveChildren(user).Where(f => f.Studios != null && f.Studios.Any(s => s.Equals(studio, StringComparison.OrdinalIgnoreCase)));
- }
-
- /// <summary>
- /// Finds all recursive items within a top-level parent that the user has marked as a favorite
- /// </summary>
- public IEnumerable<BaseItem> GetFavoriteItems(User user)
- {
- return GetParentalAllowedRecursiveChildren(user).Where(c =>
- {
- UserItemData data = c.GetUserData(user, false);
-
- if (data != null)
- {
- return data.IsFavorite;
- }
-
- return false;
- });
- }
-
- /// <summary>
- /// Finds all recursive items within a top-level parent that contain the given person and are allowed for the current user
- /// </summary>
- public IEnumerable<BaseItem> GetItemsWithPerson(string person, User user)
- {
- return GetParentalAllowedRecursiveChildren(user).Where(c =>
- {
- if (c.People != null)
- {
- return c.People.ContainsKey(person);
- }
-
- return false;
- });
- }
-
- /// <summary>
- /// Finds all recursive items within a top-level parent that contain the given person and are allowed for the current user
- /// </summary>
- /// <param name="personType">Specify this to limit results to a specific PersonType</param>
- public IEnumerable<BaseItem> GetItemsWithPerson(string person, string personType, User user)
- {
- return GetParentalAllowedRecursiveChildren(user).Where(c =>
- {
- if (c.People != null)
- {
- return c.People.ContainsKey(person) && c.People[person].Type.Equals(personType, StringComparison.OrdinalIgnoreCase);
- }
-
- return false;
- });
- }
-
- /// <summary>
- /// Gets all recently added items (recursive) within a folder, based on configuration and parental settings
- /// </summary>
- public IEnumerable<BaseItem> GetRecentlyAddedItems(User user)
- {
- return GetRecentlyAddedItems(GetParentalAllowedRecursiveChildren(user), user);
- }
-
- /// <summary>
- /// Gets all recently added unplayed items (recursive) within a folder, based on configuration and parental settings
- /// </summary>
- public IEnumerable<BaseItem> GetRecentlyAddedUnplayedItems(User user)
- {
- return GetRecentlyAddedUnplayedItems(GetParentalAllowedRecursiveChildren(user), user);
- }
-
- /// <summary>
- /// Gets all in-progress items (recursive) within a folder
- /// </summary>
- public IEnumerable<BaseItem> GetInProgressItems(User user)
- {
- return GetInProgressItems(GetParentalAllowedRecursiveChildren(user), user);
- }
-
- /// <summary>
- /// Takes a list of items and returns the ones that are recently added
- /// </summary>
- private static IEnumerable<BaseItem> GetRecentlyAddedItems(IEnumerable<BaseItem> itemSet, User user)
- {
- return itemSet.Where(i => !(i.IsFolder) && i.IsRecentlyAdded(user));
- }
-
- /// <summary>
- /// Takes a list of items and returns the ones that are recently added and unplayed
- /// </summary>
- private static IEnumerable<BaseItem> GetRecentlyAddedUnplayedItems(IEnumerable<BaseItem> itemSet, User user)
- {
- return GetRecentlyAddedItems(itemSet, user).Where(i =>
- {
- var userdata = i.GetUserData(user, false);
-
- return userdata == null || userdata.PlayCount == 0;
- });
- }
-
- /// <summary>
- /// Takes a list of items and returns the ones that are in progress
- /// </summary>
- private static IEnumerable<BaseItem> GetInProgressItems(IEnumerable<BaseItem> itemSet, User user)
- {
- return itemSet.Where(i =>
- {
- if (i.IsFolder)
- {
- return false;
- }
-
- var userdata = i.GetUserData(user, false);
-
- return userdata != null && userdata.PlaybackPositionTicks > 0;
- });
- }
-
- /// <summary>
- /// Gets the total played percentage for a set of items
- /// </summary>
- private static decimal GetPlayedPercentage(IEnumerable<BaseItem> itemSet, User user)
- {
- itemSet = itemSet.Where(i => !(i.IsFolder));
-
- if (!itemSet.Any())
- {
- return 0;
- }
-
- decimal totalPercent = 0;
-
- foreach (BaseItem item in itemSet)
- {
- UserItemData data = item.GetUserData(user, false);
-
- if (data == null)
- {
- continue;
- }
-
- if (data.PlayCount > 0)
- {
- totalPercent += 100;
- }
- else if (data.PlaybackPositionTicks > 0 && item.RunTimeTicks.HasValue)
- {
- decimal itemPercent = data.PlaybackPositionTicks;
- itemPercent /= item.RunTimeTicks.Value;
- totalPercent += itemPercent;
- }
- }
-
- return totalPercent / itemSet.Count();
- }
-
- /// <summary>
- /// Marks the item as either played or unplayed
- /// </summary>
- public override void SetPlayedStatus(User user, bool wasPlayed)
- {
- base.SetPlayedStatus(user, wasPlayed);
-
- // Now sweep through recursively and update status
- foreach (BaseItem item in GetParentalAllowedChildren(user))
- {
- item.SetPlayedStatus(user, wasPlayed);
- }
- }
-
- /// <summary>
- /// Finds an item by ID, recursively
- /// </summary>
- public override BaseItem FindItemById(Guid id)
- {
- var result = base.FindItemById(id);
-
- if (result != null)
- {
- return result;
- }
-
- foreach (BaseItem item in Children)
- {
- result = item.FindItemById(id);
-
- if (result != null)
- {
- return result;
- }
- }
-
- return null;
- }
-
- /// <summary>
- /// Finds an item by path, recursively
- /// </summary>
- public BaseItem FindByPath(string path)
- {
- if (Path.Equals(path, StringComparison.OrdinalIgnoreCase))
- {
- return this;
- }
-
- foreach (BaseItem item in Children)
- {
- var folder = item as Folder;
-
- if (folder != null)
- {
- var foundItem = folder.FindByPath(path);
-
- if (foundItem != null)
- {
- return foundItem;
- }
- }
- else if (item.Path.Equals(path, StringComparison.OrdinalIgnoreCase))
- {
- return item;
- }
- }
-
- return null;
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/Genre.cs b/MediaBrowser.Model/Entities/Genre.cs
deleted file mode 100644
index 0ac6c9e38..000000000
--- a/MediaBrowser.Model/Entities/Genre.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-namespace MediaBrowser.Model.Entities
-{
- public class Genre : BaseEntity
- {
- }
-}
diff --git a/MediaBrowser.Model/Entities/ItemSpecialCounts.cs b/MediaBrowser.Model/Entities/ItemSpecialCounts.cs
index b57be6ca8..a1b3c0b61 100644
--- a/MediaBrowser.Model/Entities/ItemSpecialCounts.cs
+++ b/MediaBrowser.Model/Entities/ItemSpecialCounts.cs
@@ -20,4 +20,47 @@ namespace MediaBrowser.Model.Entities
[ProtoMember(4)]
public decimal PlayedPercentage { get; set; }
}
+
+ [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; }
+ }
+
+ [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; }
+ }
+
+ public enum VideoType
+ {
+ VideoFile,
+ Iso,
+ DVD,
+ BluRay
+ }
}
diff --git a/MediaBrowser.Model/Entities/Movies/BoxSet.cs b/MediaBrowser.Model/Entities/Movies/BoxSet.cs
deleted file mode 100644
index 35097fd61..000000000
--- a/MediaBrowser.Model/Entities/Movies/BoxSet.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-namespace MediaBrowser.Model.Entities.Movies
-{
- public class BoxSet : Folder
- {
- }
-}
diff --git a/MediaBrowser.Model/Entities/Movies/Movie.cs b/MediaBrowser.Model/Entities/Movies/Movie.cs
deleted file mode 100644
index 23203da94..000000000
--- a/MediaBrowser.Model/Entities/Movies/Movie.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace MediaBrowser.Model.Entities.Movies
-{
- public class Movie : Video
- {
- public IEnumerable<Video> SpecialFeatures { get; set; }
-
- /// <summary>
- /// Finds an item by ID, recursively
- /// </summary>
- public override BaseItem FindItemById(Guid id)
- {
- var item = base.FindItemById(id);
-
- if (item != null)
- {
- return item;
- }
-
- if (SpecialFeatures != null)
- {
- return SpecialFeatures.FirstOrDefault(i => i.Id == id);
- }
-
- return null;
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/Person.cs b/MediaBrowser.Model/Entities/Person.cs
deleted file mode 100644
index 2bd383802..000000000
--- a/MediaBrowser.Model/Entities/Person.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-
-namespace MediaBrowser.Model.Entities
-{
- /// <summary>
- /// This is the full Person object that can be retrieved with all of it's data.
- /// </summary>
- public class Person : BaseEntity
- {
- }
-
- /// <summary>
- /// This is the small Person stub that is attached to BaseItems
- /// </summary>
- public class PersonInfo
- {
- public string Name { get; set; }
- public string Overview { get; set; }
- public string Type { get; set; }
-
- public override string ToString()
- {
- return Name;
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/Studio.cs b/MediaBrowser.Model/Entities/Studio.cs
deleted file mode 100644
index 16b0bc537..000000000
--- a/MediaBrowser.Model/Entities/Studio.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-namespace MediaBrowser.Model.Entities
-{
- public class Studio : BaseEntity
- {
- }
-}
diff --git a/MediaBrowser.Model/Entities/TV/Episode.cs b/MediaBrowser.Model/Entities/TV/Episode.cs
deleted file mode 100644
index b7c46fdc7..000000000
--- a/MediaBrowser.Model/Entities/TV/Episode.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-namespace MediaBrowser.Model.Entities.TV
-{
- public class Episode : Video
- {
- }
-}
diff --git a/MediaBrowser.Model/Entities/TV/Season.cs b/MediaBrowser.Model/Entities/TV/Season.cs
deleted file mode 100644
index d63c68aa1..000000000
--- a/MediaBrowser.Model/Entities/TV/Season.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-
-namespace MediaBrowser.Model.Entities.TV
-{
- public class Season : Folder
- {
- /// <summary>
- /// Store these to reduce disk access in Episode Resolver
- /// </summary>
- public string[] MetadataFiles { get; set; }
-
- /// <summary>
- /// Determines if the metafolder contains a given file
- /// </summary>
- public bool ContainsMetadataFile(string file)
- {
- for (int i = 0; i < MetadataFiles.Length; i++)
- {
- if (MetadataFiles[i].Equals(file, StringComparison.OrdinalIgnoreCase))
- {
- return true;
- }
- }
-
- return false;
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/TV/Series.cs b/MediaBrowser.Model/Entities/TV/Series.cs
deleted file mode 100644
index fd05f8900..000000000
--- a/MediaBrowser.Model/Entities/TV/Series.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace MediaBrowser.Model.Entities.TV
-{
- public class Series : Folder
- {
- public string Status { get; set; }
- public IEnumerable<DayOfWeek> AirDays { get; set; }
- public string AirTime { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Entities/User.cs b/MediaBrowser.Model/Entities/User.cs
deleted file mode 100644
index 3c6117fca..000000000
--- a/MediaBrowser.Model/Entities/User.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using System;
-
-namespace MediaBrowser.Model.Entities
-{
- public class User : BaseEntity
- {
- public string Password { get; set; }
-
- public string MaxParentalRating { get; set; }
-
- public int RecentItemDays { get; set; }
-
- public User()
- {
- RecentItemDays = 14;
- }
-
- public DateTime? LastLoginDate { get; set; }
- public DateTime? LastActivityDate { get; set; }
- }
-}
diff --git a/MediaBrowser.Model/Entities/UserItemData.cs b/MediaBrowser.Model/Entities/UserItemData.cs
deleted file mode 100644
index b342b9583..000000000
--- a/MediaBrowser.Model/Entities/UserItemData.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using System;
-using System.Runtime.Serialization;
-
-namespace MediaBrowser.Model.Entities
-{
- public class UserItemData
- {
- private float? _Rating = null;
- /// <summary>
- /// Gets or sets the users 0-10 rating
- /// </summary>
- public float? Rating
- {
- get
- {
- return _Rating;
- }
- set
- {
- if (value.HasValue)
- {
- if (value.Value < 0 || value.Value > 10)
- {
- throw new InvalidOperationException("A 0-10 rating is required for UserItemData.");
- }
- }
-
- _Rating = value;
- }
- }
-
- public long PlaybackPositionTicks { get; set; }
-
- public int PlayCount { get; set; }
-
- public bool IsFavorite { get; set; }
-
- /// <summary>
- /// This is an interpreted property to indicate likes or dislikes
- /// This should never be serialized.
- /// </summary>
- [IgnoreDataMember]
- public bool? Likes
- {
- get
- {
- if (Rating != null)
- {
- return Rating >= 6.5;
- }
-
- return null;
- }
- set
- {
- if (value.HasValue)
- {
- Rating = value.Value ? 10 : 1;
- }
- else
- {
- Rating = null;
- }
- }
- }
- }
-}
diff --git a/MediaBrowser.Model/Entities/Video.cs b/MediaBrowser.Model/Entities/Video.cs
deleted file mode 100644
index 27a9ab821..000000000
--- a/MediaBrowser.Model/Entities/Video.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System.Collections.Generic;
-using ProtoBuf;
-
-namespace MediaBrowser.Model.Entities
-{
- public class Video : BaseItem
- {
- public VideoType VideoType { get; set; }
-
- public List<SubtitleStream> Subtitles { get; set; }
- public List<AudioStream> AudioStreams { get; set; }
-
- public int Height { get; set; }
- public int Width { get; set; }
- public string ScanType { get; set; }
- public float FrameRate { get; set; }
- public int BitRate { get; set; }
- public string Codec { get; set; }
- }
-
- [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; }
- }
-
- [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; }
- }
-
- public enum VideoType
- {
- VideoFile,
- Iso,
- DVD,
- BluRay
- }
-}
diff --git a/MediaBrowser.Model/Entities/Year.cs b/MediaBrowser.Model/Entities/Year.cs
deleted file mode 100644
index 359bb6aaf..000000000
--- a/MediaBrowser.Model/Entities/Year.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-
-namespace MediaBrowser.Model.Entities
-{
- public class Year : BaseEntity
- {
- }
-}