aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/LiveTv
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-21 10:24:29 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2014-02-21 10:24:29 -0500
commit6e5d90bafe3eca21e64b0a04deba4afee98b2cfa (patch)
tree3ceebd0584ec25cdea61ba1771100981a58bbddd /MediaBrowser.Controller/LiveTv
parentaeb43e229ab0188ef911fc76b43b8fa34b3fcb7e (diff)
rework checkboxes for block unrated items
Diffstat (limited to 'MediaBrowser.Controller/LiveTv')
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvChannel.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvProgram.cs7
-rw-r--r--MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs7
4 files changed, 28 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
index a4a85ec04..9f8d67a48 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvAudioRecording.cs
@@ -1,5 +1,7 @@
using MediaBrowser.Controller.Entities.Audio;
+using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
+using System.Linq;
namespace MediaBrowser.Controller.LiveTv
{
@@ -75,5 +77,10 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
}
+
+ protected override bool GetBlockUnratedValue(UserConfiguration config)
+ {
+ return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
index 583b90fd4..ff5d6a4d2 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvChannel.cs
@@ -1,8 +1,10 @@
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.LiveTv;
using System.Collections.Generic;
using System.Runtime.Serialization;
+using System.Linq;
namespace MediaBrowser.Controller.LiveTv
{
@@ -38,6 +40,11 @@ namespace MediaBrowser.Controller.LiveTv
}
}
+ protected override bool GetBlockUnratedValue(UserConfiguration config)
+ {
+ return config.BlockUnratedItems.Contains(UnratedItem.LiveTvChannel);
+ }
+
/// <summary>
/// Gets a value indicating whether this instance is owned item.
/// </summary>
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
index e7a501479..266eaabee 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvProgram.cs
@@ -1,9 +1,11 @@
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
+using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.LiveTv;
using System;
using System.Threading;
using System.Threading.Tasks;
+using System.Linq;
namespace MediaBrowser.Controller.LiveTv
{
@@ -196,5 +198,10 @@ namespace MediaBrowser.Controller.LiveTv
// Not great that this class has to know about that, but we'll improve that later.
return ItemRepository.SaveItem(this, cancellationToken);
}
+
+ protected override bool GetBlockUnratedValue(UserConfiguration config)
+ {
+ return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
+ }
}
}
diff --git a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
index 6e3644b4a..66de81213 100644
--- a/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
+++ b/MediaBrowser.Controller/LiveTv/LiveTvVideoRecording.cs
@@ -1,5 +1,7 @@
using MediaBrowser.Controller.Entities;
+using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
+using System.Linq;
namespace MediaBrowser.Controller.LiveTv
{
@@ -75,5 +77,10 @@ namespace MediaBrowser.Controller.LiveTv
return false;
}
}
+
+ protected override bool GetBlockUnratedValue(UserConfiguration config)
+ {
+ return config.BlockUnratedItems.Contains(UnratedItem.LiveTvProgram);
+ }
}
}