Procházet zdrojové kódy

Added VideoType.ISO and trimmed Person output size

LukePulverenti Luke Pulverenti luke pulverenti před 13 roky
rodič
revize
977f8e970a

+ 4 - 2
MediaBrowser.Api/ApiService.cs

@@ -206,7 +206,9 @@ namespace MediaBrowser.Api
                 {
                     BaseItemPerson baseItemPerson = new BaseItemPerson();
 
-                    baseItemPerson.PersonInfo = p;
+                    baseItemPerson.Name = p.Name;
+                    baseItemPerson.Overview = p.Overview;
+                    baseItemPerson.Type = p.Type;
 
                     Person ibnObject = entities.First(i => i.Name.Equals(p.Name, StringComparison.OrdinalIgnoreCase));
 
@@ -263,7 +265,7 @@ namespace MediaBrowser.Api
             {
                 Id = entity.Id,
                 BaseItemCount = itemCount,
-                HasPrimaryImage = !string.IsNullOrEmpty(entity.PrimaryImagePath),
+                HasImage = !string.IsNullOrEmpty(entity.PrimaryImagePath),
                 Name = entity.Name
             };
         }

+ 3 - 1
MediaBrowser.Controller/Resolvers/VideoResolver.cs

@@ -30,9 +30,11 @@ namespace MediaBrowser.Controller.Resolvers
             {
                 if (IsVideoFile(args.Path))
                 {
+                    VideoType type = Path.GetExtension(args.Path).EndsWith("", System.StringComparison.OrdinalIgnoreCase) ? VideoType.Iso : VideoType.VideoFile;
+
                     return new T()
                     {
-                        VideoType = VideoType.VideoFile,
+                        VideoType = type,
                         Path = args.Path
                     };
                 }

+ 4 - 2
MediaBrowser.Model/DTO/IBNItem.cs

@@ -18,7 +18,7 @@ namespace MediaBrowser.Model.DTO
         /// </summary>
         public Guid Id { get; set; }
 
-        public bool HasPrimaryImage { get; set; }
+        public bool HasImage { get; set; }
 
         /// <summary>
         /// The number of items that have the genre, year, studio, etc
@@ -31,7 +31,9 @@ namespace MediaBrowser.Model.DTO
     /// </summary>
     public class BaseItemPerson
     {
-        public PersonInfo PersonInfo { get; set; }
+        public string Name { get; set; }
+        public string Overview { get; set; }
+        public string Type { get; set; }
         public bool HasImage { get; set; }
     }
 

+ 1 - 0
MediaBrowser.Model/Entities/Video.cs

@@ -37,6 +37,7 @@ namespace MediaBrowser.Model.Entities
     public enum VideoType
     {
         VideoFile,
+        Iso,
         DVD,
         BluRay
     }