mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-09 07:43:03 +01:00
add channel downloading settings
This commit is contained in:
@@ -28,6 +28,11 @@ namespace MediaBrowser.Controller.Channels
|
||||
return config.BlockUnratedItems.Contains(UnratedItem.ChannelContent);
|
||||
}
|
||||
|
||||
public override string GetUserDataKey()
|
||||
{
|
||||
return ExternalId;
|
||||
}
|
||||
|
||||
public override bool SupportsLocalMetadata
|
||||
{
|
||||
get
|
||||
|
||||
@@ -35,5 +35,10 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
public override string GetUserDataKey()
|
||||
{
|
||||
return ExternalId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
@@ -27,7 +28,7 @@ namespace MediaBrowser.Controller.Channels
|
||||
|
||||
public ChannelMediaInfo()
|
||||
{
|
||||
RequiredHttpHeaders = new Dictionary<string, string>();
|
||||
RequiredHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
IsRemote = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace MediaBrowser.Controller.Channels
|
||||
}
|
||||
}
|
||||
|
||||
return base.GetUserDataKey();
|
||||
return ExternalId;
|
||||
}
|
||||
|
||||
protected override bool GetBlockUnratedValue(UserConfiguration config)
|
||||
|
||||
@@ -49,6 +49,14 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <returns>Task{IEnumerable{ChannelItemInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelItemInfo>> Search(ChannelSearchInfo searchInfo, User user, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all media.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{ChannelItemResult}.</returns>
|
||||
Task<ChannelItemResult> GetAllMedia(InternalAllChannelMediaQuery query, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
/// </summary>
|
||||
|
||||
@@ -16,6 +16,12 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <param name="factories">The factories.</param>
|
||||
void AddParts(IEnumerable<IChannel> channels, IEnumerable<IChannelFactory> factories);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel download path.
|
||||
/// </summary>
|
||||
/// <value>The channel download path.</value>
|
||||
string ChannelDownloadPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel features.
|
||||
/// </summary>
|
||||
@@ -23,6 +29,12 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <returns>ChannelFeatures.</returns>
|
||||
ChannelFeatures GetChannelFeatures(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all channel features.
|
||||
/// </summary>
|
||||
/// <returns>IEnumerable{ChannelFeatures}.</returns>
|
||||
IEnumerable<ChannelFeatures> GetAllChannelFeatures();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel.
|
||||
/// </summary>
|
||||
@@ -38,6 +50,14 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <returns>Task{QueryResult{BaseItemDto}}.</returns>
|
||||
Task<QueryResult<BaseItemDto>> GetChannels(ChannelQuery query, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all media.
|
||||
/// </summary>
|
||||
/// <param name="query">The query.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{QueryResult{BaseItemDto}}.</returns>
|
||||
Task<QueryResult<BaseItemDto>> GetAllMedia(AllChannelMediaQuery query, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel items.
|
||||
/// </summary>
|
||||
@@ -52,6 +72,6 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task{IEnumerable{ChannelMediaInfo}}.</returns>
|
||||
Task<IEnumerable<ChannelMediaInfo>> GetChannelItemMediaSources(string id, CancellationToken cancellationToken);
|
||||
Task<IEnumerable<MediaSourceInfo>> GetChannelItemMediaSources(string id, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
bool IsInfiniteStream { get; set; }
|
||||
|
||||
long? RunTimeTicks { get; set; }
|
||||
string MediaType { get; }
|
||||
|
||||
ChannelMediaContentType ContentType { get; set; }
|
||||
|
||||
List<ChannelMediaInfo> ChannelMediaSources { get; set; }
|
||||
|
||||
@@ -11,6 +11,12 @@ namespace MediaBrowser.Controller.Channels
|
||||
/// <value><c>true</c> if this instance can search; otherwise, <c>false</c>.</value>
|
||||
public bool CanSearch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can get all media.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can get all media; otherwise, <c>false</c>.</value>
|
||||
public bool CanGetAllMedia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media types.
|
||||
/// </summary>
|
||||
|
||||
@@ -17,4 +17,9 @@ namespace MediaBrowser.Controller.Channels
|
||||
|
||||
public bool SortDescending { get; set; }
|
||||
}
|
||||
|
||||
public class InternalAllChannelMediaQuery
|
||||
{
|
||||
public User User { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user