Merge pull request #17343 from mbastian77/docs/channels-xml-docs

This commit is contained in:
Bond-009
2026-07-17 13:53:27 +02:00
committed by GitHub
8 changed files with 75 additions and 17 deletions

View File

@@ -1,19 +1,29 @@
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// The result of a channel item query.
/// </summary>
public class ChannelItemResult
{
/// <summary>
/// Initializes a new instance of the <see cref="ChannelItemResult"/> class.
/// </summary>
public ChannelItemResult()
{
Items = Array.Empty<ChannelItemInfo>();
}
/// <summary>
/// Gets or sets the items.
/// </summary>
public IReadOnlyList<ChannelItemInfo> Items { get; set; }
/// <summary>
/// Gets or sets the total record count.
/// </summary>
public int? TotalRecordCount { get; set; }
}
}

View File

@@ -1,11 +1,18 @@
#pragma warning disable CS1591
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// The type of a channel item.
/// </summary>
public enum ChannelItemType
{
/// <summary>
/// The item is a media item.
/// </summary>
Media = 0,
/// <summary>
/// The item is a folder.
/// </summary>
Folder = 1
}
}

View File

@@ -1,11 +1,15 @@
#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// The request for a latest media search in a channel.
/// </summary>
public class ChannelLatestMediaSearch
{
/// <summary>
/// Gets or sets the user id.
/// </summary>
public string UserId { get; set; }
}
}

View File

@@ -1,17 +1,33 @@
#pragma warning disable CS1591
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// The parental rating of a channel.
/// </summary>
public enum ChannelParentalRating
{
/// <summary>
/// Suitable for a general audience.
/// </summary>
GeneralAudience = 0,
/// <summary>
/// Parental guidance suggested (US PG).
/// </summary>
UsPG = 1,
/// <summary>
/// Parents strongly cautioned (US PG-13).
/// </summary>
UsPG13 = 2,
/// <summary>
/// Restricted (US R).
/// </summary>
UsR = 3,
/// <summary>
/// Suitable for adults only.
/// </summary>
Adult = 4
}
}

View File

@@ -1,13 +1,20 @@
#nullable disable
#pragma warning disable CS1591
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// The request for a search in a channel.
/// </summary>
public class ChannelSearchInfo
{
/// <summary>
/// Gets or sets the search term.
/// </summary>
public string SearchTerm { get; set; }
/// <summary>
/// Gets or sets the user id.
/// </summary>
public string UserId { get; set; }
}
}

View File

@@ -1,14 +1,15 @@
#pragma warning disable CS1591
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// Interface for channels that provide a cache key.
/// </summary>
public interface IHasCacheKey
{
/// <summary>
/// Gets the cache key.
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>System.String.</returns>
/// <returns>The cache key.</returns>
string? GetCacheKey(string? userId);
}
}

View File

@@ -1,15 +1,27 @@
#pragma warning disable CS1591
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Controller.Entities;
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// Interface for channels that support deleting items.
/// </summary>
public interface ISupportsDelete
{
/// <summary>
/// Gets a value indicating whether the item can be deleted.
/// </summary>
/// <param name="item">The item.</param>
/// <returns><c>true</c> if the item can be deleted, <c>false</c> otherwise.</returns>
bool CanDelete(BaseItem item);
/// <summary>
/// Deletes the item with the provided id.
/// </summary>
/// <param name="id">The item id.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>A task representing the deletion of the item.</returns>
Task DeleteItem(string id, CancellationToken cancellationToken);
}
}

View File

@@ -1,11 +1,12 @@
#pragma warning disable CS1591
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
namespace MediaBrowser.Controller.Channels
{
/// <summary>
/// Interface for channels that support retrieving the latest media.
/// </summary>
public interface ISupportsLatestMedia
{
/// <summary>