update live tv styles

This commit is contained in:
Luke Pulverenti 2014-05-29 10:19:12 -04:00
parent 5477c61596
commit 25b5415829
7 changed files with 44 additions and 13 deletions

View File

@ -1,11 +1,10 @@
using System.ComponentModel; using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Library;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using MediaBrowser.Model.Library;
namespace MediaBrowser.Model.LiveTv namespace MediaBrowser.Model.LiveTv
{ {

View File

@ -10,13 +10,25 @@ using MediaBrowser.Model.Library;
namespace MediaBrowser.Model.LiveTv namespace MediaBrowser.Model.LiveTv
{ {
[DebuggerDisplay("Name = {Name}, StartTime = {StartDate}, EndTime = {EndDate}")] [DebuggerDisplay("Name = {Name}, StartTime = {StartDate}, EndTime = {EndDate}")]
public class ProgramInfoDto : INotifyPropertyChanged public class ProgramInfoDto : INotifyPropertyChanged, IItemDto
{ {
/// <summary> /// <summary>
/// Id of the program. /// Id of the program.
/// </summary> /// </summary>
public string Id { get; set; } public string Id { get; set; }
/// <summary>
/// Gets or sets the primary image aspect ratio.
/// </summary>
/// <value>The primary image aspect ratio.</value>
public double? PrimaryImageAspectRatio { get; set; }
/// <summary>
/// Gets or sets the original primary image aspect ratio.
/// </summary>
/// <value>The original primary image aspect ratio.</value>
public double? OriginalPrimaryImageAspectRatio { get; set; }
/// <summary> /// <summary>
/// Gets or sets the timer identifier. /// Gets or sets the timer identifier.
/// </summary> /// </summary>

View File

@ -10,13 +10,25 @@ using System.Runtime.Serialization;
namespace MediaBrowser.Model.LiveTv namespace MediaBrowser.Model.LiveTv
{ {
[DebuggerDisplay("Name = {Name}, ChannelName = {ChannelName}")] [DebuggerDisplay("Name = {Name}, ChannelName = {ChannelName}")]
public class RecordingInfoDto : INotifyPropertyChanged public class RecordingInfoDto : INotifyPropertyChanged, IItemDto
{ {
/// <summary> /// <summary>
/// Id of the recording. /// Id of the recording.
/// </summary> /// </summary>
public string Id { get; set; } public string Id { get; set; }
/// <summary>
/// Gets or sets the primary image aspect ratio.
/// </summary>
/// <value>The primary image aspect ratio.</value>
public double? PrimaryImageAspectRatio { get; set; }
/// <summary>
/// Gets or sets the original primary image aspect ratio.
/// </summary>
/// <value>The original primary image aspect ratio.</value>
public double? OriginalPrimaryImageAspectRatio { get; set; }
/// <summary> /// <summary>
/// Gets or sets the series timer identifier. /// Gets or sets the series timer identifier.
/// </summary> /// </summary>

View File

@ -2,7 +2,6 @@
using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers; using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Logging; using MediaBrowser.Model.Logging;
using MoreLinq;
using System; using System;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
@ -77,7 +76,7 @@ namespace MediaBrowser.Server.Implementations.Library.Validators
double percent = numComplete; double percent = numComplete;
percent /= people.Count; percent /= people.Count;
progress.Report(15 + 85 * percent); progress.Report(100 * percent);
} }
progress.Report(100); progress.Report(100);

View File

@ -244,6 +244,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
if (imageTag != null) if (imageTag != null)
{ {
dto.ImageTags[ImageType.Primary] = imageTag; dto.ImageTags[ImageType.Primary] = imageTag;
_dtoService.AttachPrimaryImageAspectRatio(dto, recording);
} }
if (user != null) if (user != null)
@ -331,6 +332,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv
if (imageTag != null) if (imageTag != null)
{ {
dto.ImageTags[ImageType.Primary] = imageTag; dto.ImageTags[ImageType.Primary] = imageTag;
_dtoService.AttachPrimaryImageAspectRatio(dto, info);
} }
if (currentProgram != null) if (currentProgram != null)
@ -392,6 +395,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv
if (imageTag != null) if (imageTag != null)
{ {
dto.ImageTags[ImageType.Primary] = imageTag; dto.ImageTags[ImageType.Primary] = imageTag;
_dtoService.AttachPrimaryImageAspectRatio(dto, item);
} }
if (user != null) if (user != null)

View File

@ -79,9 +79,12 @@ namespace MediaBrowser.Server.Implementations.Session
private void ResetPingTimer() private void ResetPingTimer()
{ {
var period = TimeSpan.FromSeconds(60); if (_pingTimer != null)
{
var period = TimeSpan.FromSeconds(60);
_pingTimer.Change(period, period); _pingTimer.Change(period, period);
}
} }
private Task SendMessage(string name, CancellationToken cancellationToken) private Task SendMessage(string name, CancellationToken cancellationToken)

View File

@ -165,6 +165,8 @@ namespace MediaBrowser.Server.Implementations.Session
if (disposable != null) if (disposable != null)
{ {
_logger.Debug("Disposing session controller {0}", disposable.GetType().Name);
try try
{ {
disposable.Dispose(); disposable.Dispose();