mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-18 14:46:46 +01:00
Merge pull request #16853 from jtvhd6/fix/ca1819-channel-features
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
Fix CA1819 warnings in ChannelFeatures by using IReadOnlyList
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Channels
|
||||
{
|
||||
@@ -8,9 +9,9 @@ namespace MediaBrowser.Model.Channels
|
||||
{
|
||||
public ChannelFeatures(string name, Guid id)
|
||||
{
|
||||
MediaTypes = Array.Empty<ChannelMediaType>();
|
||||
ContentTypes = Array.Empty<ChannelMediaContentType>();
|
||||
DefaultSortFields = Array.Empty<ChannelItemSortField>();
|
||||
MediaTypes = [];
|
||||
ContentTypes = [];
|
||||
DefaultSortFields = [];
|
||||
|
||||
Name = name;
|
||||
Id = id;
|
||||
@@ -38,13 +39,13 @@ namespace MediaBrowser.Model.Channels
|
||||
/// Gets or sets the media types.
|
||||
/// </summary>
|
||||
/// <value>The media types.</value>
|
||||
public ChannelMediaType[] MediaTypes { get; set; }
|
||||
public IReadOnlyList<ChannelMediaType> MediaTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content types.
|
||||
/// </summary>
|
||||
/// <value>The content types.</value>
|
||||
public ChannelMediaContentType[] ContentTypes { get; set; }
|
||||
public IReadOnlyList<ChannelMediaContentType> ContentTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of records the channel allows retrieving at a time.
|
||||
@@ -61,7 +62,7 @@ namespace MediaBrowser.Model.Channels
|
||||
/// Gets or sets the default sort orders.
|
||||
/// </summary>
|
||||
/// <value>The default sort orders.</value>
|
||||
public ChannelItemSortField[] DefaultSortFields { get; set; }
|
||||
public IReadOnlyList<ChannelItemSortField> DefaultSortFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether a sort ascending/descending toggle is supported.
|
||||
|
||||
Reference in New Issue
Block a user