mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-08-06 06:07:05 +02:00
Cleanup compiler warnings
This commit is contained in:
parent
4f6db1bc22
commit
aedff435ad
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Emby.Naming.Common
|
||||
@ -60,7 +61,7 @@ namespace Emby.Naming.Common
|
||||
/// <summary>
|
||||
/// Gets or sets optional list of date formats used for date parsing.
|
||||
/// </summary>
|
||||
public string[] DateTimeFormats { get; set; }
|
||||
public IReadOnlyList<string> DateTimeFormats { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a <see cref="Regex"/> expressions objects (creates it if null).
|
||||
|
@ -21,8 +21,8 @@ namespace Emby.Naming.Common
|
||||
/// </summary>
|
||||
public NamingOptions()
|
||||
{
|
||||
VideoFileExtensions = new[]
|
||||
{
|
||||
VideoFileExtensions =
|
||||
[
|
||||
".001",
|
||||
".3g2",
|
||||
".3gp",
|
||||
@ -77,10 +77,10 @@ namespace Emby.Naming.Common
|
||||
".wmv",
|
||||
".wtv",
|
||||
".xvid"
|
||||
};
|
||||
];
|
||||
|
||||
VideoFlagDelimiters = new[]
|
||||
{
|
||||
VideoFlagDelimiters =
|
||||
[
|
||||
'(',
|
||||
')',
|
||||
'-',
|
||||
@ -88,15 +88,15 @@ namespace Emby.Naming.Common
|
||||
'_',
|
||||
'[',
|
||||
']'
|
||||
};
|
||||
];
|
||||
|
||||
StubFileExtensions = new[]
|
||||
{
|
||||
StubFileExtensions =
|
||||
[
|
||||
".disc"
|
||||
};
|
||||
];
|
||||
|
||||
StubTypes = new[]
|
||||
{
|
||||
StubTypes =
|
||||
[
|
||||
new StubTypeRule(
|
||||
stubType: "dvd",
|
||||
token: "dvd"),
|
||||
@ -136,32 +136,32 @@ namespace Emby.Naming.Common
|
||||
new StubTypeRule(
|
||||
stubType: "tv",
|
||||
token: "DSR")
|
||||
};
|
||||
];
|
||||
|
||||
VideoFileStackingRules = new[]
|
||||
{
|
||||
VideoFileStackingRules =
|
||||
[
|
||||
new FileStackRule(@"^(?<filename>.*?)(?:(?<=[\]\)\}])|[ _.-]+)[\(\[]?(?<parttype>cd|dvd|part|pt|dis[ck])[ _.-]*(?<number>[0-9]+)[\)\]]?(?:\.[^.]+)?$", true),
|
||||
new FileStackRule(@"^(?<filename>.*?)(?:(?<=[\]\)\}])|[ _.-]+)[\(\[]?(?<parttype>cd|dvd|part|pt|dis[ck])[ _.-]*(?<number>[a-d])[\)\]]?(?:\.[^.]+)?$", false)
|
||||
};
|
||||
];
|
||||
|
||||
CleanDateTimes = new[]
|
||||
{
|
||||
CleanDateTimes =
|
||||
[
|
||||
@"(.+[^_\,\.\(\)\[\]\-])[_\.\(\)\[\]\-](19[0-9]{2}|20[0-9]{2})(?![0-9]+|\W[0-9]{2}\W[0-9]{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19[0-9]{2}|20[0-9]{2})*",
|
||||
@"(.+[^_\,\.\(\)\[\]\-])[ _\.\(\)\[\]\-]+(19[0-9]{2}|20[0-9]{2})(?![0-9]+|\W[0-9]{2}\W[0-9]{2})([ _\,\.\(\)\[\]\-][^0-9]|).*(19[0-9]{2}|20[0-9]{2})*"
|
||||
};
|
||||
];
|
||||
|
||||
CleanStrings = new[]
|
||||
{
|
||||
CleanStrings =
|
||||
[
|
||||
@"^\s*(?<cleaned>.+?)[ _\,\.\(\)\[\]\-](3d|sbs|tab|hsbs|htab|mvc|HDR|HDC|UHD|UltraHD|4k|ac3|dts|custom|dc|divx|divx5|dsr|dsrip|dutch|dvd|dvdrip|dvdscr|dvdscreener|screener|dvdivx|cam|fragment|fs|hdtv|hdrip|hdtvrip|internal|limited|multi|subs|ntsc|ogg|ogm|pal|pdtv|proper|repack|rerip|retail|cd[1-9]|r5|bd5|bd|se|svcd|swedish|german|read.nfo|nfofix|unrated|ws|telesync|ts|telecine|tc|brrip|bdrip|480p|480i|576p|576i|720p|720i|1080p|1080i|2160p|hrhd|hrhdtv|hddvd|bluray|blu-ray|x264|x265|h264|h265|xvid|xvidvd|xxx|www.www|AAC|DTS|\[.*\])([ _\,\.\(\)\[\]\-]|$)",
|
||||
@"^(?<cleaned>.+?)(\[.*\])",
|
||||
@"^\s*(?<cleaned>.+?)\WE[0-9]+(-|~)E?[0-9]+(\W|$)",
|
||||
@"^\s*\[[^\]]+\](?!\.\w+$)\s*(?<cleaned>.+)",
|
||||
@"^\s*(?<cleaned>.+?)\s+-\s+[0-9]+\s*$",
|
||||
@"^\s*(?<cleaned>.+?)(([-._ ](trailer|sample))|-(scene|clip|behindthescenes|deleted|deletedscene|featurette|short|interview|other|extra))$"
|
||||
};
|
||||
];
|
||||
|
||||
SubtitleFileExtensions = new[]
|
||||
{
|
||||
SubtitleFileExtensions =
|
||||
[
|
||||
".ass",
|
||||
".mks",
|
||||
".sami",
|
||||
@ -171,17 +171,17 @@ namespace Emby.Naming.Common
|
||||
".sub",
|
||||
".sup",
|
||||
".vtt",
|
||||
};
|
||||
];
|
||||
|
||||
LyricFileExtensions = new[]
|
||||
{
|
||||
LyricFileExtensions =
|
||||
[
|
||||
".lrc",
|
||||
".elrc",
|
||||
".txt"
|
||||
};
|
||||
];
|
||||
|
||||
AlbumStackingPrefixes = new[]
|
||||
{
|
||||
AlbumStackingPrefixes =
|
||||
[
|
||||
"cd",
|
||||
"digital media",
|
||||
"disc",
|
||||
@ -190,10 +190,10 @@ namespace Emby.Naming.Common
|
||||
"volume",
|
||||
"part",
|
||||
"act"
|
||||
};
|
||||
];
|
||||
|
||||
ArtistSubfolders = new[]
|
||||
{
|
||||
ArtistSubfolders =
|
||||
[
|
||||
"albums",
|
||||
"broadcasts",
|
||||
"bootlegs",
|
||||
@ -208,10 +208,10 @@ namespace Emby.Naming.Common
|
||||
"soundtracks",
|
||||
"spokenwords",
|
||||
"streets"
|
||||
};
|
||||
];
|
||||
|
||||
AudioFileExtensions = new[]
|
||||
{
|
||||
AudioFileExtensions =
|
||||
[
|
||||
".669",
|
||||
".3gp",
|
||||
".aa",
|
||||
@ -291,33 +291,33 @@ namespace Emby.Naming.Common
|
||||
".xm",
|
||||
".xsp",
|
||||
".ymf"
|
||||
};
|
||||
];
|
||||
|
||||
MediaFlagDelimiters = new[]
|
||||
{
|
||||
MediaFlagDelimiters =
|
||||
[
|
||||
'.'
|
||||
};
|
||||
];
|
||||
|
||||
MediaForcedFlags = new[]
|
||||
{
|
||||
MediaForcedFlags =
|
||||
[
|
||||
"foreign",
|
||||
"forced"
|
||||
};
|
||||
];
|
||||
|
||||
MediaDefaultFlags = new[]
|
||||
{
|
||||
MediaDefaultFlags =
|
||||
[
|
||||
"default"
|
||||
};
|
||||
];
|
||||
|
||||
MediaHearingImpairedFlags = new[]
|
||||
{
|
||||
MediaHearingImpairedFlags =
|
||||
[
|
||||
"cc",
|
||||
"hi",
|
||||
"sdh"
|
||||
};
|
||||
];
|
||||
|
||||
EpisodeExpressions = new[]
|
||||
{
|
||||
EpisodeExpressions =
|
||||
[
|
||||
// *** Begin Kodi Standard Naming
|
||||
// <!-- foo.s01.e01, foo.s01_e01, S01E02 foo, S01 - E02 -->
|
||||
new EpisodeExpression(@".*(\\|\/)(?<seriesname>((?[][ ._-]*[Ee]([0-9]+))[^\\\/])*)?[Ss](?<seasonnumber>[0-9]+)[][ ._-]*[Ee](?<epnumber>[0-9]+)([^\\/]*)$")
|
||||
@ -330,23 +330,23 @@ namespace Emby.Naming.Common
|
||||
new EpisodeExpression(@"[^\\/]*?()\.?[Ee]([0-9]+)\.([^\\/]*)$"),
|
||||
new EpisodeExpression("(?<year>[0-9]{4})[._ -](?<month>[0-9]{2})[._ -](?<day>[0-9]{2})", true)
|
||||
{
|
||||
DateTimeFormats = new[]
|
||||
{
|
||||
DateTimeFormats =
|
||||
[
|
||||
"yyyy.MM.dd",
|
||||
"yyyy-MM-dd",
|
||||
"yyyy_MM_dd",
|
||||
"yyyy MM dd"
|
||||
}
|
||||
]
|
||||
},
|
||||
new EpisodeExpression("(?<day>[0-9]{2})[._ -](?<month>[0-9]{2})[._ -](?<year>[0-9]{4})", true)
|
||||
{
|
||||
DateTimeFormats = new[]
|
||||
{
|
||||
DateTimeFormats =
|
||||
[
|
||||
"dd.MM.yyyy",
|
||||
"dd-MM-yyyy",
|
||||
"dd_MM_yyyy",
|
||||
"dd MM yyyy"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
// This isn't a Kodi naming rule, but the expression below causes false episode numbers for
|
||||
@ -478,10 +478,10 @@ namespace Emby.Naming.Common
|
||||
{
|
||||
IsNamed = true
|
||||
},
|
||||
};
|
||||
];
|
||||
|
||||
VideoExtraRules = new[]
|
||||
{
|
||||
VideoExtraRules =
|
||||
[
|
||||
new ExtraRule(
|
||||
ExtraType.Trailer,
|
||||
ExtraRuleType.DirectoryName,
|
||||
@ -691,14 +691,14 @@ namespace Emby.Naming.Common
|
||||
ExtraRuleType.Suffix,
|
||||
"-other",
|
||||
MediaType.Video)
|
||||
};
|
||||
];
|
||||
|
||||
AllExtrasTypesFolderNames = VideoExtraRules
|
||||
.Where(i => i.RuleType == ExtraRuleType.DirectoryName)
|
||||
.ToDictionary(i => i.Token, i => i.ExtraType, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
Format3DRules = new[]
|
||||
{
|
||||
Format3DRules =
|
||||
[
|
||||
// Kodi rules:
|
||||
new Format3DRule(
|
||||
precedingToken: "3d",
|
||||
@ -725,10 +725,10 @@ namespace Emby.Naming.Common
|
||||
new Format3DRule("tab"),
|
||||
new Format3DRule("sbs3d"),
|
||||
new Format3DRule("mvc")
|
||||
};
|
||||
];
|
||||
|
||||
AudioBookPartsExpressions = new[]
|
||||
{
|
||||
AudioBookPartsExpressions =
|
||||
[
|
||||
// Detect specified chapters, like CH 01
|
||||
@"ch(?:apter)?[\s_-]?(?<chapter>[0-9]+)",
|
||||
// Detect specified parts, like Part 02
|
||||
@ -741,14 +741,14 @@ namespace Emby.Naming.Common
|
||||
"(?<chapter>[0-9]+)_(?<part>[0-9]+)",
|
||||
// Some audiobooks are ripped from cd's, and will be named by disk number.
|
||||
@"dis(?:c|k)[\s_-]?(?<chapter>[0-9]+)"
|
||||
};
|
||||
];
|
||||
|
||||
AudioBookNamesExpressions = new[]
|
||||
{
|
||||
AudioBookNamesExpressions =
|
||||
[
|
||||
// Detect year usually in brackets after name Batman (2020)
|
||||
@"^(?<name>.+?)\s*\(\s*(?<year>[0-9]{4})\s*\)\s*$",
|
||||
@"^\s*(?<name>[^ ].*?)\s*$"
|
||||
};
|
||||
];
|
||||
|
||||
MultipleEpisodeExpressions = new[]
|
||||
{
|
||||
|
@ -110,11 +110,11 @@ namespace Emby.Naming.TV
|
||||
if (expression.IsByDate)
|
||||
{
|
||||
DateTime date;
|
||||
if (expression.DateTimeFormats.Length > 0)
|
||||
if (expression.DateTimeFormats.Count > 0)
|
||||
{
|
||||
if (DateTime.TryParseExact(
|
||||
match.Groups[0].ValueSpan,
|
||||
expression.DateTimeFormats,
|
||||
expression.DateTimeFormats.ToArray(),
|
||||
CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.None,
|
||||
out date))
|
||||
|
@ -7,7 +7,9 @@ namespace Emby.Naming.Video
|
||||
/// <summary>
|
||||
/// Object holding list of files paths with additional information.
|
||||
/// </summary>
|
||||
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
|
||||
public class FileStack
|
||||
#pragma warning restore CA1711 // Identifiers should not have incorrect suffix
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FileStack"/> class.
|
||||
|
@ -132,7 +132,7 @@ namespace Emby.Naming.Video
|
||||
}
|
||||
}
|
||||
|
||||
private class StackMetadata
|
||||
private sealed class StackMetadata
|
||||
{
|
||||
public StackMetadata(bool isDirectory, bool isNumerical, string partType)
|
||||
{
|
||||
|
@ -121,7 +121,9 @@ namespace Emby.Server.Implementations
|
||||
private readonly IConfiguration _startupConfig;
|
||||
private readonly IXmlSerializer _xmlSerializer;
|
||||
private readonly IStartupOptions _startupOptions;
|
||||
#pragma warning disable CA2213 // Disposable fields should be disposed
|
||||
private readonly PluginManager _pluginManager;
|
||||
#pragma warning restore CA2213 // Disposable fields should be disposed
|
||||
|
||||
private List<Type> _creatingInstances;
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ namespace Emby.Server.Implementations.Dto
|
||||
|
||||
if (options.ContainsField(ItemFields.Chapters))
|
||||
{
|
||||
dto.Chapters = _chapterManager.GetChapters(item.Id).ToList();
|
||||
dto.Chapters = _chapterManager.GetChapters(item.Id).ToArray();
|
||||
}
|
||||
|
||||
if (options.ContainsField(ItemFields.Trickplay))
|
||||
|
@ -39,7 +39,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||
|
||||
public MultiItemResolverResult ResolveMultiple(
|
||||
Folder parent,
|
||||
List<FileSystemMetadata> files,
|
||||
IReadOnlyList<FileSystemMetadata> files,
|
||||
CollectionType? collectionType,
|
||||
IDirectoryService directoryService)
|
||||
{
|
||||
@ -58,7 +58,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||
|
||||
private MultiItemResolverResult ResolveMultipleInternal(
|
||||
Folder parent,
|
||||
List<FileSystemMetadata> files,
|
||||
IReadOnlyList<FileSystemMetadata> files,
|
||||
CollectionType? collectionType)
|
||||
{
|
||||
if (collectionType == CollectionType.books)
|
||||
@ -179,7 +179,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
|
||||
var result = new MultiItemResolverResult
|
||||
{
|
||||
ExtraFiles = leftOver,
|
||||
Items = new List<BaseItem>()
|
||||
Items = []
|
||||
};
|
||||
|
||||
var isInMixedFolder = resolverResult.Count > 1 || (parent is not null && parent.IsTopParent);
|
||||
|
@ -29,14 +29,14 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||
{
|
||||
private readonly IImageProcessor _imageProcessor;
|
||||
|
||||
private static readonly CollectionType[] _validCollectionTypes = new[]
|
||||
{
|
||||
private static readonly CollectionType[] _validCollectionTypes =
|
||||
[
|
||||
CollectionType.movies,
|
||||
CollectionType.homevideos,
|
||||
CollectionType.musicvideos,
|
||||
CollectionType.tvshows,
|
||||
CollectionType.photos
|
||||
};
|
||||
];
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MovieResolver"/> class.
|
||||
@ -63,7 +63,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||
/// <inheritdoc />
|
||||
public MultiItemResolverResult ResolveMultiple(
|
||||
Folder parent,
|
||||
List<FileSystemMetadata> files,
|
||||
IReadOnlyList<FileSystemMetadata> files,
|
||||
CollectionType? collectionType,
|
||||
IDirectoryService directoryService)
|
||||
{
|
||||
@ -187,7 +187,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
||||
|
||||
private MultiItemResolverResult ResolveMultipleInternal(
|
||||
Folder parent,
|
||||
List<FileSystemMetadata> files,
|
||||
IReadOnlyList<FileSystemMetadata> files,
|
||||
CollectionType? collectionType)
|
||||
{
|
||||
if (IsInvalid(parent, collectionType))
|
||||
|
@ -83,7 +83,7 @@ namespace Emby.Server.Implementations.Library
|
||||
|
||||
UserDataSaved?.Invoke(this, new UserDataSaveEventArgs
|
||||
{
|
||||
Keys = keys,
|
||||
Keys = keys.ToList(),
|
||||
UserData = userData,
|
||||
SaveReason = reason,
|
||||
UserId = user.Id,
|
||||
@ -237,7 +237,7 @@ namespace Emby.Server.Implementations.Library
|
||||
/// <inheritdoc />
|
||||
public UserItemData? GetUserData(User user, BaseItem item)
|
||||
{
|
||||
return GetUserData(user, item.Id, item.GetUserDataKeys());
|
||||
return GetUserData(user, item.Id, item.GetUserDataKeys().ToList());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
@ -2051,7 +2051,7 @@ namespace Emby.Server.Implementations.Session
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, Func<T> dataFn, CancellationToken cancellationToken)
|
||||
public Task SendMessageToUserSessions<T>(IEnumerable<Guid> userIds, SessionMessageType name, Func<T> dataFn, CancellationToken cancellationToken)
|
||||
{
|
||||
CheckDisposed();
|
||||
|
||||
@ -2066,7 +2066,7 @@ namespace Emby.Server.Implementations.Session
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, T data, CancellationToken cancellationToken)
|
||||
public Task SendMessageToUserSessions<T>(IEnumerable<Guid> userIds, SessionMessageType name, T data, CancellationToken cancellationToken)
|
||||
{
|
||||
CheckDisposed();
|
||||
|
||||
|
@ -256,7 +256,7 @@ namespace Emby.Server.Implementations.SyncPlay
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public List<GroupInfoDto> ListGroups(SessionInfo session, ListGroupsRequest request)
|
||||
public IReadOnlyList<GroupInfoDto> ListGroups(SessionInfo session, ListGroupsRequest request)
|
||||
{
|
||||
if (session is null)
|
||||
{
|
||||
|
@ -243,7 +243,7 @@ public class TvShowsController : BaseJellyfinApiController
|
||||
return NotFound("No season exists with Id " + seasonId);
|
||||
}
|
||||
|
||||
episodes = seasonItem.GetEpisodes(user, dtoOptions, shouldIncludeMissingEpisodes);
|
||||
episodes = seasonItem.GetEpisodes(user, dtoOptions, shouldIncludeMissingEpisodes).ToList();
|
||||
}
|
||||
else if (season.HasValue) // Season number was supplied. Get episodes by season number
|
||||
{
|
||||
@ -258,8 +258,8 @@ public class TvShowsController : BaseJellyfinApiController
|
||||
.FirstOrDefault(i => i.IndexNumber == season.Value);
|
||||
|
||||
episodes = seasonItem is null ?
|
||||
new List<BaseItem>()
|
||||
: ((Season)seasonItem).GetEpisodes(user, dtoOptions, shouldIncludeMissingEpisodes);
|
||||
[]
|
||||
: ((Season)seasonItem).GetEpisodes(user, dtoOptions, shouldIncludeMissingEpisodes).ToList();
|
||||
}
|
||||
else // No season number or season id was supplied. Returning all episodes.
|
||||
{
|
||||
|
@ -17,9 +17,7 @@ using MediaBrowser.Controller.MediaEncoding;
|
||||
using MediaBrowser.Controller.Streaming;
|
||||
using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Dto;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Http.HttpResults;
|
||||
using Microsoft.Net.Http.Headers;
|
||||
|
||||
namespace Jellyfin.Api.Helpers;
|
||||
|
@ -494,8 +494,8 @@ public sealed class BaseItemRepository
|
||||
|
||||
var topParent = item.GetTopParent();
|
||||
|
||||
var userdataKey = item.GetUserDataKeys();
|
||||
var inheritedTags = item.GetInheritedTags();
|
||||
var userdataKey = item.GetUserDataKeys().ToList();
|
||||
var inheritedTags = item.GetInheritedTags().ToList();
|
||||
|
||||
tuples.Add((item, ancestorIds, topParent, userdataKey, inheritedTags));
|
||||
}
|
||||
|
@ -97,9 +97,9 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
+ (IndexNumber is not null ? IndexNumber.Value.ToString("0000 - ", CultureInfo.InvariantCulture) : string.Empty) + Name;
|
||||
}
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
var songKey = IndexNumber.HasValue ? IndexNumber.Value.ToString("0000", CultureInfo.InvariantCulture) : string.Empty;
|
||||
|
||||
|
@ -96,9 +96,9 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
return 1;
|
||||
}
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
var albumArtist = AlbumArtist;
|
||||
if (!string.IsNullOrEmpty(albumArtist))
|
||||
|
@ -124,9 +124,9 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
await base.ValidateChildrenInternal(progress, recursive, refreshChildMetadata, false, refreshOptions, directoryService, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
list.InsertRange(0, GetUserDataKeys(this));
|
||||
return list;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Extensions;
|
||||
@ -37,9 +38,9 @@ namespace MediaBrowser.Controller.Entities.Audio
|
||||
[JsonIgnore]
|
||||
public override bool SupportsPeople => false;
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
|
@ -811,7 +811,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return IsFileProtocol;
|
||||
}
|
||||
|
||||
public virtual bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
|
||||
public virtual bool IsAuthorizedToDelete(User user, IReadOnlyList<Folder> allCollectionFolders)
|
||||
{
|
||||
if (user.HasPermission(PermissionKind.EnableContentDeletion))
|
||||
{
|
||||
@ -844,7 +844,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return ownerId.IsEmpty() ? null : LibraryManager.GetItemById(ownerId);
|
||||
}
|
||||
|
||||
public bool CanDelete(User user, List<Folder> allCollectionFolders)
|
||||
public bool CanDelete(User user, IReadOnlyList<Folder> allCollectionFolders)
|
||||
{
|
||||
return CanDelete() && IsAuthorizedToDelete(user, allCollectionFolders);
|
||||
}
|
||||
@ -1435,7 +1435,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
: false;
|
||||
}
|
||||
|
||||
public virtual List<string> GetUserDataKeys()
|
||||
public virtual IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = new List<string>();
|
||||
|
||||
@ -1622,7 +1622,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return LocalizationManager.GetRatingScore(rating);
|
||||
}
|
||||
|
||||
public List<string> GetInheritedTags()
|
||||
public IReadOnlyList<string> GetInheritedTags()
|
||||
{
|
||||
var list = new List<string>();
|
||||
list.AddRange(Tags);
|
||||
@ -2175,7 +2175,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="images">The images.</param>
|
||||
/// <returns><c>true</c> if images were added or updated, <c>false</c> otherwise.</returns>
|
||||
/// <exception cref="ArgumentException">Cannot call AddImages with chapter images.</exception>
|
||||
public bool AddImages(ImageType imageType, List<FileSystemMetadata> images)
|
||||
public bool AddImages(ImageType imageType, IReadOnlyList<FileSystemMetadata> images)
|
||||
{
|
||||
if (imageType == ImageType.Chapter)
|
||||
{
|
||||
@ -2251,7 +2251,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}.Concat(GetLocalMetadataFilesToDelete());
|
||||
}
|
||||
|
||||
protected List<FileSystemMetadata> GetLocalMetadataFilesToDelete()
|
||||
protected IReadOnlyList<FileSystemMetadata> GetLocalMetadataFilesToDelete()
|
||||
{
|
||||
if (IsFolder || !IsInMixedFolder)
|
||||
{
|
||||
@ -2509,7 +2509,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return string.Join('|', list).GetMD5().ToString("N", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
protected virtual List<string> GetEtagValues(User user)
|
||||
protected virtual IReadOnlyList<string> GetEtagValues(User user)
|
||||
{
|
||||
return
|
||||
[
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Extensions;
|
||||
@ -34,9 +35,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
[JsonIgnore]
|
||||
public override bool SupportsPeople => false;
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
|
@ -105,7 +105,7 @@ namespace MediaBrowser.Controller.Entities.Movies
|
||||
return [];
|
||||
}
|
||||
|
||||
public override bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
|
||||
public override bool IsAuthorizedToDelete(User user, IReadOnlyList<Folder> allCollectionFolders)
|
||||
{
|
||||
return user.HasPermission(PermissionKind.IsAdministrator) || user.HasPermission(PermissionKind.EnableCollectionManagement);
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Extensions;
|
||||
using MediaBrowser.Controller.Providers;
|
||||
@ -37,9 +38,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
[JsonIgnore]
|
||||
public override bool SupportsAncestors => false;
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Jellyfin.Extensions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
@ -33,9 +34,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
[JsonIgnore]
|
||||
public override bool SupportsPeople => false;
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
list.Insert(0, GetType().Name + "-" + (Name ?? string.Empty).RemoveDiacritics());
|
||||
return list;
|
||||
|
@ -155,14 +155,14 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
return 16.0 / 9;
|
||||
}
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
var series = Series;
|
||||
if (series is not null && ParentIndexNumber.HasValue && IndexNumber.HasValue)
|
||||
{
|
||||
var seriesUserDataKeys = series.GetUserDataKeys();
|
||||
var seriesUserDataKeys = series.GetUserDataKeys().ToList();
|
||||
var take = seriesUserDataKeys.Count;
|
||||
if (seriesUserDataKeys.Count > 1)
|
||||
{
|
||||
|
@ -100,14 +100,14 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
return series is null ? SeriesName : series.SortName;
|
||||
}
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
var series = Series;
|
||||
if (series is not null)
|
||||
{
|
||||
var newList = series.GetUserDataKeys();
|
||||
var newList = series.GetUserDataKeys().ToList();
|
||||
var suffix = (IndexNumber ?? 0).ToString("000", CultureInfo.InvariantCulture);
|
||||
for (int i = 0; i < newList.Count; i++)
|
||||
{
|
||||
@ -158,7 +158,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
try
|
||||
{
|
||||
query.Parent = this;
|
||||
query.ChannelIds = new[] { ChannelId };
|
||||
query.ChannelIds = [ChannelId];
|
||||
return ChannelManager.GetChannelItemsInternal(query, new Progress<double>(), CancellationToken.None).GetAwaiter().GetResult();
|
||||
}
|
||||
catch
|
||||
@ -189,27 +189,27 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
/// <param name="options">The options to use.</param>
|
||||
/// <param name="shouldIncludeMissingEpisodes">If missing episodes should be included.</param>
|
||||
/// <returns>Set of episodes.</returns>
|
||||
public List<BaseItem> GetEpisodes(User user, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
public IReadOnlyList<BaseItem> GetEpisodes(User user, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
{
|
||||
return GetEpisodes(Series, user, options, shouldIncludeMissingEpisodes);
|
||||
}
|
||||
|
||||
public List<BaseItem> GetEpisodes(Series series, User user, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
public IReadOnlyList<BaseItem> GetEpisodes(Series series, User user, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
{
|
||||
return GetEpisodes(series, user, null, options, shouldIncludeMissingEpisodes);
|
||||
}
|
||||
|
||||
public List<BaseItem> GetEpisodes(Series series, User user, IEnumerable<Episode> allSeriesEpisodes, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
public IReadOnlyList<BaseItem> GetEpisodes(Series series, User user, IEnumerable<Episode> allSeriesEpisodes, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
{
|
||||
return series.GetSeasonEpisodes(this, user, allSeriesEpisodes, options, shouldIncludeMissingEpisodes);
|
||||
}
|
||||
|
||||
public List<BaseItem> GetEpisodes()
|
||||
public IReadOnlyList<BaseItem> GetEpisodes()
|
||||
{
|
||||
return Series.GetSeasonEpisodes(this, null, null, new DtoOptions(true), true);
|
||||
}
|
||||
|
||||
public override List<BaseItem> GetChildren(User user, bool includeLinkedChildren, InternalItemsQuery query)
|
||||
public override IReadOnlyList<BaseItem> GetChildren(User user, bool includeLinkedChildren, InternalItemsQuery query)
|
||||
{
|
||||
return GetEpisodes(user, new DtoOptions(true), true);
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -28,7 +29,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
public Series()
|
||||
{
|
||||
AirDays = Array.Empty<DayOfWeek>();
|
||||
AirDays = [];
|
||||
}
|
||||
|
||||
public DayOfWeek[] AirDays { get; set; }
|
||||
@ -168,9 +169,9 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
/// Gets the user data key.
|
||||
/// </summary>
|
||||
/// <returns>System.String.</returns>
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
if (this.TryGetProviderId(MetadataProvider.Imdb, out var key))
|
||||
{
|
||||
@ -360,7 +361,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
await ProviderManager.RefreshSingleItem(this, refreshOptions, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public List<BaseItem> GetSeasonEpisodes(Season parentSeason, User user, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
public IReadOnlyList<BaseItem> GetSeasonEpisodes(Season parentSeason, User user, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
{
|
||||
var queryFromSeries = ConfigurationManager.Configuration.DisplaySpecialsWithinSeasons;
|
||||
|
||||
@ -406,7 +407,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
return GetSeasonEpisodes(parentSeason, user, allItems, options, shouldIncludeMissingEpisodes);
|
||||
}
|
||||
|
||||
public List<BaseItem> GetSeasonEpisodes(Season parentSeason, User user, IEnumerable<BaseItem> allSeriesEpisodes, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
public IReadOnlyList<BaseItem> GetSeasonEpisodes(Season parentSeason, User user, IEnumerable<BaseItem> allSeriesEpisodes, DtoOptions options, bool shouldIncludeMissingEpisodes)
|
||||
{
|
||||
if (allSeriesEpisodes is null)
|
||||
{
|
||||
|
@ -990,7 +990,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
return _userViewManager.GetUserSubView(parent.Id, type, localizationKey, sortName);
|
||||
}
|
||||
|
||||
public static IEnumerable<BaseItem> FilterForAdjacency(List<BaseItem> list, Guid adjacentTo)
|
||||
public static IEnumerable<BaseItem> FilterForAdjacency(IReadOnlyList<BaseItem> list, Guid adjacentTo)
|
||||
{
|
||||
var adjacentToItem = list.FirstOrDefault(i => i.Id.Equals(adjacentTo));
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -259,9 +260,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
[JsonIgnore]
|
||||
public override MediaType MediaType => MediaType.Video;
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
if (EnableDefaultVideoUserDataKeys)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
@ -35,9 +36,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
return false;
|
||||
}
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
list.Insert(0, "Year-" + Name);
|
||||
return list;
|
||||
|
@ -1,10 +1,10 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using MediaBrowser.Model.LiveTv;
|
||||
|
@ -170,6 +170,6 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
|
||||
public interface ISupportsDirectStreamProvider
|
||||
{
|
||||
Task<ILiveStream> GetChannelStreamWithDirectStreamProvider(string channelId, string streamId, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
||||
Task<ILiveStream> GetChannelStreamWithDirectStreamProvider(string channelId, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <param name="currentLiveStreams">The current live streams.</param>
|
||||
/// <param name="cancellationToken">The cancellation token to cancel operation.</param>
|
||||
/// <returns>Live stream wrapped in a task.</returns>
|
||||
Task<ILiveStream> GetChannelStream(string channelId, string streamId, IList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
||||
Task<ILiveStream> GetChannelStream(string channelId, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the channel stream media sources.
|
||||
|
@ -88,9 +88,9 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
[JsonIgnore]
|
||||
public string EpisodeTitle { get; set; }
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
if (!ConfigurationManager.Configuration.DisableLiveTvChannelUserDataName)
|
||||
{
|
||||
|
@ -162,9 +162,9 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
[JsonIgnore]
|
||||
public override bool SupportsAncestors => false;
|
||||
|
||||
public override List<string> GetUserDataKeys()
|
||||
public override IReadOnlyList<string> GetUserDataKeys()
|
||||
{
|
||||
var list = base.GetUserDataKeys();
|
||||
var list = base.GetUserDataKeys().ToList();
|
||||
|
||||
if (!IsSeries)
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
public ProgramInfo()
|
||||
{
|
||||
Genres = new List<string>();
|
||||
Genres = [];
|
||||
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
@ -65,7 +65,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// <summary>
|
||||
/// Gets or sets the genre of the program.
|
||||
/// </summary>
|
||||
public List<string> Genres { get; set; }
|
||||
public IReadOnlyList<string> Genres { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the original air date.
|
||||
|
@ -12,7 +12,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
public SeriesTimerInfo()
|
||||
{
|
||||
Days = new List<DayOfWeek>();
|
||||
Days = [];
|
||||
SkipEpisodesInLibrary = true;
|
||||
KeepUntil = KeepUntil.UntilDeleted;
|
||||
}
|
||||
@ -86,7 +86,7 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
/// Gets or sets the days.
|
||||
/// </summary>
|
||||
/// <value>The days.</value>
|
||||
public List<DayOfWeek> Days { get; set; }
|
||||
public IReadOnlyList<DayOfWeek> Days { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the priority.
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -14,11 +15,11 @@ namespace MediaBrowser.Controller.LiveTv
|
||||
{
|
||||
public TimerInfo()
|
||||
{
|
||||
Genres = Array.Empty<string>();
|
||||
Genres = [];
|
||||
KeepUntil = KeepUntil.UntilDeleted;
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
SeriesProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
Tags = Array.Empty<string>();
|
||||
Tags = [];
|
||||
}
|
||||
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
@ -1,10 +1,10 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591, SA1401
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using Jellyfin.Data.Enums;
|
||||
@ -31,9 +31,9 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
TranscodingType = jobType;
|
||||
RemoteHttpHeaders = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
SupportedAudioCodecs = Array.Empty<string>();
|
||||
SupportedVideoCodecs = Array.Empty<string>();
|
||||
SupportedSubtitleCodecs = Array.Empty<string>();
|
||||
SupportedAudioCodecs = [];
|
||||
SupportedVideoCodecs = [];
|
||||
SupportedSubtitleCodecs = [];
|
||||
}
|
||||
|
||||
public TranscodeReason TranscodeReasons
|
||||
@ -599,7 +599,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
}
|
||||
|
||||
return Array.Empty<string>();
|
||||
return [];
|
||||
}
|
||||
|
||||
public string[] GetRequestedRangeTypes(string codec)
|
||||
@ -619,7 +619,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
}
|
||||
|
||||
return Array.Empty<string>();
|
||||
return [];
|
||||
}
|
||||
|
||||
public string[] GetRequestedCodecTags(string codec)
|
||||
@ -639,7 +639,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
}
|
||||
|
||||
return Array.Empty<string>();
|
||||
return [];
|
||||
}
|
||||
|
||||
public string GetRequestedLevel(string codec)
|
||||
|
@ -118,7 +118,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||
return 1;
|
||||
}
|
||||
|
||||
public override bool IsAuthorizedToDelete(User user, List<Folder> allCollectionFolders)
|
||||
public override bool IsAuthorizedToDelete(User user, IReadOnlyList<Folder> allCollectionFolders)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma warning disable CA1002 // Do not expose generic lists
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
@ -32,7 +33,7 @@ namespace MediaBrowser.Controller.Resolvers
|
||||
{
|
||||
MultiItemResolverResult ResolveMultiple(
|
||||
Folder parent,
|
||||
List<FileSystemMetadata> files,
|
||||
IReadOnlyList<FileSystemMetadata> files,
|
||||
CollectionType? collectionType,
|
||||
IDirectoryService directoryService);
|
||||
}
|
||||
@ -41,8 +42,8 @@ namespace MediaBrowser.Controller.Resolvers
|
||||
{
|
||||
public MultiItemResolverResult()
|
||||
{
|
||||
Items = new List<BaseItem>();
|
||||
ExtraFiles = new List<FileSystemMetadata>();
|
||||
Items = [];
|
||||
ExtraFiles = [];
|
||||
}
|
||||
|
||||
public List<BaseItem> Items { get; set; }
|
||||
|
@ -204,7 +204,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="data">The data.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, T data, CancellationToken cancellationToken);
|
||||
Task SendMessageToUserSessions<T>(IEnumerable<Guid> userIds, SessionMessageType name, T data, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the message to user sessions.
|
||||
@ -215,7 +215,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// <param name="dataFn">Data function.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SendMessageToUserSessions<T>(List<Guid> userIds, SessionMessageType name, Func<T> dataFn, CancellationToken cancellationToken);
|
||||
Task SendMessageToUserSessions<T>(IEnumerable<Guid> userIds, SessionMessageType name, Func<T> dataFn, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Sends the message to user device sessions.
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -45,7 +45,7 @@ namespace MediaBrowser.Controller.SyncPlay
|
||||
/// <param name="session">The session.</param>
|
||||
/// <param name="request">The request.</param>
|
||||
/// <returns>The list of available groups.</returns>
|
||||
List<GroupInfoDto> ListGroups(SessionInfo session, ListGroupsRequest request);
|
||||
IReadOnlyList<GroupInfoDto> ListGroups(SessionInfo session, ListGroupsRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Gets available groups for a session by id.
|
||||
|
@ -15,7 +15,6 @@ using Jellyfin.Database.Implementations.Enums;
|
||||
using Jellyfin.Extensions;
|
||||
using MediaBrowser.Common;
|
||||
using MediaBrowser.Common.Configuration;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Controller.Configuration;
|
||||
using MediaBrowser.Controller.Library;
|
||||
using MediaBrowser.Controller.MediaEncoding;
|
||||
|
@ -1,89 +1,96 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Channels
|
||||
namespace MediaBrowser.Model.Channels;
|
||||
|
||||
/// <summary>
|
||||
/// Channel Features.
|
||||
/// </summary>
|
||||
public class ChannelFeatures
|
||||
{
|
||||
public class ChannelFeatures
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ChannelFeatures"/> class.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <param name="id">The id.</param>
|
||||
public ChannelFeatures(string name, Guid id)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can search.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can search; otherwise, <c>false</c>.</value>
|
||||
public bool CanSearch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media types.
|
||||
/// </summary>
|
||||
/// <value>The media types.</value>
|
||||
public ChannelMediaType[] MediaTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content types.
|
||||
/// </summary>
|
||||
/// <value>The content types.</value>
|
||||
public ChannelMediaContentType[] ContentTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of records the channel allows retrieving at a time.
|
||||
/// </summary>
|
||||
public int? MaxPageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the automatic refresh levels.
|
||||
/// </summary>
|
||||
/// <value>The automatic refresh levels.</value>
|
||||
public int? AutoRefreshLevels { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default sort orders.
|
||||
/// </summary>
|
||||
/// <value>The default sort orders.</value>
|
||||
public ChannelItemSortField[] DefaultSortFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether a sort ascending/descending toggle is supported.
|
||||
/// </summary>
|
||||
public bool SupportsSortOrderToggle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports latest media].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports latest media]; otherwise, <c>false</c>.</value>
|
||||
public bool SupportsLatestMedia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can filter.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can filter; otherwise, <c>false</c>.</value>
|
||||
public bool CanFilter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports content downloading].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports content downloading]; otherwise, <c>false</c>.</value>
|
||||
public bool SupportsContentDownloading { get; set; }
|
||||
Name = name;
|
||||
Id = id;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name.
|
||||
/// </summary>
|
||||
/// <value>The name.</value>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier.
|
||||
/// </summary>
|
||||
/// <value>The identifier.</value>
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can search.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can search; otherwise, <c>false</c>.</value>
|
||||
public bool CanSearch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the media types.
|
||||
/// </summary>
|
||||
/// <value>The media types.</value>
|
||||
public ChannelMediaType[] MediaTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the content types.
|
||||
/// </summary>
|
||||
/// <value>The content types.</value>
|
||||
public ChannelMediaContentType[] ContentTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of records the channel allows retrieving at a time.
|
||||
/// </summary>
|
||||
public int? MaxPageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the automatic refresh levels.
|
||||
/// </summary>
|
||||
/// <value>The automatic refresh levels.</value>
|
||||
public int? AutoRefreshLevels { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the default sort orders.
|
||||
/// </summary>
|
||||
/// <value>The default sort orders.</value>
|
||||
public ChannelItemSortField[] DefaultSortFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether a sort ascending/descending toggle is supported.
|
||||
/// </summary>
|
||||
public bool SupportsSortOrderToggle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports latest media].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports latest media]; otherwise, <c>false</c>.</value>
|
||||
public bool SupportsLatestMedia { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance can filter.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance can filter; otherwise, <c>false</c>.</value>
|
||||
public bool CanFilter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports content downloading].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports content downloading]; otherwise, <c>false</c>.</value>
|
||||
public bool SupportsContentDownloading { get; set; }
|
||||
}
|
||||
|
@ -1,59 +1,86 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace MediaBrowser.Model.Channels
|
||||
namespace MediaBrowser.Model.Channels;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the fields to return within the items, in addition to basic information.
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
public class ChannelQuery
|
||||
{
|
||||
public class ChannelQuery
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the fields to return within the items, in addition to basic information.
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
public ItemFields[]? Fields { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the fields to return within the items, in addition to basic information.
|
||||
/// </summary>
|
||||
/// <value>The fields.</value>
|
||||
public ItemFields[]? Fields { get; set; }
|
||||
|
||||
public bool? EnableImages { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [enable images].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [enable images]; otherwise, <c>false</c>.</value>
|
||||
public bool? EnableImages { get; set; }
|
||||
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the image type limit.
|
||||
/// </summary>
|
||||
/// <value>The image type limit.</value>
|
||||
public int? ImageTypeLimit { get; set; }
|
||||
|
||||
public ImageType[]? EnableImageTypes { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the enabled image types.
|
||||
/// </summary>
|
||||
/// <value>The enabled image types.</value>
|
||||
public ImageType[]? EnableImageTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public Guid UserId { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the user identifier.
|
||||
/// </summary>
|
||||
/// <value>The user identifier.</value>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the start index. Use for paging.
|
||||
/// </summary>
|
||||
/// <value>The start index.</value>
|
||||
public int? StartIndex { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the start index. Use for paging.
|
||||
/// </summary>
|
||||
/// <value>The start index.</value>
|
||||
public int? StartIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of items to return.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int? Limit { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the maximum number of items to return.
|
||||
/// </summary>
|
||||
/// <value>The limit.</value>
|
||||
public int? Limit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports latest items].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports latest items]; otherwise, <c>false</c>.</value>
|
||||
public bool? SupportsLatestItems { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports latest items].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports latest items]; otherwise, <c>false</c>.</value>
|
||||
public bool? SupportsLatestItems { get; set; }
|
||||
|
||||
public bool? SupportsMediaDeletion { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether [supports media deletion].
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [supports media deletion]; otherwise, <c>false</c>.</value>
|
||||
public bool? SupportsMediaDeletion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is favorite.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is favorite] contains no value, <c>true</c> if [is favorite]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsFavorite { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is favorite.
|
||||
/// </summary>
|
||||
/// <value><c>null</c> if [is favorite] contains no value, <c>true</c> if [is favorite]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsFavorite { get; set; }
|
||||
|
||||
public bool? IsRecordingsFolder { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether this instance is a recording folder.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [is recording folder]; otherwise, <c>false</c>.</value>
|
||||
public bool? IsRecordingsFolder { get; set; }
|
||||
|
||||
public bool RefreshLatestChannelItems { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether latest channel items should be refreshed.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [refresh latest channel items]; otherwise, <c>false</c>.</value>
|
||||
public bool RefreshLatestChannelItems { get; set; }
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
@ -12,14 +12,14 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public LibraryOptions()
|
||||
{
|
||||
TypeOptions = Array.Empty<TypeOptions>();
|
||||
DisabledSubtitleFetchers = Array.Empty<string>();
|
||||
DisabledMediaSegmentProviders = Array.Empty<string>();
|
||||
MediaSegmentProviderOrder = Array.Empty<string>();
|
||||
SubtitleFetcherOrder = Array.Empty<string>();
|
||||
DisabledLocalMetadataReaders = Array.Empty<string>();
|
||||
DisabledLyricFetchers = Array.Empty<string>();
|
||||
LyricFetcherOrder = Array.Empty<string>();
|
||||
TypeOptions = [];
|
||||
DisabledSubtitleFetchers = [];
|
||||
DisabledMediaSegmentProviders = [];
|
||||
MediaSegmentProviderOrder = [];
|
||||
SubtitleFetcherOrder = [];
|
||||
DisabledLocalMetadataReaders = [];
|
||||
DisabledLyricFetchers = [];
|
||||
LyricFetcherOrder = [];
|
||||
|
||||
SkipSubtitlesIfAudioTrackMatches = true;
|
||||
RequirePerfectSubtitleMatch = true;
|
||||
@ -30,14 +30,14 @@ namespace MediaBrowser.Model.Configuration
|
||||
SaveSubtitlesWithMedia = true;
|
||||
SaveLyricsWithMedia = false;
|
||||
SaveTrickplayWithMedia = false;
|
||||
PathInfos = Array.Empty<MediaPathInfo>();
|
||||
PathInfos = [];
|
||||
EnableAutomaticSeriesGrouping = true;
|
||||
SeasonZeroDisplayName = "Specials";
|
||||
|
||||
PreferNonstandardArtistsTag = false;
|
||||
UseCustomTagDelimiters = false;
|
||||
CustomTagDelimiters = _defaultTagDelimiters;
|
||||
DelimiterWhitelist = Array.Empty<string>();
|
||||
DelimiterWhitelist = [];
|
||||
}
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
@ -10,8 +11,8 @@ namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public MetadataPluginSummary()
|
||||
{
|
||||
SupportedImageTypes = Array.Empty<ImageType>();
|
||||
Plugins = Array.Empty<MetadataPlugin>();
|
||||
SupportedImageTypes = [];
|
||||
Plugins = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration;
|
||||
@ -11,18 +12,18 @@ public class TrickplayOptions
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not to use HW acceleration.
|
||||
/// </summary>
|
||||
public bool EnableHwAcceleration { get; set; } = false;
|
||||
public bool EnableHwAcceleration { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether or not to use HW accelerated MJPEG encoding.
|
||||
/// </summary>
|
||||
public bool EnableHwEncoding { get; set; } = false;
|
||||
public bool EnableHwEncoding { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether to only extract key frames.
|
||||
/// Significantly faster, but is not compatible with all decoders and/or video files.
|
||||
/// </summary>
|
||||
public bool EnableKeyFrameOnlyExtraction { get; set; } = false;
|
||||
public bool EnableKeyFrameOnlyExtraction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the behavior used by trickplay provider on library scan/update.
|
||||
@ -42,7 +43,7 @@ public class TrickplayOptions
|
||||
/// <summary>
|
||||
/// Gets or sets the target width resolutions, in px, to generates preview images for.
|
||||
/// </summary>
|
||||
public int[] WidthResolutions { get; set; } = new[] { 320 };
|
||||
public int[] WidthResolutions { get; set; } = [320];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets number of tile images to allow in X dimension.
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -9,9 +11,9 @@ namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public class TypeOptions
|
||||
{
|
||||
public static readonly ImageOption DefaultInstance = new ImageOption();
|
||||
public static readonly ImageOption DefaultInstance = new();
|
||||
|
||||
public static readonly Dictionary<string, ImageOption[]> DefaultImageOptions = new Dictionary<string, ImageOption[]>
|
||||
public static readonly Dictionary<string, ImageOption[]> DefaultImageOptions = new()
|
||||
{
|
||||
{
|
||||
"Movie", new[]
|
||||
@ -304,11 +306,11 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public TypeOptions()
|
||||
{
|
||||
MetadataFetchers = Array.Empty<string>();
|
||||
MetadataFetcherOrder = Array.Empty<string>();
|
||||
ImageFetchers = Array.Empty<string>();
|
||||
ImageFetcherOrder = Array.Empty<string>();
|
||||
ImageOptions = Array.Empty<ImageOption>();
|
||||
MetadataFetchers = [];
|
||||
MetadataFetcherOrder = [];
|
||||
ImageFetchers = [];
|
||||
ImageFetcherOrder = [];
|
||||
ImageOptions = [];
|
||||
}
|
||||
|
||||
public string Type { get; set; }
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -22,10 +23,10 @@ namespace MediaBrowser.Model.Configuration
|
||||
HidePlayedInLatest = true;
|
||||
PlayDefaultAudioTrack = true;
|
||||
|
||||
LatestItemsExcludes = Array.Empty<Guid>();
|
||||
OrderedViews = Array.Empty<Guid>();
|
||||
MyMediaExcludes = Array.Empty<Guid>();
|
||||
GroupedFolders = Array.Empty<Guid>();
|
||||
LatestItemsExcludes = [];
|
||||
OrderedViews = [];
|
||||
MyMediaExcludes = [];
|
||||
GroupedFolders = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -324,7 +324,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
return !condition.IsRequired;
|
||||
}
|
||||
|
||||
var expected = (TransportStreamTimestamp)Enum.Parse(typeof(TransportStreamTimestamp), condition.Value, true);
|
||||
var expected = Enum.Parse<TransportStreamTimestamp>(condition.Value, true);
|
||||
|
||||
switch (condition.Condition)
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
@ -62,7 +64,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
/// <summary>
|
||||
/// Gets or sets the media sources.
|
||||
/// </summary>
|
||||
public MediaSourceInfo[] MediaSources { get; set; } = Array.Empty<MediaSourceInfo>();
|
||||
public MediaSourceInfo[] MediaSources { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the device profile.
|
||||
|
@ -2010,7 +2010,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
else if (condition.Condition == ProfileConditionType.NotEquals)
|
||||
{
|
||||
item.SetOption(qualifier, "rangetype", string.Join(',', Enum.GetNames(typeof(VideoRangeType)).Except(values)));
|
||||
item.SetOption(qualifier, "rangetype", string.Join(',', Enum.GetNames<VideoRangeType>().Except(values)));
|
||||
}
|
||||
else if (condition.Condition == ProfileConditionType.EqualsAny)
|
||||
{
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Xml.Serialization;
|
||||
|
@ -1,11 +1,12 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using Jellyfin.Data.Enums;
|
||||
using Jellyfin.Database.Implementations.Entities;
|
||||
using MediaBrowser.Model.Drawing;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.Library;
|
||||
@ -563,7 +564,7 @@ namespace MediaBrowser.Model.Dto
|
||||
/// Gets or sets the chapters.
|
||||
/// </summary>
|
||||
/// <value>The chapters.</value>
|
||||
public List<ChapterInfo> Chapters { get; set; }
|
||||
public ChapterInfo[] Chapters { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the trickplay manifest.
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -14,12 +15,12 @@ namespace MediaBrowser.Model.Entities
|
||||
/// </summary>
|
||||
public LibraryUpdateInfo()
|
||||
{
|
||||
FoldersAddedTo = Array.Empty<string>();
|
||||
FoldersRemovedFrom = Array.Empty<string>();
|
||||
ItemsAdded = Array.Empty<string>();
|
||||
ItemsRemoved = Array.Empty<string>();
|
||||
ItemsUpdated = Array.Empty<string>();
|
||||
CollectionFolders = Array.Empty<string>();
|
||||
FoldersAddedTo = [];
|
||||
FoldersRemovedFrom = [];
|
||||
ItemsAdded = [];
|
||||
ItemsRemoved = [];
|
||||
ItemsUpdated = [];
|
||||
CollectionFolders = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -20,7 +20,9 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <summary>
|
||||
/// Class MediaStream.
|
||||
/// </summary>
|
||||
#pragma warning disable CA1711 // Identifiers should not have incorrect suffix
|
||||
public class MediaStream
|
||||
#pragma warning restore CA1711 // Identifiers should not have incorrect suffix
|
||||
{
|
||||
private static readonly string[] _specialCodes =
|
||||
{
|
||||
|
@ -1,7 +1,8 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
|
||||
namespace MediaBrowser.Model.Entities
|
||||
@ -16,7 +17,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// </summary>
|
||||
public VirtualFolderInfo()
|
||||
{
|
||||
Locations = Array.Empty<string>();
|
||||
Locations = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -11,7 +12,7 @@ namespace MediaBrowser.Model.Library
|
||||
public UserViewQuery()
|
||||
{
|
||||
IncludeExternalContent = true;
|
||||
PresetViews = Array.Empty<CollectionType?>();
|
||||
PresetViews = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -10,13 +12,13 @@ namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
public ListingsProviderInfo()
|
||||
{
|
||||
NewsCategories = new[] { "news", "journalism", "documentary", "current affairs" };
|
||||
SportsCategories = new[] { "sports", "basketball", "baseball", "football" };
|
||||
KidsCategories = new[] { "kids", "family", "children", "childrens", "disney" };
|
||||
MovieCategories = new[] { "movie" };
|
||||
EnabledTuners = Array.Empty<string>();
|
||||
NewsCategories = ["news", "journalism", "documentary", "current affairs"];
|
||||
SportsCategories = ["sports", "basketball", "baseball", "football"];
|
||||
KidsCategories = ["kids", "family", "children", "childrens", "disney"];
|
||||
MovieCategories = ["movie"];
|
||||
EnabledTuners = [];
|
||||
EnableAllTuners = true;
|
||||
ChannelMappings = Array.Empty<NameValuePair>();
|
||||
ChannelMappings = [];
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -15,7 +17,7 @@ namespace MediaBrowser.Model.LiveTv
|
||||
public LiveTvChannelQuery()
|
||||
{
|
||||
EnableUserData = true;
|
||||
SortBy = Array.Empty<ItemSortBy>();
|
||||
SortBy = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,15 +1,14 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
public class LiveTvInfo
|
||||
{
|
||||
public LiveTvInfo()
|
||||
{
|
||||
Services = Array.Empty<LiveTvServiceInfo>();
|
||||
EnabledUsers = Array.Empty<string>();
|
||||
Services = [];
|
||||
EnabledUsers = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -9,9 +11,9 @@ namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
public LiveTvOptions()
|
||||
{
|
||||
TunerHosts = Array.Empty<TunerHostInfo>();
|
||||
ListingProviders = Array.Empty<ListingsProviderInfo>();
|
||||
MediaLocationsCreated = Array.Empty<string>();
|
||||
TunerHosts = [];
|
||||
ListingProviders = [];
|
||||
MediaLocationsCreated = [];
|
||||
RecordingPostProcessorArguments = "\"{path}\"";
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
@ -12,7 +12,7 @@ namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
public LiveTvServiceInfo()
|
||||
{
|
||||
Tuners = Array.Empty<string>();
|
||||
Tuners = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -22,8 +24,8 @@ namespace MediaBrowser.Model.LiveTv
|
||||
{
|
||||
public SeriesTimerInfoDto()
|
||||
{
|
||||
ImageTags = new Dictionary<ImageType, string>();
|
||||
Days = Array.Empty<DayOfWeek>();
|
||||
ImageTags = [];
|
||||
Days = [];
|
||||
Type = "SeriesTimer";
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.MediaInfo;
|
||||
@ -13,7 +14,7 @@ public class BlurayDiscInfo
|
||||
/// Gets or sets the media streams.
|
||||
/// </summary>
|
||||
/// <value>The media streams.</value>
|
||||
public MediaStream[] MediaStreams { get; set; }
|
||||
public IReadOnlyList<MediaStream> MediaStreams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the run time ticks.
|
||||
@ -25,7 +26,7 @@ public class BlurayDiscInfo
|
||||
/// Gets or sets the files.
|
||||
/// </summary>
|
||||
/// <value>The files.</value>
|
||||
public string[] Files { get; set; }
|
||||
public IReadOnlyList<string> Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the playlist name.
|
||||
@ -37,5 +38,5 @@ public class BlurayDiscInfo
|
||||
/// Gets or sets the chapters.
|
||||
/// </summary>
|
||||
/// <value>The chapters.</value>
|
||||
public double[] Chapters { get; set; }
|
||||
public IReadOnlyList<double> Chapters { get; set; }
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -12,12 +14,12 @@ namespace MediaBrowser.Model.MediaInfo
|
||||
{
|
||||
public MediaInfo()
|
||||
{
|
||||
Chapters = Array.Empty<ChapterInfo>();
|
||||
Artists = Array.Empty<string>();
|
||||
AlbumArtists = Array.Empty<string>();
|
||||
Studios = Array.Empty<string>();
|
||||
Genres = Array.Empty<string>();
|
||||
People = Array.Empty<BaseItemPerson>();
|
||||
Chapters = [];
|
||||
Artists = [];
|
||||
AlbumArtists = [];
|
||||
Studios = [];
|
||||
Genres = [];
|
||||
People = [];
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using MediaBrowser.Model.Entities;
|
||||
|
||||
namespace MediaBrowser.Model.Providers
|
||||
|
@ -1,4 +1,7 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
namespace MediaBrowser.Model.Providers
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -12,7 +14,7 @@ namespace MediaBrowser.Model.Providers
|
||||
public RemoteSearchResult()
|
||||
{
|
||||
ProviderIds = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase);
|
||||
Artists = Array.Empty<RemoteSearchResult>();
|
||||
Artists = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -9,7 +11,7 @@ namespace MediaBrowser.Model.Providers
|
||||
{
|
||||
public SubtitleOptions()
|
||||
{
|
||||
DownloadLanguages = Array.Empty<string>();
|
||||
DownloadLanguages = [];
|
||||
|
||||
SkipIfAudioTrackMatches = true;
|
||||
RequirePerfectMatch = true;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -12,7 +14,7 @@ namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public LatestItemsQuery()
|
||||
{
|
||||
EnableImageTypes = Array.Empty<ImageType>();
|
||||
EnableImageTypes = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -10,7 +11,7 @@ public class NextUpQuery
|
||||
{
|
||||
public NextUpQuery()
|
||||
{
|
||||
EnableImageTypes = Array.Empty<ImageType>();
|
||||
EnableImageTypes = [];
|
||||
EnableTotalRecordCount = true;
|
||||
NextUpDateCutoff = DateTime.MinValue;
|
||||
EnableResumable = false;
|
||||
|
@ -1,7 +1,8 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
@ -10,8 +11,8 @@ namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public QueryFilters()
|
||||
{
|
||||
Tags = Array.Empty<string>();
|
||||
Genres = Array.Empty<NameGuidPair>();
|
||||
Tags = [];
|
||||
Genres = [];
|
||||
}
|
||||
|
||||
public NameGuidPair[] Genres { get; set; }
|
||||
|
@ -1,7 +1,7 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
@ -9,10 +9,10 @@ namespace MediaBrowser.Model.Querying
|
||||
{
|
||||
public QueryFiltersLegacy()
|
||||
{
|
||||
Genres = Array.Empty<string>();
|
||||
Tags = Array.Empty<string>();
|
||||
OfficialRatings = Array.Empty<string>();
|
||||
Years = Array.Empty<int>();
|
||||
Genres = [];
|
||||
Tags = [];
|
||||
OfficialRatings = [];
|
||||
Years = [];
|
||||
}
|
||||
|
||||
public string[] Genres { get; set; }
|
||||
|
@ -1,3 +1,4 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@ -15,9 +16,9 @@ namespace MediaBrowser.Model.Search
|
||||
IncludePeople = true;
|
||||
IncludeStudios = true;
|
||||
|
||||
MediaTypes = Array.Empty<MediaType>();
|
||||
IncludeItemTypes = Array.Empty<BaseItemKind>();
|
||||
ExcludeItemTypes = Array.Empty<BaseItemKind>();
|
||||
MediaTypes = [];
|
||||
IncludeItemTypes = [];
|
||||
ExcludeItemTypes = [];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,23 +1,24 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.Session
|
||||
namespace MediaBrowser.Model.Session;
|
||||
|
||||
/// <summary>
|
||||
/// Class UserDataChangeInfo.
|
||||
/// </summary>
|
||||
public class UserDataChangeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UserDataChangeInfo.
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
public class UserDataChangeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the user id.
|
||||
/// </summary>
|
||||
/// <value>The user id.</value>
|
||||
public Guid UserId { get; set; }
|
||||
/// <value>The user id.</value>
|
||||
public Guid UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user data list.
|
||||
/// </summary>
|
||||
/// <value>The user data list.</value>
|
||||
public required UserItemDataDto[] UserDataList { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the user data list.
|
||||
/// </summary>
|
||||
/// <value>The user data list.</value>
|
||||
public required UserItemDataDto[] UserDataList { get; set; }
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
@ -1,7 +1,6 @@
|
||||
#pragma warning disable CA1819 // Properties should not return arrays
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Users
|
||||
{
|
||||
public class PinRedeemResult
|
||||
@ -16,6 +15,6 @@ namespace MediaBrowser.Model.Users
|
||||
/// Gets or sets the users reset.
|
||||
/// </summary>
|
||||
/// <value>The users reset.</value>
|
||||
public string[] UsersReset { get; set; } = Array.Empty<string>();
|
||||
public string[] UsersReset { get; set; } = [];
|
||||
}
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
blurayDiscInfo = GetBDInfo(item.Path);
|
||||
|
||||
// Return if no playable .m2ts files are found
|
||||
if (blurayDiscInfo is null || blurayDiscInfo.Files.Length == 0)
|
||||
if (blurayDiscInfo is null || blurayDiscInfo.Files.Count == 0)
|
||||
{
|
||||
_logger.LogError("No playable .m2ts files found in Blu-ray structure, skipping FFprobe.");
|
||||
return ItemUpdateType.MetadataImport;
|
||||
@ -343,9 +343,9 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
|
||||
if (blurayInfo.Chapters is not null)
|
||||
{
|
||||
double[] brChapter = blurayInfo.Chapters;
|
||||
chapters = new ChapterInfo[brChapter.Length];
|
||||
for (int i = 0; i < brChapter.Length; i++)
|
||||
var brChapter = blurayInfo.Chapters;
|
||||
chapters = new ChapterInfo[brChapter.Count];
|
||||
for (int i = 0; i < brChapter.Count; i++)
|
||||
{
|
||||
chapters[i] = new ChapterInfo
|
||||
{
|
||||
|
@ -459,7 +459,7 @@ namespace Jellyfin.LiveTv
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<ILiveStream> GetChannelStreamWithDirectStreamProvider(string channelId, string streamId, List<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
public async Task<ILiveStream> GetChannelStreamWithDirectStreamProvider(string channelId, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
{
|
||||
_logger.LogInformation("Streaming Channel {Id}", channelId);
|
||||
|
||||
|
@ -166,9 +166,9 @@ namespace Jellyfin.LiveTv.TunerHosts
|
||||
return new List<MediaSourceInfo>();
|
||||
}
|
||||
|
||||
protected abstract Task<ILiveStream> GetChannelStream(TunerHostInfo tunerHost, ChannelInfo channel, string streamId, IList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
||||
protected abstract Task<ILiveStream> GetChannelStream(TunerHostInfo tunerHost, ChannelInfo channel, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken);
|
||||
|
||||
public async Task<ILiveStream> GetChannelStream(string channelId, string streamId, IList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
public async Task<ILiveStream> GetChannelStream(string channelId, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
{
|
||||
ArgumentException.ThrowIfNullOrEmpty(channelId);
|
||||
|
||||
|
@ -40,7 +40,7 @@ namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
|
||||
|
||||
private readonly JsonSerializerOptions _jsonOptions;
|
||||
|
||||
private readonly Dictionary<string, DiscoverResponse> _modelCache = new Dictionary<string, DiscoverResponse>();
|
||||
private readonly Dictionary<string, DiscoverResponse> _modelCache = [];
|
||||
|
||||
public HdHomerunHost(
|
||||
IServerConfigurationManager config,
|
||||
@ -382,7 +382,7 @@ namespace Jellyfin.LiveTv.TunerHosts.HdHomerun
|
||||
return list;
|
||||
}
|
||||
|
||||
protected override async Task<ILiveStream> GetChannelStream(TunerHostInfo tunerHost, ChannelInfo channel, string streamId, IList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
protected override async Task<ILiveStream> GetChannelStream(TunerHostInfo tunerHost, ChannelInfo channel, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
{
|
||||
var tunerCount = tunerHost.TunerCount;
|
||||
|
||||
|
@ -75,7 +75,7 @@ namespace Jellyfin.LiveTv.TunerHosts
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
|
||||
protected override async Task<ILiveStream> GetChannelStream(TunerHostInfo tunerHost, ChannelInfo channel, string streamId, IList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
protected override async Task<ILiveStream> GetChannelStream(TunerHostInfo tunerHost, ChannelInfo channel, string streamId, IReadOnlyList<ILiveStream> currentLiveStreams, CancellationToken cancellationToken)
|
||||
{
|
||||
var tunerCount = tunerHost.TunerCount;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user