aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Channels
diff options
context:
space:
mode:
authorPatrick Barron <barronpm@gmail.com>2021-05-21 00:09:11 -0400
committerPatrick Barron <barronpm@gmail.com>2021-05-21 00:19:07 -0400
commitb6446c06eeddae46e4ee1d6ec65182a53cd74e51 (patch)
tree3a18cb940e04cf2c2412fc52da63b5b4d0009f4c /MediaBrowser.Controller/Channels
parenta0c6f7276211ac0429877fafa400368aba1430a9 (diff)
parenta937a854f2582a8770d9ada7c24375065a21f7a5 (diff)
Merge branch 'master' into authenticationdb-efcore
# Conflicts: # Emby.Server.Implementations/Security/AuthenticationRepository.cs # Jellyfin.Server.Implementations/Security/AuthorizationContext.cs # MediaBrowser.Controller/Devices/IDeviceManager.cs
Diffstat (limited to 'MediaBrowser.Controller/Channels')
-rw-r--r--MediaBrowser.Controller/Channels/Channel.cs2
-rw-r--r--MediaBrowser.Controller/Channels/IChannelManager.cs28
-rw-r--r--MediaBrowser.Controller/Channels/IDisableMediaSourceDisplay.cs8
-rw-r--r--MediaBrowser.Controller/Channels/IHasFolderAttributes.cs9
-rw-r--r--MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs8
-rw-r--r--MediaBrowser.Controller/Channels/ISearchableChannel.cs32
-rw-r--r--MediaBrowser.Controller/Channels/ISupportsDelete.cs15
-rw-r--r--MediaBrowser.Controller/Channels/ISupportsLatestMedia.cs21
-rw-r--r--MediaBrowser.Controller/Channels/ISupportsMediaProbe.cs8
-rw-r--r--MediaBrowser.Controller/Channels/InternalChannelFeatures.cs4
10 files changed, 94 insertions, 41 deletions
diff --git a/MediaBrowser.Controller/Channels/Channel.cs b/MediaBrowser.Controller/Channels/Channel.cs
index 26c64e0da6..26a936be0c 100644
--- a/MediaBrowser.Controller/Channels/Channel.cs
+++ b/MediaBrowser.Controller/Channels/Channel.cs
@@ -84,7 +84,7 @@ namespace MediaBrowser.Controller.Channels
internal static bool IsChannelVisible(BaseItem channelItem, User user)
{
- var channel = ChannelManager.GetChannel(channelItem.ChannelId.ToString(""));
+ var channel = ChannelManager.GetChannel(channelItem.ChannelId.ToString(string.Empty));
return channel.IsVisible(user);
}
diff --git a/MediaBrowser.Controller/Channels/IChannelManager.cs b/MediaBrowser.Controller/Channels/IChannelManager.cs
index 4c5626338e..49be897ef3 100644
--- a/MediaBrowser.Controller/Channels/IChannelManager.cs
+++ b/MediaBrowser.Controller/Channels/IChannelManager.cs
@@ -51,32 +51,47 @@ namespace MediaBrowser.Controller.Channels
/// Gets the channels internal.
/// </summary>
/// <param name="query">The query.</param>
+ /// <returns>The channels.</returns>
QueryResult<Channel> GetChannelsInternal(ChannelQuery query);
/// <summary>
/// Gets the channels.
/// </summary>
/// <param name="query">The query.</param>
+ /// <returns>The channels.</returns>
QueryResult<BaseItemDto> GetChannels(ChannelQuery query);
/// <summary>
- /// Gets the latest media.
+ /// Gets the latest channel items.
/// </summary>
+ /// <param name="query">The item query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>The latest channels.</returns>
Task<QueryResult<BaseItemDto>> GetLatestChannelItems(InternalItemsQuery query, CancellationToken cancellationToken);
/// <summary>
- /// Gets the latest media.
+ /// Gets the latest channel items.
/// </summary>
+ /// <param name="query">The item query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>The latest channels.</returns>
Task<QueryResult<BaseItem>> GetLatestChannelItemsInternal(InternalItemsQuery query, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel items.
/// </summary>
+ /// <param name="query">The query.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>The channel items.</returns>
Task<QueryResult<BaseItemDto>> GetChannelItems(InternalItemsQuery query, CancellationToken cancellationToken);
/// <summary>
- /// Gets the channel items internal.
+ /// Gets the channel items.
/// </summary>
+ /// <param name="query">The query.</param>
+ /// <param name="progress">The progress to report to.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>The channel items.</returns>
Task<QueryResult<BaseItem>> GetChannelItemsInternal(InternalItemsQuery query, IProgress<double> progress, CancellationToken cancellationToken);
/// <summary>
@@ -84,9 +99,14 @@ namespace MediaBrowser.Controller.Channels
/// </summary>
/// <param name="item">The item.</param>
/// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task{IEnumerable{MediaSourceInfo}}.</returns>
+ /// <returns>The item media sources.</returns>
IEnumerable<MediaSourceInfo> GetStaticMediaSources(BaseItem item, CancellationToken cancellationToken);
+ /// <summary>
+ /// Whether the item supports media probe.
+ /// </summary>
+ /// <param name="item">The item.</param>
+ /// <returns>Whether media probe should be enabled.</returns>
bool EnableMediaProbe(BaseItem item);
}
}
diff --git a/MediaBrowser.Controller/Channels/IDisableMediaSourceDisplay.cs b/MediaBrowser.Controller/Channels/IDisableMediaSourceDisplay.cs
new file mode 100644
index 0000000000..a2dc5682dd
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/IDisableMediaSourceDisplay.cs
@@ -0,0 +1,8 @@
+#pragma warning disable CS1591
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface IDisableMediaSourceDisplay
+ {
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Channels/IHasFolderAttributes.cs b/MediaBrowser.Controller/Channels/IHasFolderAttributes.cs
new file mode 100644
index 0000000000..47277a8cc8
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/IHasFolderAttributes.cs
@@ -0,0 +1,9 @@
+#pragma warning disable CS1591
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface IHasFolderAttributes
+ {
+ string[] Attributes { get; }
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs b/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs
index 589295543c..eeaa6b622e 100644
--- a/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs
+++ b/MediaBrowser.Controller/Channels/IRequiresMediaInfoCallback.cs
@@ -1,5 +1,3 @@
-#pragma warning disable CS1591
-
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
@@ -7,11 +5,17 @@ using MediaBrowser.Model.Dto;
namespace MediaBrowser.Controller.Channels
{
+ /// <summary>
+ /// The channel requires a media info callback.
+ /// </summary>
public interface IRequiresMediaInfoCallback
{
/// <summary>
/// Gets the channel item media information.
/// </summary>
+ /// <param name="id">The channel item id.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>The enumerable of media source info.</returns>
Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaInfo(string id, CancellationToken cancellationToken);
}
}
diff --git a/MediaBrowser.Controller/Channels/ISearchableChannel.cs b/MediaBrowser.Controller/Channels/ISearchableChannel.cs
index b58446fc43..b87943a6ed 100644
--- a/MediaBrowser.Controller/Channels/ISearchableChannel.cs
+++ b/MediaBrowser.Controller/Channels/ISearchableChannel.cs
@@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
-using MediaBrowser.Controller.Entities;
namespace MediaBrowser.Controller.Channels
{
@@ -19,35 +18,4 @@ namespace MediaBrowser.Controller.Channels
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, CancellationToken cancellationToken);
}
-
- public interface ISupportsLatestMedia
- {
- /// <summary>
- /// Gets the latest media.
- /// </summary>
- /// <param name="request">The request.</param>
- /// <param name="cancellationToken">The cancellation token.</param>
- /// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
- Task<IEnumerable<ChannelItemInfo>> GetLatestMedia(ChannelLatestMediaSearch request, CancellationToken cancellationToken);
- }
-
- public interface ISupportsDelete
- {
- bool CanDelete(BaseItem item);
-
- Task DeleteItem(string id, CancellationToken cancellationToken);
- }
-
- public interface IDisableMediaSourceDisplay
- {
- }
-
- public interface ISupportsMediaProbe
- {
- }
-
- public interface IHasFolderAttributes
- {
- string[] Attributes { get; }
- }
}
diff --git a/MediaBrowser.Controller/Channels/ISupportsDelete.cs b/MediaBrowser.Controller/Channels/ISupportsDelete.cs
new file mode 100644
index 0000000000..204054374e
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/ISupportsDelete.cs
@@ -0,0 +1,15 @@
+#pragma warning disable CS1591
+
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Controller.Entities;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface ISupportsDelete
+ {
+ bool CanDelete(BaseItem item);
+
+ Task DeleteItem(string id, CancellationToken cancellationToken);
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Channels/ISupportsLatestMedia.cs b/MediaBrowser.Controller/Channels/ISupportsLatestMedia.cs
new file mode 100644
index 0000000000..dbba7cba2d
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/ISupportsLatestMedia.cs
@@ -0,0 +1,21 @@
+#nullable disable
+
+#pragma warning disable CS1591
+
+using System.Collections.Generic;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface ISupportsLatestMedia
+ {
+ /// <summary>
+ /// Gets the latest media.
+ /// </summary>
+ /// <param name="request">The request.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>The latest media.</returns>
+ Task<IEnumerable<ChannelItemInfo>> GetLatestMedia(ChannelLatestMediaSearch request, CancellationToken cancellationToken);
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Channels/ISupportsMediaProbe.cs b/MediaBrowser.Controller/Channels/ISupportsMediaProbe.cs
new file mode 100644
index 0000000000..2682de51c4
--- /dev/null
+++ b/MediaBrowser.Controller/Channels/ISupportsMediaProbe.cs
@@ -0,0 +1,8 @@
+#pragma warning disable CS1591
+
+namespace MediaBrowser.Controller.Channels
+{
+ public interface ISupportsMediaProbe
+ {
+ }
+} \ No newline at end of file
diff --git a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
index 152c653dc4..45cd08173a 100644
--- a/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
+++ b/MediaBrowser.Controller/Channels/InternalChannelFeatures.cs
@@ -30,7 +30,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.
+ /// Gets or sets the maximum number of records the channel allows retrieving at a time.
/// </summary>
public int? MaxPageSize { get; set; }
@@ -41,7 +41,7 @@ namespace MediaBrowser.Controller.Channels
public List<ChannelItemSortField> DefaultSortFields { get; set; }
/// <summary>
- /// Indicates if a sort ascending/descending toggle is supported or not.
+ /// Gets or sets a value indicating whether a sort ascending/descending toggle is supported or not.
/// </summary>
public bool SupportsSortOrderToggle { get; set; }