removed genre virtualization

This commit is contained in:
Luke Pulverenti
2013-08-07 13:11:02 -04:00
parent 5225e054cd
commit d1d4bef1d1
7 changed files with 102 additions and 50 deletions

View File

@@ -1,5 +1,4 @@
using MediaBrowser.Model.Entities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
@@ -54,26 +53,6 @@ namespace MediaBrowser.Controller.Entities.Audio
get { return Parent as MusicArtist ?? UnknwonArtist; }
}
/// <summary>
/// Override to point to first child (song)
/// </summary>
/// <value>The genres.</value>
public override List<string> Genres
{
get
{
return Children
.OfType<Audio>()
.SelectMany(i => i.Genres)
.Distinct(StringComparer.OrdinalIgnoreCase)
.ToList();
}
set
{
base.Genres = value;
}
}
/// <summary>
/// Gets or sets the images.
/// </summary>

View File

@@ -1,7 +1,4 @@
using System;
using System.Linq;
using System.Collections.Generic;

namespace MediaBrowser.Controller.Entities.Audio
{
/// <summary>
@@ -9,20 +6,5 @@ namespace MediaBrowser.Controller.Entities.Audio
/// </summary>
public class MusicArtist : Folder
{
public override List<string> Genres
{
get
{
return Children
.OfType<MusicAlbum>()
.SelectMany(i => i.Genres)
.Distinct(StringComparer.OrdinalIgnoreCase)
.ToList();
}
set
{
base.Genres = value;
}
}
}
}

View File

@@ -543,7 +543,7 @@ namespace MediaBrowser.Controller.Entities
/// Gets or sets the genres.
/// </summary>
/// <value>The genres.</value>
public virtual List<string> Genres { get; set; }
public List<string> Genres { get; set; }
/// <summary>
/// Gets or sets the home page URL.