Przeglądaj źródła

updated live tv models

Luke Pulverenti 11 lat temu
rodzic
commit
81e59040d0

+ 3 - 33
MediaBrowser.Api/LiveTv/LiveTvService.cs

@@ -14,17 +14,12 @@ namespace MediaBrowser.Api.LiveTv
     [Api(Description = "Gets available live tv services.")]
     [Api(Description = "Gets available live tv services.")]
     public class GetServices : IReturn<List<LiveTvServiceInfo>>
     public class GetServices : IReturn<List<LiveTvServiceInfo>>
     {
     {
-        [ApiMember(Name = "ServiceName", Description = "Optional filter by service.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
-        public string ServiceName { get; set; }
     }
     }
 
 
     [Route("/LiveTv/Channels", "GET")]
     [Route("/LiveTv/Channels", "GET")]
     [Api(Description = "Gets available live tv channels.")]
     [Api(Description = "Gets available live tv channels.")]
     public class GetChannels : IReturn<QueryResult<ChannelInfoDto>>
     public class GetChannels : IReturn<QueryResult<ChannelInfoDto>>
     {
     {
-        [ApiMember(Name = "ServiceName", Description = "Optional filter by service.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
-        public string ServiceName { get; set; }
-
         [ApiMember(Name = "Type", Description = "Optional filter by channel type.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         [ApiMember(Name = "Type", Description = "Optional filter by channel type.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         public ChannelType? Type { get; set; }
         public ChannelType? Type { get; set; }
 
 
@@ -51,9 +46,6 @@ namespace MediaBrowser.Api.LiveTv
     [Api(Description = "Gets live tv recordings")]
     [Api(Description = "Gets live tv recordings")]
     public class GetRecordings : IReturn<QueryResult<RecordingInfoDto>>
     public class GetRecordings : IReturn<QueryResult<RecordingInfoDto>>
     {
     {
-        [ApiMember(Name = "ServiceName", Description = "Optional filter by service.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
-        public string ServiceName { get; set; }
-
         [ApiMember(Name = "ChannelId", Description = "Optional filter by channel id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         [ApiMember(Name = "ChannelId", Description = "Optional filter by channel id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         public string ChannelId { get; set; }
         public string ChannelId { get; set; }
     }
     }
@@ -78,9 +70,6 @@ namespace MediaBrowser.Api.LiveTv
     [Api(Description = "Gets live tv timers")]
     [Api(Description = "Gets live tv timers")]
     public class GetTimers : IReturn<QueryResult<TimerInfoDto>>
     public class GetTimers : IReturn<QueryResult<TimerInfoDto>>
     {
     {
-        [ApiMember(Name = "ServiceName", Description = "Optional filter by service.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
-        public string ServiceName { get; set; }
-
         [ApiMember(Name = "ChannelId", Description = "Optional filter by channel id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         [ApiMember(Name = "ChannelId", Description = "Optional filter by channel id.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         public string ChannelId { get; set; }
         public string ChannelId { get; set; }
     }
     }
@@ -89,9 +78,6 @@ namespace MediaBrowser.Api.LiveTv
     [Api(Description = "Gets available live tv epgs..")]
     [Api(Description = "Gets available live tv epgs..")]
     public class GetPrograms : IReturn<QueryResult<ProgramInfoDto>>
     public class GetPrograms : IReturn<QueryResult<ProgramInfoDto>>
     {
     {
-        [ApiMember(Name = "ServiceName", Description = "Live tv service name", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
-        public string ServiceName { get; set; }
-
         [ApiMember(Name = "ChannelIds", Description = "The channels to return guide information for.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         [ApiMember(Name = "ChannelIds", Description = "The channels to return guide information for.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET")]
         public string ChannelIds { get; set; }
         public string ChannelIds { get; set; }
 
 
@@ -124,21 +110,9 @@ namespace MediaBrowser.Api.LiveTv
             _liveTvManager = liveTvManager;
             _liveTvManager = liveTvManager;
         }
         }
 
 
-        private IEnumerable<ILiveTvService> GetServices(string serviceName)
-        {
-            IEnumerable<ILiveTvService> services = _liveTvManager.Services;
-
-            if (!string.IsNullOrEmpty(serviceName))
-            {
-                services = services.Where(i => string.Equals(i.Name, serviceName, StringComparison.OrdinalIgnoreCase));
-            }
-
-            return services;
-        }
-
         public object Get(GetServices request)
         public object Get(GetServices request)
         {
         {
-            var services = GetServices(request.ServiceName)
+            var services = _liveTvManager.Services
                 .Select(GetServiceInfo)
                 .Select(GetServiceInfo)
                 .ToList();
                 .ToList();
 
 
@@ -158,7 +132,6 @@ namespace MediaBrowser.Api.LiveTv
             var result = _liveTvManager.GetChannels(new ChannelQuery
             var result = _liveTvManager.GetChannels(new ChannelQuery
             {
             {
                 ChannelType = request.Type,
                 ChannelType = request.Type,
-                ServiceName = request.ServiceName,
                 UserId = request.UserId
                 UserId = request.UserId
 
 
             });
             });
@@ -177,7 +150,6 @@ namespace MediaBrowser.Api.LiveTv
         {
         {
             var result = _liveTvManager.GetPrograms(new ProgramQuery
             var result = _liveTvManager.GetPrograms(new ProgramQuery
             {
             {
-                ServiceName = request.ServiceName,
                 ChannelIdList = (request.ChannelIds ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(),
                 ChannelIdList = (request.ChannelIds ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToArray(),
                 UserId = request.UserId
                 UserId = request.UserId
 
 
@@ -190,8 +162,7 @@ namespace MediaBrowser.Api.LiveTv
         {
         {
             var result = _liveTvManager.GetRecordings(new RecordingQuery
             var result = _liveTvManager.GetRecordings(new RecordingQuery
             {
             {
-                ChannelId = request.ChannelId,
-                ServiceName = request.ServiceName
+                ChannelId = request.ChannelId
 
 
             }, CancellationToken.None).Result;
             }, CancellationToken.None).Result;
 
 
@@ -216,8 +187,7 @@ namespace MediaBrowser.Api.LiveTv
         {
         {
             var result = _liveTvManager.GetTimers(new TimerQuery
             var result = _liveTvManager.GetTimers(new TimerQuery
             {
             {
-                ChannelId = request.ChannelId,
-                ServiceName = request.ServiceName
+                ChannelId = request.ChannelId
 
 
             }, CancellationToken.None).Result;
             }, CancellationToken.None).Result;
 
 

+ 8 - 2
MediaBrowser.Controller/LiveTv/ILiveTvManager.cs

@@ -11,6 +11,12 @@ namespace MediaBrowser.Controller.LiveTv
     /// </summary>
     /// </summary>
     public interface ILiveTvManager
     public interface ILiveTvManager
     {
     {
+        /// <summary>
+        /// Gets the active service.
+        /// </summary>
+        /// <value>The active service.</value>
+        ILiveTvService ActiveService { get; }
+
         /// <summary>
         /// <summary>
         /// Gets the services.
         /// Gets the services.
         /// </summary>
         /// </summary>
@@ -37,7 +43,7 @@ namespace MediaBrowser.Controller.LiveTv
         /// <param name="id">The identifier.</param>
         /// <param name="id">The identifier.</param>
         /// <returns>Task.</returns>
         /// <returns>Task.</returns>
         Task CancelTimer(string id);
         Task CancelTimer(string id);
-        
+
         /// <summary>
         /// <summary>
         /// Adds the parts.
         /// Adds the parts.
         /// </summary>
         /// </summary>
@@ -82,7 +88,7 @@ namespace MediaBrowser.Controller.LiveTv
         /// <param name="cancellationToken">The cancellation token.</param>
         /// <param name="cancellationToken">The cancellation token.</param>
         /// <returns>Task{QueryResult{TimerInfoDto}}.</returns>
         /// <returns>Task{QueryResult{TimerInfoDto}}.</returns>
         Task<QueryResult<TimerInfoDto>> GetTimers(TimerQuery query, CancellationToken cancellationToken);
         Task<QueryResult<TimerInfoDto>> GetTimers(TimerQuery query, CancellationToken cancellationToken);
-        
+
         /// <summary>
         /// <summary>
         /// Gets the channel.
         /// Gets the channel.
         /// </summary>
         /// </summary>

+ 11 - 10
MediaBrowser.Controller/LiveTv/ProgramInfo.cs

@@ -27,11 +27,12 @@ namespace MediaBrowser.Controller.LiveTv
         /// </summary>
         /// </summary>
         /// <value>The official rating.</value>
         /// <value>The official rating.</value>
         public string OfficialRating { get; set; }
         public string OfficialRating { get; set; }
-        
+
         /// <summary>
         /// <summary>
-        /// Description of the progam.
+        /// Gets or sets the overview.
         /// </summary>
         /// </summary>
-        public string Description { get; set; }
+        /// <value>The overview.</value>
+        public string Overview { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// The start date of the program, in UTC.
         /// The start date of the program, in UTC.
@@ -54,23 +55,23 @@ namespace MediaBrowser.Controller.LiveTv
         /// </summary>
         /// </summary>
         public List<string> Genres { get; set; }
         public List<string> Genres { get; set; }
 
 
-        /// <summary>
-        /// Gets or sets the quality.
-        /// </summary>
-        /// <value>The quality.</value>
-        public ProgramVideoQuality Quality { get; set; }
-
         /// <summary>
         /// <summary>
         /// Gets or sets the original air date.
         /// Gets or sets the original air date.
         /// </summary>
         /// </summary>
         /// <value>The original air date.</value>
         /// <value>The original air date.</value>
         public DateTime? OriginalAirDate { get; set; }
         public DateTime? OriginalAirDate { get; set; }
 
 
+        /// <summary>
+        /// Gets or sets a value indicating whether this instance is hd.
+        /// </summary>
+        /// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
+        public bool? IsHD { get; set; }
+
         /// <summary>
         /// <summary>
         /// Gets or sets the audio.
         /// Gets or sets the audio.
         /// </summary>
         /// </summary>
         /// <value>The audio.</value>
         /// <value>The audio.</value>
-        public ProgramAudio Audio { get; set; }
+        public ProgramAudio? Audio { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// Gets or sets the community rating.
         /// Gets or sets the community rating.

+ 16 - 3
MediaBrowser.Controller/LiveTv/RecordingInfo.cs

@@ -37,11 +37,12 @@ namespace MediaBrowser.Controller.LiveTv
         /// </summary>
         /// </summary>
         /// <value>The path.</value>
         /// <value>The path.</value>
         public string Path { get; set; }
         public string Path { get; set; }
-        
+
         /// <summary>
         /// <summary>
-        /// Description of the recording.
+        /// Gets or sets the overview.
         /// </summary>
         /// </summary>
-        public string Description { get; set; }
+        /// <value>The overview.</value>
+        public string Overview { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// The start date of the recording, in UTC.
         /// The start date of the recording, in UTC.
@@ -82,6 +83,18 @@ namespace MediaBrowser.Controller.LiveTv
         /// <value>The episode title.</value>
         /// <value>The episode title.</value>
         public string EpisodeTitle { get; set; }
         public string EpisodeTitle { get; set; }
 
 
+        /// <summary>
+        /// Gets or sets a value indicating whether this instance is hd.
+        /// </summary>
+        /// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
+        public bool? IsHD { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio.
+        /// </summary>
+        /// <value>The audio.</value>
+        public ProgramAudio? Audio { get; set; }
+
         /// <summary>
         /// <summary>
         /// Gets or sets the official rating.
         /// Gets or sets the official rating.
         /// </summary>
         /// </summary>

+ 18 - 6
MediaBrowser.Controller/LiveTv/TimerInfo.cs

@@ -59,15 +59,27 @@ namespace MediaBrowser.Controller.LiveTv
         public RecordingStatus Status { get; set; }
         public RecordingStatus Status { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets the pre padding seconds.
+        /// Gets or sets the requested pre padding seconds.
         /// </summary>
         /// </summary>
-        /// <value>The pre padding seconds.</value>
-        public int PrePaddingSeconds { get; set; }
+        /// <value>The requested pre padding seconds.</value>
+        public int RequestedPrePaddingSeconds { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets the post padding seconds.
+        /// Gets or sets the requested post padding seconds.
         /// </summary>
         /// </summary>
-        /// <value>The post padding seconds.</value>
-        public int PostPaddingSeconds { get; set; }
+        /// <value>The requested post padding seconds.</value>
+        public int RequestedPostPaddingSeconds { get; set; }
+
+        /// <summary>
+        /// Gets or sets the required pre padding seconds.
+        /// </summary>
+        /// <value>The required pre padding seconds.</value>
+        public int RequiredPrePaddingSeconds { get; set; }
+
+        /// <summary>
+        /// Gets or sets the required post padding seconds.
+        /// </summary>
+        /// <value>The required post padding seconds.</value>
+        public int RequiredPostPaddingSeconds { get; set; }
     }
     }
 }
 }

+ 0 - 6
MediaBrowser.Model/LiveTv/ChannelQuery.cs

@@ -6,12 +6,6 @@ namespace MediaBrowser.Model.LiveTv
     /// </summary>
     /// </summary>
     public class ChannelQuery
     public class ChannelQuery
     {
     {
-        /// <summary>
-        /// Gets or sets the name of the service.
-        /// </summary>
-        /// <value>The name of the service.</value>
-        public string ServiceName { get; set; }
-
         /// <summary>
         /// <summary>
         /// Gets or sets the type of the channel.
         /// Gets or sets the type of the channel.
         /// </summary>
         /// </summary>

+ 6 - 12
MediaBrowser.Model/LiveTv/ProgramInfoDto.cs

@@ -52,9 +52,9 @@ namespace MediaBrowser.Model.LiveTv
         public string Name { get; set; }
         public string Name { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Description of the progam.
+        /// Overview of the recording.
         /// </summary>
         /// </summary>
-        public string Description { get; set; }
+        public string Overview { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// The start date of the program, in UTC.
         /// The start date of the program, in UTC.
@@ -72,16 +72,16 @@ namespace MediaBrowser.Model.LiveTv
         public List<string> Genres { get; set; }
         public List<string> Genres { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets the quality.
+        /// Gets or sets a value indicating whether this instance is hd.
         /// </summary>
         /// </summary>
-        /// <value>The quality.</value>
-        public ProgramVideoQuality Quality { get; set; }
+        /// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
+        public bool? IsHD { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// Gets or sets the audio.
         /// Gets or sets the audio.
         /// </summary>
         /// </summary>
         /// <value>The audio.</value>
         /// <value>The audio.</value>
-        public ProgramAudio Audio { get; set; }
+        public ProgramAudio? Audio { get; set; }
         
         
         /// <summary>
         /// <summary>
         /// Gets or sets the original air date.
         /// Gets or sets the original air date.
@@ -107,12 +107,6 @@ namespace MediaBrowser.Model.LiveTv
         }
         }
     }
     }
 
 
-    public enum ProgramVideoQuality
-    {
-        StandardDefinition,
-        HighDefinition
-    }
-
     public enum ProgramAudio
     public enum ProgramAudio
     {
     {
         Stereo
         Stereo

+ 0 - 6
MediaBrowser.Model/LiveTv/ProgramQuery.cs

@@ -5,12 +5,6 @@
     /// </summary>
     /// </summary>
     public class ProgramQuery
     public class ProgramQuery
     {
     {
-        /// <summary>
-        /// Gets or sets the name of the service.
-        /// </summary>
-        /// <value>The name of the service.</value>
-        public string ServiceName { get; set; }
-
         /// <summary>
         /// <summary>
         /// Gets or sets the channel identifier.
         /// Gets or sets the channel identifier.
         /// </summary>
         /// </summary>

+ 14 - 2
MediaBrowser.Model/LiveTv/RecordingInfoDto.cs

@@ -44,9 +44,9 @@ namespace MediaBrowser.Model.LiveTv
         public string Path { get; set; }
         public string Path { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Description of the recording.
+        /// Overview of the recording.
         /// </summary>
         /// </summary>
-        public string Description { get; set; }
+        public string Overview { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// The start date of the recording, in UTC.
         /// The start date of the recording, in UTC.
@@ -111,6 +111,18 @@ namespace MediaBrowser.Model.LiveTv
         /// <value>The community rating.</value>
         /// <value>The community rating.</value>
         public float? CommunityRating { get; set; }
         public float? CommunityRating { get; set; }
 
 
+        /// <summary>
+        /// Gets or sets a value indicating whether this instance is hd.
+        /// </summary>
+        /// <value><c>true</c> if this instance is hd; otherwise, <c>false</c>.</value>
+        public bool? IsHD { get; set; }
+
+        /// <summary>
+        /// Gets or sets the audio.
+        /// </summary>
+        /// <value>The audio.</value>
+        public ProgramAudio? Audio { get; set; }
+
         public RecordingInfoDto()
         public RecordingInfoDto()
         {
         {
             Genres = new List<string>();
             Genres = new List<string>();

+ 0 - 12
MediaBrowser.Model/LiveTv/RecordingQuery.cs

@@ -10,12 +10,6 @@
         /// </summary>
         /// </summary>
         /// <value>The channel identifier.</value>
         /// <value>The channel identifier.</value>
         public string ChannelId { get; set; }
         public string ChannelId { get; set; }
-
-        /// <summary>
-        /// Gets or sets the name of the service.
-        /// </summary>
-        /// <value>The name of the service.</value>
-        public string ServiceName { get; set; }
     }
     }
 
 
     public class TimerQuery
     public class TimerQuery
@@ -25,11 +19,5 @@
         /// </summary>
         /// </summary>
         /// <value>The channel identifier.</value>
         /// <value>The channel identifier.</value>
         public string ChannelId { get; set; }
         public string ChannelId { get; set; }
-
-        /// <summary>
-        /// Gets or sets the name of the service.
-        /// </summary>
-        /// <value>The name of the service.</value>
-        public string ServiceName { get; set; }
     }
     }
 }
 }

+ 18 - 6
MediaBrowser.Model/LiveTv/TimerInfoDto.cs

@@ -64,16 +64,28 @@ namespace MediaBrowser.Model.LiveTv
         public string SeriesTimerId { get; set; }
         public string SeriesTimerId { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets the pre padding seconds.
+        /// Gets or sets the requested pre padding seconds.
         /// </summary>
         /// </summary>
-        /// <value>The pre padding seconds.</value>
-        public int PrePaddingSeconds { get; set; }
+        /// <value>The requested pre padding seconds.</value>
+        public int RequestedPrePaddingSeconds { get; set; }
 
 
         /// <summary>
         /// <summary>
-        /// Gets or sets the post padding seconds.
+        /// Gets or sets the requested post padding seconds.
         /// </summary>
         /// </summary>
-        /// <value>The post padding seconds.</value>
-        public int PostPaddingSeconds { get; set; }
+        /// <value>The requested post padding seconds.</value>
+        public int RequestedPostPaddingSeconds { get; set; }
+
+        /// <summary>
+        /// Gets or sets the required pre padding seconds.
+        /// </summary>
+        /// <value>The required pre padding seconds.</value>
+        public int RequiredPrePaddingSeconds { get; set; }
+
+        /// <summary>
+        /// Gets or sets the required post padding seconds.
+        /// </summary>
+        /// <value>The required post padding seconds.</value>
+        public int RequiredPostPaddingSeconds { get; set; }
 
 
         /// <summary>
         /// <summary>
         /// Gets or sets the duration ms.
         /// Gets or sets the duration ms.

+ 18 - 15
MediaBrowser.Server.Implementations/LiveTv/LiveTvManager.cs

@@ -64,6 +64,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
             get { return _services; }
             get { return _services; }
         }
         }
 
 
+        public ILiveTvService ActiveService { get; private set; }
+
         /// <summary>
         /// <summary>
         /// Adds the parts.
         /// Adds the parts.
         /// </summary>
         /// </summary>
@@ -71,6 +73,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
         public void AddParts(IEnumerable<ILiveTvService> services)
         public void AddParts(IEnumerable<ILiveTvService> services)
         {
         {
             _services.AddRange(services);
             _services.AddRange(services);
+
+            ActiveService = _services.FirstOrDefault();
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -196,7 +200,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
             return new ProgramInfoDto
             return new ProgramInfoDto
             {
             {
                 ChannelId = channel.Id.ToString("N"),
                 ChannelId = channel.Id.ToString("N"),
-                Description = program.Description,
+                Overview = program.Overview,
                 EndDate = program.EndDate,
                 EndDate = program.EndDate,
                 Genres = program.Genres,
                 Genres = program.Genres,
                 ExternalId = program.Id,
                 ExternalId = program.Id,
@@ -205,7 +209,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 ServiceName = channel.ServiceName,
                 ServiceName = channel.ServiceName,
                 StartDate = program.StartDate,
                 StartDate = program.StartDate,
                 OfficialRating = program.OfficialRating,
                 OfficialRating = program.OfficialRating,
-                Quality = program.Quality,
+                IsHD = program.IsHD,
                 OriginalAirDate = program.OriginalAirDate,
                 OriginalAirDate = program.OriginalAirDate,
                 Audio = program.Audio,
                 Audio = program.Audio,
                 CommunityRating = program.CommunityRating,
                 CommunityRating = program.CommunityRating,
@@ -285,11 +289,6 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 .OrderBy(i => i.StartDate)
                 .OrderBy(i => i.StartDate)
                 .ThenBy(i => i.EndDate);
                 .ThenBy(i => i.EndDate);
 
 
-            if (!string.IsNullOrEmpty(query.ServiceName))
-            {
-                programs = programs.Where(i => string.Equals(i.ServiceName, query.ServiceName, StringComparison.OrdinalIgnoreCase));
-            }
-
             if (query.ChannelIdList.Length > 0)
             if (query.ChannelIdList.Length > 0)
             {
             {
                 var guids = query.ChannelIdList.Select(i => new Guid(i)).ToList();
                 var guids = query.ChannelIdList.Select(i => new Guid(i)).ToList();
@@ -380,7 +379,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
             var dto = new RecordingInfoDto
             var dto = new RecordingInfoDto
             {
             {
                 ChannelName = info.ChannelName,
                 ChannelName = info.ChannelName,
-                Description = info.Description,
+                Overview = info.Overview,
                 EndDate = info.EndDate,
                 EndDate = info.EndDate,
                 Name = info.Name,
                 Name = info.Name,
                 StartDate = info.StartDate,
                 StartDate = info.StartDate,
@@ -395,7 +394,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 ChannelType = info.ChannelType,
                 ChannelType = info.ChannelType,
                 MediaType = info.ChannelType == ChannelType.Radio ? MediaType.Audio : MediaType.Video,
                 MediaType = info.ChannelType == ChannelType.Radio ? MediaType.Audio : MediaType.Video,
                 CommunityRating = info.CommunityRating,
                 CommunityRating = info.CommunityRating,
-                OfficialRating = info.OfficialRating
+                OfficialRating = info.OfficialRating,
+                Audio = info.Audio,
+                IsHD = info.IsHD
             };
             };
 
 
             var duration = info.EndDate - info.StartDate;
             var duration = info.EndDate - info.StartDate;
@@ -413,9 +414,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
         {
         {
             var list = new List<RecordingInfoDto>();
             var list = new List<RecordingInfoDto>();
 
 
-            foreach (var service in GetServices(query.ServiceName, query.ChannelId))
+            if (ActiveService != null)
             {
             {
-                var recordings = await GetRecordings(service, cancellationToken).ConfigureAwait(false);
+                var recordings = await GetRecordings(ActiveService, cancellationToken).ConfigureAwait(false);
 
 
                 list.AddRange(recordings);
                 list.AddRange(recordings);
             }
             }
@@ -466,9 +467,9 @@ namespace MediaBrowser.Server.Implementations.LiveTv
         {
         {
             var list = new List<TimerInfoDto>();
             var list = new List<TimerInfoDto>();
 
 
-            foreach (var service in GetServices(query.ServiceName, query.ChannelId))
+            if (ActiveService != null)
             {
             {
-                var timers = await GetTimers(service, cancellationToken).ConfigureAwait(false);
+                var timers = await GetTimers(ActiveService, cancellationToken).ConfigureAwait(false);
 
 
                 list.AddRange(timers);
                 list.AddRange(timers);
             }
             }
@@ -513,8 +514,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv
                 ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N"),
                 ChannelId = GetInternalChannelId(service.Name, info.ChannelId, info.ChannelName).ToString("N"),
                 Status = info.Status,
                 Status = info.Status,
                 SeriesTimerId = info.SeriesTimerId,
                 SeriesTimerId = info.SeriesTimerId,
-                PrePaddingSeconds = info.PrePaddingSeconds,
-                PostPaddingSeconds = info.PostPaddingSeconds
+                RequestedPostPaddingSeconds = info.RequestedPostPaddingSeconds,
+                RequestedPrePaddingSeconds = info.RequestedPrePaddingSeconds,
+                RequiredPostPaddingSeconds = info.RequiredPostPaddingSeconds,
+                RequiredPrePaddingSeconds = info.RequiredPrePaddingSeconds
             };
             };
 
 
             var duration = info.EndDate - info.StartDate;
             var duration = info.EndDate - info.StartDate;

+ 1 - 1
MediaBrowser.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs

@@ -53,7 +53,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
 
 
         public bool IsHidden
         public bool IsHidden
         {
         {
-            get { return _liveTvManager.Services.Count == 0; }
+            get { return _liveTvManager.ActiveService == null; }
         }
         }
     }
     }
 }
 }