Override FindItemById in Movie to search special features
This commit is contained in:
parent
278cf89a88
commit
0a16aeb448
|
@ -1,4 +1,6 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using MediaBrowser.Model.Entities;
|
using MediaBrowser.Model.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Movies.Entities
|
namespace MediaBrowser.Movies.Entities
|
||||||
|
@ -6,5 +8,25 @@ namespace MediaBrowser.Movies.Entities
|
||||||
public class Movie : Video
|
public class Movie : Video
|
||||||
{
|
{
|
||||||
public IEnumerable<Video> SpecialFeatures { get; set; }
|
public IEnumerable<Video> SpecialFeatures { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Finds an item by ID, recursively
|
||||||
|
/// </summary>
|
||||||
|
public override BaseItem FindItemById(Guid id)
|
||||||
|
{
|
||||||
|
var item = base.FindItemById(id);
|
||||||
|
|
||||||
|
if (item != null)
|
||||||
|
{
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (SpecialFeatures != null)
|
||||||
|
{
|
||||||
|
return SpecialFeatures.FirstOrDefault(i => i.Id == id);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user