diff --git a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj index 5dcfded6f0..54fdc64005 100644 --- a/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj +++ b/MediaBrowser.Model.Portable/MediaBrowser.Model.Portable.csproj @@ -470,9 +470,6 @@ Dto\ImageOptions.cs - - Dto\ItemByNameCounts.cs - Dto\ItemCounts.cs diff --git a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj index 6c484ffc94..473186a46e 100644 --- a/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj +++ b/MediaBrowser.Model.net35/MediaBrowser.Model.net35.csproj @@ -444,9 +444,6 @@ Dto\ImageOptions.cs - - Dto\ItemByNameCounts.cs - Dto\ItemCounts.cs diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 009068deae..bbc6195ff5 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -62,12 +62,6 @@ namespace MediaBrowser.Model.Configuration /// true if this instance is port authorized; otherwise, false. public bool IsPortAuthorized { get; set; } - /// - /// Gets or sets the item by name path. - /// - /// The item by name path. - public string ItemsByNamePath { get; set; } - /// /// Gets or sets the metadata path. /// diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index d9b06dcfd3..8f617cadfb 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -792,6 +792,11 @@ namespace MediaBrowser.Model.Dto /// The locked fields. public List LockedFields { get; set; } + /// + /// Gets or sets the trailer count. + /// + /// The trailer count. + public int? TrailerCount { get; set; } /// /// Gets or sets the movie count. /// diff --git a/MediaBrowser.Model/Dto/ItemByNameCounts.cs b/MediaBrowser.Model/Dto/ItemByNameCounts.cs deleted file mode 100644 index 7c51f07bd1..0000000000 --- a/MediaBrowser.Model/Dto/ItemByNameCounts.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System; - -namespace MediaBrowser.Model.Dto -{ - /// - /// Class ItemByNameCounts - /// - public class ItemByNameCounts - { - public string UserId { get; set; } - - /// - /// Gets or sets the total count. - /// - /// The total count. - public int TotalCount { get; set; } - /// - /// Gets or sets the adult video count. - /// - /// The adult video count. - public int AdultVideoCount { get; set; } - /// - /// Gets or sets the movie count. - /// - /// The movie count. - public int MovieCount { get; set; } - /// - /// Gets or sets the series count. - /// - /// The series count. - public int SeriesCount { get; set; } - /// - /// Gets or sets the episode count. - /// - /// The episode count. - public int EpisodeCount { get; set; } - /// - /// Gets or sets the game count. - /// - /// The game count. - public int GameCount { get; set; } - /// - /// Gets or sets the trailer count. - /// - /// The trailer count. - public int TrailerCount { get; set; } - /// - /// Gets or sets the song count. - /// - /// The song count. - public int SongCount { get; set; } - /// - /// Gets or sets the album count. - /// - /// The album count. - public int AlbumCount { get; set; } - /// - /// Gets or sets the music video count. - /// - /// The music video count. - public int MusicVideoCount { get; set; } - } -} diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 2500a27a82..41952963c6 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -215,7 +215,6 @@ - diff --git a/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs b/MediaBrowser.Server.Implementations/Configuration/ServerConfigurationManager.cs index 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 } } - /// - /// Replaces the item by name path. - /// - /// The new configuration. - /// - 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); - } - } - /// /// Validates the metadata path. /// diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.cs index 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.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);