aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/Photo.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-24 15:52:19 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-08-24 15:52:19 -0400
commite441e2f53db0b587c9864fe91d7008a2344d147b (patch)
treec37b2148eb277671c7ee285c73b738542f279b22 /MediaBrowser.Controller/Entities/Photo.cs
parent5e0f8fd8c486ac37e487786c10c2d3f9e1293ce8 (diff)
update active recordings
Diffstat (limited to 'MediaBrowser.Controller/Entities/Photo.cs')
-rw-r--r--MediaBrowser.Controller/Entities/Photo.cs12
1 files changed, 10 insertions, 2 deletions
diff --git a/MediaBrowser.Controller/Entities/Photo.cs b/MediaBrowser.Controller/Entities/Photo.cs
index e95ceee52..8e9eac50c 100644
--- a/MediaBrowser.Controller/Entities/Photo.cs
+++ b/MediaBrowser.Controller/Entities/Photo.cs
@@ -1,5 +1,4 @@
using MediaBrowser.Model.Drawing;
-using System.Linq;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Controller.Entities
@@ -39,7 +38,16 @@ namespace MediaBrowser.Controller.Entities
{
get
{
- return GetParents().OfType<PhotoAlbum>().FirstOrDefault();
+ var parents = GetParents();
+ foreach (var parent in parents)
+ {
+ var photoAlbum = parent as PhotoAlbum;
+ if (photoAlbum != null)
+ {
+ return photoAlbum;
+ }
+ }
+ return null;
}
}