aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Kernel.cs
diff options
context:
space:
mode:
authorLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-17 15:07:21 -0400
committerLukePulverenti Luke Pulverenti luke pulverenti <LukePulverenti Luke Pulverenti luke.pulverenti@gmail.com>2012-08-17 15:07:21 -0400
commitf32f000298114231f114f41b7c7c4534a0300de2 (patch)
tree2003655d230f2c9b1f40885663ec51ddf30ee89d /MediaBrowser.Controller/Kernel.cs
parented018a8bea89f4a19dbfca2e21eb7207df2db332 (diff)
Removed more kernel methods and deprecated the Configuration and HtmlBrowser projects. They've both been replaced by the new WebDashboard project.
Diffstat (limited to 'MediaBrowser.Controller/Kernel.cs')
-rw-r--r--MediaBrowser.Controller/Kernel.cs160
1 files changed, 0 insertions, 160 deletions
diff --git a/MediaBrowser.Controller/Kernel.cs b/MediaBrowser.Controller/Kernel.cs
index c11a40750..9bf7021e1 100644
--- a/MediaBrowser.Controller/Kernel.cs
+++ b/MediaBrowser.Controller/Kernel.cs
@@ -12,7 +12,6 @@ using MediaBrowser.Controller.Events;
using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Resolvers;
-using MediaBrowser.Model.DTO;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Progress;
using MediaBrowser.Model.Users;
@@ -198,165 +197,6 @@ namespace MediaBrowser.Controller
}
/// <summary>
- /// Gets all years from all recursive children of a folder
- /// The CategoryInfo class is used to keep track of the number of times each year appears
- /// </summary>
- public IEnumerable<IBNItem<Year>> GetAllYears(Folder parent, User user)
- {
- Dictionary<int, int> data = new Dictionary<int, int>();
-
- // Get all the allowed recursive children
- IEnumerable<BaseItem> allItems = parent.GetParentalAllowedRecursiveChildren(user);
-
- foreach (var item in allItems)
- {
- // Add the year from the item to the data dictionary
- // If the year already exists, increment the count
- if (item.ProductionYear == null)
- {
- continue;
- }
-
- if (!data.ContainsKey(item.ProductionYear.Value))
- {
- data.Add(item.ProductionYear.Value, 1);
- }
- else
- {
- data[item.ProductionYear.Value]++;
- }
- }
-
- // Now go through the dictionary and create a Category for each studio
- List<IBNItem<Year>> list = new List<IBNItem<Year>>();
-
- foreach (int key in data.Keys)
- {
- // Get the original entity so that we can also supply the PrimaryImagePath
- Year entity = Kernel.Instance.ItemController.GetYear(key);
-
- if (entity != null)
- {
- list.Add(new IBNItem<Year>()
- {
- Item = entity,
- BaseItemCount = data[key]
- });
- }
- }
-
- return list;
- }
-
- /// <summary>
- /// Gets all studios from all recursive children of a folder
- /// The CategoryInfo class is used to keep track of the number of times each studio appears
- /// </summary>
- public IEnumerable<IBNItem<Studio>> GetAllStudios(Folder parent, User user)
- {
- Dictionary<string, int> data = new Dictionary<string, int>();
-
- // Get all the allowed recursive children
- IEnumerable<BaseItem> allItems = parent.GetParentalAllowedRecursiveChildren(user);
-
- foreach (var item in allItems)
- {
- // Add each studio from the item to the data dictionary
- // If the studio already exists, increment the count
- if (item.Studios == null)
- {
- continue;
- }
-
- foreach (string val in item.Studios)
- {
- if (!data.ContainsKey(val))
- {
- data.Add(val, 1);
- }
- else
- {
- data[val]++;
- }
- }
- }
-
- // Now go through the dictionary and create a Category for each studio
- List<IBNItem<Studio>> list = new List<IBNItem<Studio>>();
-
- foreach (string key in data.Keys)
- {
- // Get the original entity so that we can also supply the PrimaryImagePath
- Studio entity = Kernel.Instance.ItemController.GetStudio(key);
-
- if (entity != null)
- {
- list.Add(new IBNItem<Studio>()
- {
- Item = entity,
- BaseItemCount = data[key]
- });
- }
- }
-
- return list;
- }
-
- /// <summary>
- /// Gets all genres from all recursive children of a folder
- /// The CategoryInfo class is used to keep track of the number of times each genres appears
- /// </summary>
- public IEnumerable<IBNItem<Genre>> GetAllGenres(Folder parent, User user)
- {
- Dictionary<string, int> data = new Dictionary<string, int>();
-
- // Get all the allowed recursive children
- IEnumerable<BaseItem> allItems = parent.GetParentalAllowedRecursiveChildren(user);
-
- foreach (var item in allItems)
- {
- // Add each genre from the item to the data dictionary
- // If the genre already exists, increment the count
- if (item.Genres == null)
- {
- continue;
- }
-
- foreach (string val in item.Genres)
- {
- if (!data.ContainsKey(val))
- {
- data.Add(val, 1);
- }
- else
- {
- data[val]++;
- }
- }
- }
-
- // Now go through the dictionary and create a Category for each genre
- List<IBNItem<Genre>> list = new List<IBNItem<Genre>>();
-
- foreach (string key in data.Keys)
- {
- // Get the original entity so that we can also supply the PrimaryImagePath
- Genre entity = Kernel.Instance.ItemController.GetGenre(key);
-
- if (entity != null)
- {
- list.Add(new IBNItem<Genre>()
- {
- Item = entity,
- BaseItemCount = data[key]
- });
- }
- }
-
- return list;
- }
-
- /// <summary>
/// Gets all users within the system
/// </summary>
private IEnumerable<User> GetAllUsers()