瀏覽代碼

made video size richer

Luke Pulverenti 12 年之前
父節點
當前提交
cf61bf72dc
共有 2 個文件被更改,包括 8 次插入2 次删除
  1. 7 1
      MediaBrowser.Model/Entities/MediaUrl.cs
  2. 1 1
      MediaBrowser.Providers/Movies/MovieDbProvider.cs

+ 7 - 1
MediaBrowser.Model/Entities/MediaUrl.cs

@@ -5,7 +5,13 @@ namespace MediaBrowser.Model.Entities
     {
         public string Url { get; set; }
         public string Name { get; set; }
-        public bool? IsHD { get; set; }
+        public VideoSize? VideoSize { get; set; }
         public bool IsDirectLink { get; set; }
     }
+
+    public enum VideoSize
+    {
+        StandardDefinition,
+        HighDefinition
+    }
 }

+ 1 - 1
MediaBrowser.Providers/Movies/MovieDbProvider.cs

@@ -802,7 +802,7 @@ namespace MediaBrowser.Providers.Movies
                         Url = string.Format("http://www.youtube.com/watch?{0}", i.source),
                         IsDirectLink = false,
                         Name = i.name,
-                        IsHD = string.Equals("hd", i.size, StringComparison.OrdinalIgnoreCase)
+                        VideoSize = string.Equals("hd", i.size, StringComparison.OrdinalIgnoreCase) ? VideoSize.HighDefinition : VideoSize.StandardDefinition
 
                     }).ToList();
                 }