#680 - improve name comparisons

This commit is contained in:
Luke Pulverenti
2014-01-20 14:55:49 -05:00
parent d2ed436a6f
commit 92c76de2ba
6 changed files with 101 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
@@ -91,6 +92,16 @@ namespace MediaBrowser.Model.LiveTv
/// <value>The original primary image aspect ratio.</value>
public double? OriginalPrimaryImageAspectRatio { get; set; }
/// <summary>
/// Gets a value indicating whether this instance has primary image.
/// </summary>
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool HasPrimaryImage
{
get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
}
public ChannelInfoDto()
{
ImageTags = new Dictionary<ImageType, Guid>();

View File

@@ -1,5 +1,6 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
@@ -190,6 +191,16 @@ namespace MediaBrowser.Model.LiveTv
/// <value><c>true</c> if this instance is premiere; otherwise, <c>false</c>.</value>
public bool IsPremiere { get; set; }
/// <summary>
/// Gets a value indicating whether this instance has primary image.
/// </summary>
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool HasPrimaryImage
{
get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
}
public ProgramInfoDto()
{
Genres = new List<string>();

View File

@@ -1,4 +1,5 @@
using System.Diagnostics;
using System.Runtime.Serialization;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Entities;
using System;
@@ -224,6 +225,16 @@ namespace MediaBrowser.Model.LiveTv
/// <value>The user data.</value>
public UserItemDataDto UserData { get; set; }
/// <summary>
/// Gets a value indicating whether this instance has primary image.
/// </summary>
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool HasPrimaryImage
{
get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
}
/// <summary>
/// Gets or sets the type.
/// </summary>

View File

@@ -2,6 +2,8 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Runtime.Serialization;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Model.LiveTv
{
@@ -133,8 +135,25 @@ namespace MediaBrowser.Model.LiveTv
/// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value>
public bool IsPostPaddingRequired { get; set; }
/// <summary>
/// Gets or sets the image tags.
/// </summary>
/// <value>The image tags.</value>
public Dictionary<ImageType, Guid> ImageTags { get; set; }
/// <summary>
/// Gets a value indicating whether this instance has primary image.
/// </summary>
/// <value><c>true</c> if this instance has primary image; otherwise, <c>false</c>.</value>
[IgnoreDataMember]
public bool HasPrimaryImage
{
get { return ImageTags != null && ImageTags.ContainsKey(ImageType.Primary); }
}
public SeriesTimerInfoDto()
{
ImageTags = new Dictionary<ImageType, Guid>();
Days = new List<DayOfWeek>();
}

View File

@@ -130,6 +130,9 @@ namespace MediaBrowser.Model.LiveTv
/// <value>The program information.</value>
public ProgramInfoDto ProgramInfo { get; set; }
/// <summary>
/// Occurs when a property value changes.
/// </summary>
public event PropertyChangedEventHandler PropertyChanged;
}
}