aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities')
-rw-r--r--MediaBrowser.Controller/Entities/Audio/Audio.cs1
-rw-r--r--MediaBrowser.Controller/Entities/Photo.cs27
-rw-r--r--MediaBrowser.Controller/Entities/PhotoAlbum.cs21
-rw-r--r--MediaBrowser.Controller/Entities/TV/Episode.cs1
4 files changed, 49 insertions, 1 deletions
diff --git a/MediaBrowser.Controller/Entities/Audio/Audio.cs b/MediaBrowser.Controller/Entities/Audio/Audio.cs
index 3ffdf744d..b13403bbf 100644
--- a/MediaBrowser.Controller/Entities/Audio/Audio.cs
+++ b/MediaBrowser.Controller/Entities/Audio/Audio.cs
@@ -77,6 +77,7 @@ namespace MediaBrowser.Controller.Entities.Audio
}
}
+ [IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get
diff --git a/MediaBrowser.Controller/Entities/Photo.cs b/MediaBrowser.Controller/Entities/Photo.cs
index aa9e63791..1f38de9a3 100644
--- a/MediaBrowser.Controller/Entities/Photo.cs
+++ b/MediaBrowser.Controller/Entities/Photo.cs
@@ -1,5 +1,8 @@
-using MediaBrowser.Model.Drawing;
+using MediaBrowser.Model.Configuration;
+using MediaBrowser.Model.Drawing;
using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
namespace MediaBrowser.Controller.Entities
{
@@ -14,6 +17,14 @@ namespace MediaBrowser.Controller.Entities
Taglines = new List<string>();
}
+ public override bool SupportsLocalMetadata
+ {
+ get
+ {
+ return false;
+ }
+ }
+
public override string MediaType
{
get
@@ -22,6 +33,15 @@ namespace MediaBrowser.Controller.Entities
}
}
+ [IgnoreDataMember]
+ public override Folder LatestItemsIndexContainer
+ {
+ get
+ {
+ return Parents.OfType<PhotoAlbum>().FirstOrDefault();
+ }
+ }
+
public int? Width { get; set; }
public int? Height { get; set; }
public string CameraMake { get; set; }
@@ -32,5 +52,10 @@ namespace MediaBrowser.Controller.Entities
public ImageOrientation? Orientation { get; set; }
public double? Aperture { get; set; }
public double? ShutterSpeed { get; set; }
+
+ protected override bool GetBlockUnratedValue(UserConfiguration config)
+ {
+ return config.BlockUnratedItems.Contains(UnratedItem.Other);
+ }
}
}
diff --git a/MediaBrowser.Controller/Entities/PhotoAlbum.cs b/MediaBrowser.Controller/Entities/PhotoAlbum.cs
new file mode 100644
index 000000000..7af4109f3
--- /dev/null
+++ b/MediaBrowser.Controller/Entities/PhotoAlbum.cs
@@ -0,0 +1,21 @@
+using MediaBrowser.Model.Configuration;
+using System.Linq;
+
+namespace MediaBrowser.Controller.Entities
+{
+ public class PhotoAlbum : Folder
+ {
+ public override bool SupportsLocalMetadata
+ {
+ get
+ {
+ return false;
+ }
+ }
+
+ protected override bool GetBlockUnratedValue(UserConfiguration config)
+ {
+ return config.BlockUnratedItems.Contains(UnratedItem.Other);
+ }
+ }
+}
diff --git a/MediaBrowser.Controller/Entities/TV/Episode.cs b/MediaBrowser.Controller/Entities/TV/Episode.cs
index 70577bbfd..b95c7df9c 100644
--- a/MediaBrowser.Controller/Entities/TV/Episode.cs
+++ b/MediaBrowser.Controller/Entities/TV/Episode.cs
@@ -95,6 +95,7 @@ namespace MediaBrowser.Controller.Entities.TV
}
}
+ [IgnoreDataMember]
public override Folder LatestItemsIndexContainer
{
get