aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels
diff options
context:
space:
mode:
authorferferga <ferferga.fer@gmail.com>2020-10-19 17:28:07 +0200
committerferferga <ferferga.fer@gmail.com>2020-10-19 17:28:07 +0200
commit9fd01fade6ac971ba72a2e7dd54e2295f23839bc (patch)
tree20a5ff4a1621e765fc93c0e53b149edb61ff3654 /MediaBrowser.Controller/Channels
parentba03ed65fe64b724b3e8b5b94b9cbe1075c61da2 (diff)
parent49ac4c4044b1777dc3a25544aead7b0b15b953e8 (diff)
Remove "download images in advance" option
Diffstat (limited to 'MediaBrowser.Controller/Channels')
-rw-r--r--MediaBrowser.Controller/Channels/Channel.cs12
-rw-r--r--MediaBrowser.Controller/Channels/ChannelItemInfo.cs13
-rw-r--r--MediaBrowser.Controller/Channels/ChannelItemResult.cs2
-rw-r--r--MediaBrowser.Controller/Channels/ChannelItemType.cs2
-rw-r--r--MediaBrowser.Controller/Channels/ChannelParentalRating.cs2
-rw-r--r--MediaBrowser.Controller/Channels/ChannelSearchInfo.cs2
-rw-r--r--MediaBrowser.Controller/Channels/IChannel.cs2
-rw-r--r--MediaBrowser.Controller/Channels/IChannelManager.cs3
-rw-r--r--MediaBrowser.Controller/Channels/IHasCacheKey.cs2
-rw-r--r--MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs2
-rw-r--r--MediaBrowser.Controller/Channels/ISearchableChannel.cs5
-rw-r--r--MediaBrowser.Controller/Channels/InternalChannelFeatures.cs22
-rw-r--r--MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs3
13 files changed, 57 insertions, 15 deletions
diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs
index cdf2ca69e..129cdb519 100644
--- a/MediaBrowser.Controller/Channels/Channel.cs
+++ b/MediaBrowser.Controller/Channels/Channel.cs
@@ -1,8 +1,12 @@
+#pragma warning disable CS1591
+
using System;
using System.Globalization;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading;
+using Jellyfin.Data.Entities;
+using Jellyfin.Data.Enums;
using MediaBrowser.Common.Progress;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Querying;
@@ -13,16 +17,18 @@ namespace MediaBrowser.Controller.Channels
{
public override bool IsVisible(User user)
{
- if (user.Policy.BlockedChannels != null)
+ if (user.GetPreference(PreferenceKind.BlockedChannels) != null)
{
- if (user.Policy.BlockedChannels.Contains(Id.ToString("N", CultureInfo.InvariantCulture), StringComparer.OrdinalIgnoreCase))
+ if (user.GetPreference(PreferenceKind.BlockedChannels).Contains(Id.ToString("N", CultureInfo.InvariantCulture), StringComparer.OrdinalIgnoreCase))
{
return false;
}
}
else
{
- if (!user.Policy.EnableAllChannels && !user.Policy.EnabledChannels.Contains(Id.ToString("N", CultureInfo.InvariantCulture), StringComparer.OrdinalIgnoreCase))
+ if (!user.HasPermission(PermissionKind.EnableAllChannels)
+ && !user.GetPreference(PreferenceKind.EnabledChannels)
+ .Contains(Id.ToString("N", CultureInfo.InvariantCulture), StringComparer.OrdinalIgnoreCase))
{
return false;
}
diff --git a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs
index aff68883b..476992cbd 100644
--- a/MediaBrowser.Controller/Channels/ChannelItemInfo.cs
+++ b/MediaBrowser.Controller/Channels/ChannelItemInfo.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using MediaBrowser.Controller.Entities;
@@ -24,7 +26,9 @@ namespace MediaBrowser.Controller.Channels
public string Overview { get; set; }
public List<string> Genres { get; set; }
+
public List<string> Studios { get; set; }
+
public List<string> Tags { get; set; }
public List<PersonInfo> People { get; set; }
@@ -34,26 +38,33 @@ namespace MediaBrowser.Controller.Channels
public long? RunTimeTicks { get; set; }
public string ImageUrl { get; set; }
+
public string OriginalTitle { get; set; }
public ChannelMediaType MediaType { get; set; }
+
public ChannelFolderType FolderType { get; set; }
public ChannelMediaContentType ContentType { get; set; }
+
public ExtraType ExtraType { get; set; }
+
public List<TrailerType> TrailerTypes { get; set; }
public Dictionary<string, string> ProviderIds { get; set; }
public DateTime? PremiereDate { get; set; }
+
public int? ProductionYear { get; set; }
public DateTime? DateCreated { get; set; }
public DateTime? StartDate { get; set; }
+
public DateTime? EndDate { get; set; }
public int? IndexNumber { get; set; }
+
public int? ParentIndexNumber { get; set; }
public List<MediaSourceInfo> MediaSources { get; set; }
@@ -63,7 +74,9 @@ namespace MediaBrowser.Controller.Channels
public List<string> Artists { get; set; }
public List<string> AlbumArtists { get; set; }
+
public bool IsLiveStream { get; set; }
+
public string Etag { get; set; }
public ChannelItemInfo()
diff --git a/MediaBrowser.Controller/Channels/ChannelItemResult.cs b/MediaBrowser.Controller/Channels/ChannelItemResult.cs
index c194c8e48..cee7b2003 100644
--- a/MediaBrowser.Controller/Channels/ChannelItemResult.cs
+++ b/MediaBrowser.Controller/Channels/ChannelItemResult.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
namespace MediaBrowser.Controller.Channels
diff --git a/MediaBrowser.Controller/Channels/ChannelItemType.cs b/MediaBrowser.Controller/Channels/ChannelItemType.cs
index 833ae75fe..3ce920e23 100644
--- a/MediaBrowser.Controller/Channels/ChannelItemType.cs
+++ b/MediaBrowser.Controller/Channels/ChannelItemType.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
namespace MediaBrowser.Controller.Channels
{
public enum ChannelItemType
diff --git a/MediaBrowser.Controller/Channels/ChannelParentalRating.cs b/MediaBrowser.Controller/Channels/ChannelParentalRating.cs
index 1d189446d..f77d81c16 100644
--- a/MediaBrowser.Controller/Channels/ChannelParentalRating.cs
+++ b/MediaBrowser.Controller/Channels/ChannelParentalRating.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
namespace MediaBrowser.Controller.Channels
{
public enum ChannelParentalRating
diff --git a/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs b/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs
index c02055b90..32469d4d7 100644
--- a/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs
+++ b/MediaBrowser.Controller/Channels/ChannelSearchInfo.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
namespace MediaBrowser.Controller.Channels
{
public class ChannelSearchInfo
diff --git a/MediaBrowser.Controller/Channels/IChannel.cs b/MediaBrowser.Controller/Channels/IChannel.cs
index c44e20d1a..2c0eadf95 100644
--- a/MediaBrowser.Controller/Channels/IChannel.cs
+++ b/MediaBrowser.Controller/Channels/IChannel.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Controller/Channels/IChannelManager.cs b/MediaBrowser.Controller/Channels/IChannelManager.cs
index df508fbe2..9a9d22d33 100644
--- a/MediaBrowser.Controller/Channels/IChannelManager.cs
+++ b/MediaBrowser.Controller/Channels/IChannelManager.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System;
using System.Collections.Generic;
using System.Threading;
@@ -31,6 +33,7 @@ namespace MediaBrowser.Controller.Channels
ChannelFeatures[] GetAllChannelFeatures();
bool EnableMediaSourceDisplay(BaseItem item);
+
bool CanDelete(BaseItem item);
Task DeleteItem(BaseItem item);
diff --git a/MediaBrowser.Controller/Channels/IHasCacheKey.cs b/MediaBrowser.Controller/Channels/IHasCacheKey.cs
index d86ad0dba..bf895a0ec 100644
--- a/MediaBrowser.Controller/Channels/IHasCacheKey.cs
+++ b/MediaBrowser.Controller/Channels/IHasCacheKey.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
namespace MediaBrowser.Controller.Channels
{
public interface IHasCacheKey
diff --git a/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs b/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs
index deee46ff7..589295543 100644
--- a/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs
+++ b/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
diff --git a/MediaBrowser.Controller/Channels/ISearchableChannel.cs b/MediaBrowser.Controller/Channels/ISearchableChannel.cs
index d5b76a160..b627ca1c2 100644
--- a/MediaBrowser.Controller/Channels/ISearchableChannel.cs
+++ b/MediaBrowser.Controller/Channels/ISearchableChannel.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -30,17 +32,16 @@ namespace MediaBrowser.Controller.Channels
public interface ISupportsDelete
{
bool CanDelete(BaseItem item);
+
Task DeleteItem(string id, CancellationToken cancellationToken);
}
public interface IDisableMediaSourceDisplay
{
-
}
public interface ISupportsMediaProbe
{
-
}
public interface IHasFolderAttributes
diff --git a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
index 60455e68a..137f5d095 100644
--- a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
+++ b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
@@ -1,3 +1,5 @@
+#pragma warning disable CS1591
+
using System.Collections.Generic;
using MediaBrowser.Model.Channels;
@@ -5,6 +7,14 @@ namespace MediaBrowser.Controller.Channels
{
public class InternalChannelFeatures
{
+ public InternalChannelFeatures()
+ {
+ MediaTypes = new List<ChannelMediaType>();
+ ContentTypes = new List<ChannelMediaContentType>();
+
+ DefaultSortFields = new List<ChannelItemSortField>();
+ }
+
/// <summary>
/// Gets or sets the media types.
/// </summary>
@@ -18,7 +28,7 @@ namespace MediaBrowser.Controller.Channels
public List<ChannelMediaContentType> ContentTypes { get; set; }
/// <summary>
- /// Represents the maximum number of records the channel allows retrieving at a time
+ /// Represents the maximum number of records the channel allows retrieving at a time.
/// </summary>
public int? MaxPageSize { get; set; }
@@ -32,6 +42,7 @@ namespace MediaBrowser.Controller.Channels
/// Indicates if a sort ascending/descending toggle is supported or not.
/// </summary>
public bool SupportsSortOrderToggle { get; set; }
+
/// <summary>
/// Gets or sets the automatic refresh levels.
/// </summary>
@@ -43,18 +54,11 @@ namespace MediaBrowser.Controller.Channels
/// </summary>
/// <value>The daily download limit.</value>
public int? DailyDownloadLimit { get; set; }
+
/// <summary>
/// Gets or sets a value indicating whether [supports downloading].
/// </summary>
/// <value><c>true</c> if [supports downloading]; otherwise, <c>false</c>.</value>
public bool SupportsContentDownloading { get; set; }
-
- public InternalChannelFeatures()
- {
- MediaTypes = new List<ChannelMediaType>();
- ContentTypes = new List<ChannelMediaContentType>();
-
- DefaultSortFields = new List<ChannelItemSortField>();
- }
}
}
diff --git a/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs b/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs
index 6d5ca75af..7e9bb28ed 100644
--- a/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs
+++ b/MediaBrowser.Controller/Channels/InternalChannelItemQuery.cs
@@ -1,7 +1,8 @@
+#pragma warning disable CS1591
+
using System;
using MediaBrowser.Model.Channels;
-
namespace MediaBrowser.Controller.Channels
{
public class InternalChannelItemQuery