fixed failing scan

This commit is contained in:
Luke Pulverenti
2014-02-01 01:18:16 -05:00
parent 67fde8c16d
commit 53776b332c
8 changed files with 17 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ namespace MediaBrowser.Controller.Entities.Audio
/// </summary>
/// <value><c>true</c> if this instance has embedded image; otherwise, <c>false</c>.</value>
public bool HasEmbeddedImage { get; set; }
/// <summary>
/// Override this to true if class should be grouped under a container in indicies
/// The container class should be defined via IndexContainer
@@ -36,10 +36,6 @@ namespace MediaBrowser.Controller.Entities.Audio
}
}
/// <summary>
/// The unknown album
/// </summary>
private static readonly MusicAlbum UnknownAlbum = new MusicAlbum { Name = "<Unknown>" };
/// <summary>
/// Override this to return the folder that should be used to construct a container
/// for this item in an index. GroupInIndex should be true as well.
@@ -50,7 +46,7 @@ namespace MediaBrowser.Controller.Entities.Audio
{
get
{
return Parent is MusicAlbum ? Parent : Album != null ? new MusicAlbum { Name = Album, PrimaryImagePath = PrimaryImagePath } : UnknownAlbum;
return Parents.OfType<MusicAlbum>().FirstOrDefault() ?? new MusicAlbum { Name = "<Unknown>" };
}
}

View File

@@ -81,7 +81,7 @@ namespace MediaBrowser.Controller.Entities
/// Gets or sets the primary image path.
/// </summary>
/// <value>The primary image path.</value>
string PrimaryImagePath { get; set; }
string PrimaryImagePath { get; }
/// <summary>
/// Gets the preferred metadata language.

View File

@@ -1,6 +1,5 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using System.Threading;
using System.Threading.Tasks;