The Free Software Media System - Server Backend & API
removed dead code
Luke Pulverenti77e36768e4de
diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csprojindex 5dcfded6f0..54fdc64005 100644--- a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj+++ b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj@@ -470,9 +470,6 @@<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs"><Link>Dto\ImageOptions.cs</Link></Compile>- <Compile Include="..\MediaBrowser.Model\Dto\ItemByNameCounts.cs">- <Link>Dto\ItemByNameCounts.cs</Link>- </Compile><Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs"><Link>Dto\ItemCounts.cs</Link></Compile>diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csprojindex 6c484ffc94..473186a46e 100644--- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj+++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj@@ -444,9 +444,6 @@<Compile Include="..\MediaBrowser.Model\Dto\ImageOptions.cs"><Link>Dto\ImageOptions.cs</Link></Compile>- <Compile Include="..\MediaBrowser.Model\Dto\ItemByNameCounts.cs">- <Link>Dto\ItemByNameCounts.cs</Link>- </Compile><Compile Include="..\MediaBrowser.Model\Dto\ItemCounts.cs"><Link>Dto\ItemCounts.cs</Link></Compile>diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.csindex 009068deae..bbc6195ff5 100644--- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs+++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs@@ -62,12 +62,6 @@ namespace MediaBrowser.Model.Configuration/// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>public bool IsPortAuthorized { get; set; }- /// <summary>- /// Gets or sets the item by name path.- /// </summary>- /// <value>The item by name path.</value>- public string ItemsByNamePath { get; set; }-/// <summary>/// Gets or sets the metadata path./// </summary>diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.csindex d9b06dcfd3..8f617cadfb 100644--- a/MediaBrowser.Model/Dto/BaseItemDto.cs+++ b/MediaBrowser.Model/Dto/BaseItemDto.cs@@ -792,6 +792,11 @@ namespace MediaBrowser.Model.Dto/// <value>The locked fields.</value>public List<MetadataFields> LockedFields { get; set; }+ /// <summary>+ /// Gets or sets the trailer count.+ /// </summary>+ /// <value>The trailer count.</value>+ public int? TrailerCount { get; set; }/// <summary>/// Gets or sets the movie count./// </summary>diff --git a/MediaBrowser.Model/Dto/ItemByNameCounts.cs b/MediaBrowser.Model/Dto/ItemByNameCounts.csdeleted file mode 100644index 7c51f07bd1..0000000000--- a/MediaBrowser.Model/Dto/ItemByNameCounts.cs+++ /dev/null@@ -1,63 +0,0 @@-using System;--namespace MediaBrowser.Model.Dto-{- /// <summary>- /// Class ItemByNameCounts- /// </summary>- public class ItemByNameCounts- {- public string UserId { get; set; }-- /// <summary>- /// Gets or sets the total count.- /// </summary>- /// <value>The total count.</value>- public int TotalCount { get; set; }- /// <summary>- /// Gets or sets the adult video count.- /// </summary>- /// <value>The adult video count.</value>- public int AdultVideoCount { get; set; }- /// <summary>- /// Gets or sets the movie count.- /// </summary>- /// <value>The movie count.</value>- public int MovieCount { get; set; }- /// <summary>- /// Gets or sets the series count.- /// </summary>- /// <value>The series count.</value>- public int SeriesCount { get; set; }- /// <summary>- /// Gets or sets the episode count.- /// </summary>- /// <value>The episode count.</value>- public int EpisodeCount { get; set; }- /// <summary>- /// Gets or sets the game count.- /// </summary>- /// <value>The game count.</value>- public int GameCount { get; set; }- /// <summary>- /// Gets or sets the trailer count.- /// </summary>- /// <value>The trailer count.</value>- public int TrailerCount { get; set; }- /// <summary>- /// Gets or sets the song count.- /// </summary>- /// <value>The song count.</value>- public int SongCount { get; set; }- /// <summary>- /// Gets or sets the album count.- /// </summary>- /// <value>The album count.</value>- public int AlbumCount { get; set; }- /// <summary>- /// Gets or sets the music video count.- /// </summary>- /// <value>The music video count.</value>- public int MusicVideoCount { get; set; }- }-}diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csprojindex 2500a27a82..41952963c6 100644--- a/MediaBrowser.Model/MediaBrowser.Model.csproj+++ b/MediaBrowser.Model/MediaBrowser.Model.csproj@@ -215,7 +215,6 @@<Compile Include="Dto\IItemDto.cs" /><Compile Include="Dto\ImageByNameInfo.cs" /><Compile Include="Dto\ImageInfo.cs" />- <Compile Include="Dto\ItemByNameCounts.cs" /><Compile Include="Dto\ItemCounts.cs" /><Compile Include="Dto\ItemIndex.cs" /><Compile Include="Dto\RatingType.cs" />diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.csindex 1a5c35df83..7db457c6ed 100644--- a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs+++ b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs@@ -145,7 +145,6 @@ namespace MediaBrowser.Server.Implementations.Configuration{var newConfig = (ServerConfiguration)newConfiguration;- ValidateItemByNamePath(newConfig);ValidatePathSubstitutions(newConfig);ValidateMetadataPath(newConfig);ValidateSslCertificate(newConfig);@@ -189,28 +188,6 @@ namespace MediaBrowser.Server.Implementations.Configuration}}- /// <summary>- /// Replaces the item by name path.- /// </summary>- /// <param name="newConfig">The new configuration.</param>- /// <exception cref="System.IO.DirectoryNotFoundException"></exception>- private void ValidateItemByNamePath(ServerConfiguration newConfig)- {- var newPath = newConfig.ItemsByNamePath;-- if (!string.IsNullOrWhiteSpace(newPath)- && !string.Equals(Configuration.ItemsByNamePath ?? string.Empty, newPath))- {- // Validate- if (!FileSystem.DirectoryExists(newPath))- {- throw new DirectoryNotFoundException(string.Format("{0} does not exist.", newPath));- }-- EnsureWriteAccess(newPath);- }- }-/// <summary>/// Validates the metadata path./// </summary>diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.csindex 3b63eccfc0..3ead1a8359 100644--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs@@ -457,6 +457,7 @@ namespace MediaBrowser.Server.Implementations.Dtodto.EpisodeCount = taggedItems.Count(i => i is Episode);dto.GameCount = taggedItems.Count(i => i is Game);dto.MovieCount = taggedItems.Count(i => i is Movie);+ dto.TrailerCount = taggedItems.Count(i => i is Trailer);dto.MusicVideoCount = taggedItems.Count(i => i is MusicVideo);dto.SeriesCount = taggedItems.Count(i => i is Series);dto.SongCount = taggedItems.Count(i => i is Audio);