Browse Source

removed dead code

Luke Pulverenti 9 years ago
parent
commit
77e36768e4

+ 0 - 3
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>

+ 0 - 3
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>

+ 0 - 6
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>

+ 5 - 0
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>

+ 0 - 63
MediaBrowser.Model/Dto/ItemByNameCounts.cs

@@ -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; }
-    }
-}

+ 0 - 1
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" />

+ 0 - 23
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>

+ 1 - 0
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);