瀏覽代碼

update prompt dialog

Luke Pulverenti 8 年之前
父節點
當前提交
efebc78cf5

+ 2 - 1
MediaBrowser.Server.Implementations/LiveTv/Listings/SchedulesDirect.cs

@@ -785,9 +785,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.Listings
             get { return "Schedules Direct"; }
         }
 
+        public static string TypeName = "SchedulesDirect";
         public string Type
         {
-            get { return "SchedulesDirect"; }
+            get { return TypeName; }
         }
 
         private async Task<bool> HasLineup(ListingsProviderInfo info, CancellationToken cancellationToken)

+ 13 - 1
MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs

@@ -35,6 +35,7 @@ using MediaBrowser.Common.Security;
 using MediaBrowser.Controller.Entities.Movies;
 using MediaBrowser.Controller.Entities.TV;
 using MediaBrowser.Model.Events;
+using MediaBrowser.Server.Implementations.LiveTv.Listings;
 
 namespace MediaBrowser.Server.Implementations.LiveTv
 {
@@ -1436,7 +1437,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
             {
                 if (query.IsMovie.Value)
                 {
-                    includeItemTypes.Add(typeof (Movie).Name);
+                    includeItemTypes.Add(typeof(Movie).Name);
                 }
                 else
                 {
@@ -2802,6 +2803,17 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 feature = "embytvseriesrecordings";
             }
 
+            var config = GetConfiguration();
+            if (config.TunerHosts.Count(i => i.IsEnabled) > 0 &&
+                config.ListingProviders.Count(i => (i.EnableAllTuners || i.EnabledTuners.Length > 0) && string.Equals(i.Type, SchedulesDirect.TypeName, StringComparison.OrdinalIgnoreCase)) > 0)
+            {
+                return Task.FromResult(new MBRegistrationRecord
+                {
+                    IsRegistered = true,
+                    IsValid = true
+                });
+            }
+
             return _security.GetRegistrationStatus(feature);
         }