diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-19 17:55:42 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-03-19 17:55:42 -0400 |
| commit | 77e36768e4def7cb62f7cf0b855f01c15dcaf922 (patch) | |
| tree | a3bf2d6d209cf80ff4919669738235884c13ab24 | |
| parent | b97491cdad6d5df3ba2bf050321e06129d281bd0 (diff) | |
removed dead code
8 files changed, 6 insertions, 99 deletions
diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj index 5dcfded6f..54fdc6400 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.csproj index 6c484ffc9..473186a46 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.cs index 009068dea..bbc6195ff 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -63,12 +63,6 @@ namespace MediaBrowser.Model.Configuration 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> /// <value>The metadata path.</value> diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index d9b06dcfd..8f617cadf 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -793,6 +793,11 @@ namespace MediaBrowser.Model.Dto 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> /// <value>The movie count.</value> diff --git a/MediaBrowser.Model/Dto/ItemByNameCounts.cs b/MediaBrowser.Model/Dto/ItemByNameCounts.cs deleted file mode 100644 index 7c51f07bd..000000000 --- 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.csproj index 2500a27a8..41952963c 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.cs index 1a5c35df8..7db457c6e 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); @@ -190,28 +189,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> /// <param name="newConfig">The new configuration.</param> diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 3b63eccfc..3ead1a835 100644 --- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs +++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs @@ -457,6 +457,7 @@ namespace MediaBrowser.Server.Implementations.Dto dto.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); |
