mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 15:28:28 +01:00
Merge branch 'master' into tonemap
This commit is contained in:
@@ -4,7 +4,7 @@ using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Entities;
|
||||
using MediaBrowser.Model.Events;
|
||||
using Jellyfin.Data.Events;
|
||||
using MediaBrowser.Model.Querying;
|
||||
|
||||
namespace MediaBrowser.Model.Activity
|
||||
@@ -13,8 +13,6 @@ namespace MediaBrowser.Model.Activity
|
||||
{
|
||||
event EventHandler<GenericEventArgs<ActivityLogEntry>> EntryCreated;
|
||||
|
||||
void Create(ActivityLog entry);
|
||||
|
||||
Task CreateAsync(ActivityLog entry);
|
||||
|
||||
QueryResult<ActivityLogEntry> GetPagedResult(int? startIndex, int? limit);
|
||||
|
||||
@@ -52,7 +52,13 @@ namespace MediaBrowser.Model.Configuration
|
||||
public string PreviousVersionStr
|
||||
{
|
||||
get => PreviousVersion?.ToString();
|
||||
set => PreviousVersion = Version.Parse(value);
|
||||
set
|
||||
{
|
||||
if (Version.TryParse(value, out var version))
|
||||
{
|
||||
PreviousVersion = version;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public double DownMixAudioBoost { get; set; }
|
||||
|
||||
public int MaxMuxingQueueSize { get; set; }
|
||||
|
||||
public bool EnableThrottling { get; set; }
|
||||
|
||||
public int ThrottleDelaySeconds { get; set; }
|
||||
@@ -51,6 +53,8 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public string EncoderPreset { get; set; }
|
||||
|
||||
public bool DeinterlaceDoubleRate { get; set; }
|
||||
|
||||
public string DeinterlaceMethod { get; set; }
|
||||
|
||||
public bool EnableDecodingColorDepth10Hevc { get; set; }
|
||||
@@ -66,6 +70,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
public EncodingOptions()
|
||||
{
|
||||
DownMixAudioBoost = 2;
|
||||
MaxMuxingQueueSize = 2048;
|
||||
EnableThrottling = false;
|
||||
ThrottleDelaySeconds = 180;
|
||||
EncodingThreadCount = -1;
|
||||
@@ -84,6 +89,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
TonemappingParam = 0;
|
||||
H264Crf = 23;
|
||||
H265Crf = 28;
|
||||
DeinterlaceDoubleRate = false;
|
||||
DeinterlaceMethod = "yadif";
|
||||
EnableDecodingColorDepth10Hevc = true;
|
||||
EnableDecodingColorDepth10Vp9 = true;
|
||||
|
||||
@@ -78,6 +78,11 @@ namespace MediaBrowser.Model.Configuration
|
||||
/// <value><c>true</c> if this instance is port authorized; otherwise, <c>false</c>.</value>
|
||||
public bool IsPortAuthorized { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if quick connect is available for use on this server.
|
||||
/// </summary>
|
||||
public bool QuickConnectAvailable { get; set; }
|
||||
|
||||
public bool AutoRunWebApp { get; set; }
|
||||
|
||||
public bool EnableRemoteAccess { get; set; }
|
||||
@@ -254,6 +259,16 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
public string[] UninstalledPlugins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether slow server responses should be logged as a warning.
|
||||
/// </summary>
|
||||
public bool EnableSlowResponseWarning { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the threshold for the slow response time warning in ms.
|
||||
/// </summary>
|
||||
public long SlowResponseThresholdMs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ServerConfiguration" /> class.
|
||||
/// </summary>
|
||||
@@ -289,6 +304,7 @@ namespace MediaBrowser.Model.Configuration
|
||||
|
||||
AutoRunWebApp = true;
|
||||
EnableRemoteAccess = true;
|
||||
QuickConnectAvailable = false;
|
||||
|
||||
EnableUPnP = false;
|
||||
MinResumePct = 5;
|
||||
@@ -359,6 +375,9 @@ namespace MediaBrowser.Model.Configuration
|
||||
DisabledImageFetchers = new[] { "The Open Movie Database", "TheMovieDb" }
|
||||
}
|
||||
};
|
||||
|
||||
EnableSlowResponseWarning = true;
|
||||
SlowResponseThresholdMs = 500;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
|
||||
//}
|
||||
|
||||
string dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
||||
string dlnaflags = string.Format(CultureInfo.InvariantCulture, ";DLNA.ORG_FLAGS={0}",
|
||||
DlnaMaps.FlagsToString(flagValue));
|
||||
|
||||
ResponseProfile mediaProfile = _profile.GetVideoMediaProfile(container,
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Globalization;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
public static class DlnaMaps
|
||||
{
|
||||
private static readonly string DefaultStreaming =
|
||||
FlagsToString(DlnaFlags.StreamingTransferMode |
|
||||
FlagsToString(DlnaFlags.StreamingTransferMode |
|
||||
DlnaFlags.BackgroundTransferMode |
|
||||
DlnaFlags.ConnectionStall |
|
||||
DlnaFlags.ByteBasedSeek |
|
||||
DlnaFlags.DlnaV15);
|
||||
|
||||
private static readonly string DefaultInteractive =
|
||||
FlagsToString(DlnaFlags.InteractiveTransferMode |
|
||||
FlagsToString(DlnaFlags.InteractiveTransferMode |
|
||||
DlnaFlags.BackgroundTransferMode |
|
||||
DlnaFlags.ConnectionStall |
|
||||
DlnaFlags.ByteBasedSeek |
|
||||
@@ -20,7 +22,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
public static string FlagsToString(DlnaFlags flags)
|
||||
{
|
||||
return string.Format("{0:X8}{1:D24}", (ulong)flags, 0);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0:X8}{1:D24}", (ulong)flags, 0);
|
||||
}
|
||||
|
||||
public static string GetOrgOpValue(bool hasKnownRuntime, bool isDirectStream, TranscodeSeekInfo profileTranscodeSeekInfo)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Events;
|
||||
using Jellyfin.Data.Events;
|
||||
|
||||
namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
|
||||
@@ -142,26 +143,26 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if (timestampType == TransportStreamTimestamp.None)
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_HP_{0}D_MPEG1_L2_ISO", resolution)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "AVC_TS_HP_{0}D_MPEG1_L2_ISO", resolution)) };
|
||||
}
|
||||
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_HP_{0}D_MPEG1_L2_T", resolution)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "AVC_TS_HP_{0}D_MPEG1_L2_T", resolution)) };
|
||||
}
|
||||
|
||||
if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_MP_{0}D_AAC_MULT5{1}", resolution, suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "AVC_TS_MP_{0}D_AAC_MULT5{1}", resolution, suffix)) };
|
||||
}
|
||||
|
||||
if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_MP_{0}D_MPEG1_L3{1}", resolution, suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "AVC_TS_MP_{0}D_MPEG1_L3{1}", resolution, suffix)) };
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(audioCodec) ||
|
||||
string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("AVC_TS_MP_{0}D_AC3{1}", resolution, suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "AVC_TS_MP_{0}D_AC3{1}", resolution, suffix)) };
|
||||
}
|
||||
}
|
||||
else if (string.Equals(videoCodec, "vc1", StringComparison.OrdinalIgnoreCase))
|
||||
@@ -180,29 +181,29 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
suffix = string.Equals(suffix, "_ISO", StringComparison.OrdinalIgnoreCase) ? suffix : "_T";
|
||||
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("VC1_TS_HD_DTS{0}", suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "VC1_TS_HD_DTS{0}", suffix)) };
|
||||
}
|
||||
}
|
||||
else if (string.Equals(videoCodec, "mpeg4", StringComparison.OrdinalIgnoreCase) || string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
if (string.Equals(audioCodec, "aac", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AAC{0}", suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "MPEG4_P2_TS_ASP_AAC{0}", suffix)) };
|
||||
}
|
||||
|
||||
if (string.Equals(audioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "MPEG4_P2_TS_ASP_MPEG1_L3{0}", suffix)) };
|
||||
}
|
||||
|
||||
if (string.Equals(audioCodec, "mp2", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "MPEG4_P2_TS_ASP_MPEG2_L2{0}", suffix)) };
|
||||
}
|
||||
|
||||
if (string.Equals(audioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("MPEG4_P2_TS_ASP_AC3{0}", suffix)) };
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format(CultureInfo.InvariantCulture, "MPEG4_P2_TS_ASP_AC3{0}", suffix)) };
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
var encodedValue = pair.Value.Replace(" ", "%20");
|
||||
|
||||
list.Add(string.Format("{0}={1}", pair.Name, encodedValue));
|
||||
list.Add(string.Format(CultureInfo.InvariantCulture, "{0}={1}", pair.Name, encodedValue));
|
||||
}
|
||||
|
||||
string queryString = string.Join("&", list.ToArray());
|
||||
@@ -214,18 +214,18 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if (string.Equals(SubProtocol, "hls", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return string.Format("{0}/audio/{1}/master.m3u8?{2}", baseUrl, ItemId, queryString);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}/audio/{1}/master.m3u8?{2}", baseUrl, ItemId, queryString);
|
||||
}
|
||||
|
||||
return string.Format("{0}/audio/{1}/stream{2}?{3}", baseUrl, ItemId, extension, queryString);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}/audio/{1}/stream{2}?{3}", baseUrl, ItemId, extension, queryString);
|
||||
}
|
||||
|
||||
if (string.Equals(SubProtocol, "hls", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return string.Format("{0}/videos/{1}/master.m3u8?{2}", baseUrl, ItemId, queryString);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}/videos/{1}/master.m3u8?{2}", baseUrl, ItemId, queryString);
|
||||
}
|
||||
|
||||
return string.Format("{0}/videos/{1}/stream{2}?{3}", baseUrl, ItemId, extension, queryString);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}/videos/{1}/stream{2}?{3}", baseUrl, ItemId, extension, queryString);
|
||||
}
|
||||
|
||||
private static List<NameValuePair> BuildParams(StreamInfo item, string accessToken)
|
||||
@@ -457,7 +457,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if (MediaSource.Protocol == MediaProtocol.File || !string.Equals(stream.Codec, subtitleProfile.Format, StringComparison.OrdinalIgnoreCase) || !stream.IsExternal)
|
||||
{
|
||||
info.Url = string.Format("{0}/Videos/{1}/{2}/Subtitles/{3}/{4}/Stream.{5}",
|
||||
info.Url = string.Format(CultureInfo.InvariantCulture, "{0}/Videos/{1}/{2}/Subtitles/{3}/{4}/Stream.{5}",
|
||||
baseUrl,
|
||||
ItemId,
|
||||
MediaSourceId,
|
||||
|
||||
@@ -239,7 +239,7 @@ namespace MediaBrowser.Model.Entities
|
||||
|
||||
if (!string.IsNullOrEmpty(Title))
|
||||
{
|
||||
var result = new StringBuilder(Title);
|
||||
var result = new StringBuilder(Title);
|
||||
foreach (var tag in attributes)
|
||||
{
|
||||
// Keep Tags that are not already in Title.
|
||||
@@ -252,7 +252,7 @@ namespace MediaBrowser.Model.Entities
|
||||
return result.ToString();
|
||||
}
|
||||
|
||||
return string.Join(" - ", attributes.ToArray());
|
||||
return string.Join(" - ", attributes);
|
||||
}
|
||||
|
||||
default:
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a generic EventArgs subclass that can hold any kind of object.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public class GenericEventArgs<T> : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the argument.
|
||||
/// </summary>
|
||||
/// <value>The argument.</value>
|
||||
public T Argument { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="GenericEventArgs{T}"/> class.
|
||||
/// </summary>
|
||||
/// <param name="arg">The argument.</param>
|
||||
public GenericEventArgs(T arg)
|
||||
{
|
||||
Argument = arg;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Extensions
|
||||
{
|
||||
// TODO: @bond remove
|
||||
public static class ListHelper
|
||||
{
|
||||
public static bool ContainsIgnoreCase(string[] list, string value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(value));
|
||||
}
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
if (string.Equals(item, value, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace MediaBrowser.Model.IO
|
||||
public DateTime CreationTimeUtc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this instance is directory.
|
||||
/// Gets or sets a value indicating whether this instance is directory.
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if this instance is directory; otherwise, <c>false</c>.</value>
|
||||
public bool IsDirectory { get; set; }
|
||||
|
||||
@@ -201,9 +201,9 @@ namespace MediaBrowser.Model.IO
|
||||
IEnumerable<string> GetFileSystemEntryPaths(string path, bool recursive = false);
|
||||
|
||||
void SetHidden(string path, bool isHidden);
|
||||
void SetReadOnly(string path, bool readOnly);
|
||||
|
||||
void SetAttributes(string path, bool isHidden, bool readOnly);
|
||||
|
||||
List<FileSystemMetadata> GetDrives();
|
||||
void SetExecutable(string path);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Model.IO
|
||||
{
|
||||
/// <summary>
|
||||
@@ -14,5 +16,10 @@ namespace MediaBrowser.Model.IO
|
||||
/// The default file stream buffer size.
|
||||
/// </summary>
|
||||
public const int FileStreamBufferSize = 4096;
|
||||
|
||||
/// <summary>
|
||||
/// The default <see cref="StreamWriter" /> buffer size.
|
||||
/// </summary>
|
||||
public const int StreamWriterBufferSize = 1024;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ namespace MediaBrowser.Model.IO
|
||||
/// </summary>
|
||||
/// <param name="shortcutPath">The shortcut path.</param>
|
||||
/// <param name="targetPath">The target path.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
void Create(string shortcutPath, string targetPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ namespace MediaBrowser.Model.IO
|
||||
|
||||
Task CopyToAsync(Stream source, Stream destination, int bufferSize, int emptyReadLimit, CancellationToken cancellationToken);
|
||||
|
||||
Task<int> CopyToAsync(Stream source, Stream destination, CancellationToken cancellationToken);
|
||||
|
||||
Task CopyToAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken);
|
||||
|
||||
Task CopyUntilCancelled(Stream source, Stream target, int bufferSize, CancellationToken cancellationToken);
|
||||
|
||||
@@ -26,6 +26,7 @@ namespace MediaBrowser.Model.IO
|
||||
void ExtractAll(Stream source, string targetPath, bool overwriteExistingFiles);
|
||||
|
||||
void ExtractAllFromGz(Stream source, string targetPath, bool overwriteExistingFiles);
|
||||
|
||||
void ExtractFirstFileFromGz(Stream source, string targetPath, string defaultFileName);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -8,8 +8,9 @@
|
||||
<PropertyGroup>
|
||||
<Authors>Jellyfin Contributors</Authors>
|
||||
<PackageId>Jellyfin.Model</PackageId>
|
||||
<PackageLicenseUrl>https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt</PackageLicenseUrl>
|
||||
<VersionPrefix>10.7.0</VersionPrefix>
|
||||
<RepositoryUrl>https://github.com/jellyfin/jellyfin</RepositoryUrl>
|
||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
@@ -19,13 +20,23 @@
|
||||
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
|
||||
<Nullable>enable</Nullable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Stability)'=='Unstable'">
|
||||
<!-- Include all symbols in the main nupkg until Azure Artifact Feed starts supporting ingesting NuGet symbol packages. -->
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.7" />
|
||||
<PackageReference Include="System.Globalization" Version="4.3.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="4.7.2" />
|
||||
<PackageReference Include="System.Text.Json" Version="5.0.0-preview.8.20407.11" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
40
MediaBrowser.Model/QuickConnect/QuickConnectResult.cs
Normal file
40
MediaBrowser.Model/QuickConnect/QuickConnectResult.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.QuickConnect
|
||||
{
|
||||
/// <summary>
|
||||
/// Stores the result of an incoming quick connect request.
|
||||
/// </summary>
|
||||
public class QuickConnectResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this request is authorized.
|
||||
/// </summary>
|
||||
public bool Authenticated => !string.IsNullOrEmpty(Authentication);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
|
||||
/// </summary>
|
||||
public string? Secret { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user facing code used so the user can quickly differentiate this request from others.
|
||||
/// </summary>
|
||||
public string? Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the private access token.
|
||||
/// </summary>
|
||||
public string? Authentication { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an error message.
|
||||
/// </summary>
|
||||
public string? Error { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DateTime that this request was created.
|
||||
/// </summary>
|
||||
public DateTime? DateAdded { get; set; }
|
||||
}
|
||||
}
|
||||
23
MediaBrowser.Model/QuickConnect/QuickConnectState.cs
Normal file
23
MediaBrowser.Model/QuickConnect/QuickConnectState.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace MediaBrowser.Model.QuickConnect
|
||||
{
|
||||
/// <summary>
|
||||
/// Quick connect state.
|
||||
/// </summary>
|
||||
public enum QuickConnectState
|
||||
{
|
||||
/// <summary>
|
||||
/// This feature has not been opted into and is unavailable until the server administrator chooses to opt-in.
|
||||
/// </summary>
|
||||
Unavailable = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The feature is enabled for use on the server but is not currently accepting connection requests.
|
||||
/// </summary>
|
||||
Available = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The feature is actively accepting connection requests.
|
||||
/// </summary>
|
||||
Active = 2
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
#nullable disable
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies a single API endpoint.
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Property, AllowMultiple = true, Inherited = true)]
|
||||
public class ApiMemberAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets verb to which applies attribute. By default applies to all verbs.
|
||||
/// </summary>
|
||||
public string Verb { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets parameter type: It can be only one of the following: path, query, body, form, or header.
|
||||
/// </summary>
|
||||
public string ParameterType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets unique name for the parameter. Each name must be unique, even if they are associated with different paramType values.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>
|
||||
/// Other notes on the name field:
|
||||
/// If paramType is body, the name is used only for UI and codegeneration.
|
||||
/// If paramType is path, the name field must correspond to the associated path segment from the path field in the api object.
|
||||
/// If paramType is query, the name field corresponds to the query param name.
|
||||
/// </para>
|
||||
/// </remarks>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the human-readable description for the parameter.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For path, query, and header paramTypes, this field must be a primitive. For body, this can be a complex or container datatype.
|
||||
/// </summary>
|
||||
public string DataType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For path, this is always true. Otherwise, this field tells the client whether or not the field must be supplied.
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For query params, this specifies that a comma-separated list of values can be passed to the API. For path and body types, this field cannot be true.
|
||||
/// </summary>
|
||||
public bool AllowMultiple { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets route to which applies attribute, matches using StartsWith. By default applies to all routes.
|
||||
/// </summary>
|
||||
public string Route { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to exclude this property from being included in the ModelSchema.
|
||||
/// </summary>
|
||||
public bool ExcludeInSchema { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IAsyncStreamWriter
|
||||
{
|
||||
Task WriteToAsync(Stream responseStream, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IHasHeaders
|
||||
{
|
||||
IDictionary<string, string> Headers { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IHasRequestFilter
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the order in which Request Filters are executed.
|
||||
/// <0 Executed before global request filters.
|
||||
/// >0 Executed after global request filters.
|
||||
/// </summary>
|
||||
int Priority { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The request filter is executed before the service.
|
||||
/// </summary>
|
||||
/// <param name="req">The http request wrapper.</param>
|
||||
/// <param name="res">The http response wrapper.</param>
|
||||
/// <param name="requestDto">The request DTO.</param>
|
||||
void RequestFilter(IRequest req, HttpResponse res, object requestDto);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IHttpRequest : IRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the HTTP Verb.
|
||||
/// </summary>
|
||||
string HttpMethod { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the value of the Accept HTTP Request Header.
|
||||
/// </summary>
|
||||
string Accept { get; }
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Net;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IHttpResult : IHasHeaders
|
||||
{
|
||||
/// <summary>
|
||||
/// The HTTP Response Status.
|
||||
/// </summary>
|
||||
int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The HTTP Response Status Code.
|
||||
/// </summary>
|
||||
HttpStatusCode StatusCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The HTTP Response ContentType.
|
||||
/// </summary>
|
||||
string ContentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Response DTO.
|
||||
/// </summary>
|
||||
object Response { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds the request call context.
|
||||
/// </summary>
|
||||
IRequest RequestContext { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IRequest
|
||||
{
|
||||
HttpResponse Response { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the service being called (e.g. Request DTO Name)
|
||||
/// </summary>
|
||||
string OperationName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The Verb / HttpMethod or Action for this request
|
||||
/// </summary>
|
||||
string Verb { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The request ContentType.
|
||||
/// </summary>
|
||||
string ContentType { get; }
|
||||
|
||||
bool IsLocal { get; }
|
||||
|
||||
string UserAgent { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The expected Response ContentType for this request.
|
||||
/// </summary>
|
||||
string ResponseContentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Attach any data to this request that all filters and services can access.
|
||||
/// </summary>
|
||||
Dictionary<string, object> Items { get; }
|
||||
|
||||
IHeaderDictionary Headers { get; }
|
||||
|
||||
IQueryCollection QueryString { get; }
|
||||
|
||||
string RawUrl { get; }
|
||||
|
||||
string AbsoluteUri { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The Remote Ip as reported by X-Forwarded-For, X-Real-IP or Request.UserHostAddress
|
||||
/// </summary>
|
||||
string RemoteIp { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The value of the Authorization Header used to send the Api Key, null if not available.
|
||||
/// </summary>
|
||||
string Authorization { get; }
|
||||
|
||||
string[] AcceptTypes { get; }
|
||||
|
||||
string PathInfo { get; }
|
||||
|
||||
Stream InputStream { get; }
|
||||
|
||||
long ContentLength { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The value of the Referrer, null if not available.
|
||||
/// </summary>
|
||||
Uri UrlReferrer { get; }
|
||||
}
|
||||
|
||||
public interface IHttpFile
|
||||
{
|
||||
string Name { get; }
|
||||
|
||||
string FileName { get; }
|
||||
|
||||
long ContentLength { get; }
|
||||
|
||||
string ContentType { get; }
|
||||
|
||||
Stream InputStream { get; }
|
||||
}
|
||||
|
||||
public interface IRequiresRequest
|
||||
{
|
||||
IRequest Request { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IRequiresRequestStream
|
||||
{
|
||||
/// <summary>
|
||||
/// The raw Http Request Input Stream.
|
||||
/// </summary>
|
||||
Stream RequestStream { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
// marker interface
|
||||
public interface IService
|
||||
{
|
||||
}
|
||||
|
||||
public interface IReturn { }
|
||||
|
||||
public interface IReturn<T> : IReturn { }
|
||||
|
||||
public interface IReturnVoid : IReturn { }
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
public interface IStreamWriter
|
||||
{
|
||||
void WriteTo(Stream responseStream);
|
||||
}
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using MediaBrowser.Model.Dto;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
// Remove this garbage class, it's just a bastard copy of NameValueCollection
|
||||
public class QueryParamCollection : List<NameValuePair>
|
||||
{
|
||||
public QueryParamCollection()
|
||||
{
|
||||
}
|
||||
|
||||
private static StringComparison GetStringComparison()
|
||||
{
|
||||
return StringComparison.OrdinalIgnoreCase;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds a new query parameter.
|
||||
/// </summary>
|
||||
public void Add(string key, string value)
|
||||
{
|
||||
Add(new NameValuePair(key, value));
|
||||
}
|
||||
|
||||
private void Set(string key, string value)
|
||||
{
|
||||
if (string.IsNullOrEmpty(value))
|
||||
{
|
||||
var parameters = GetItems(key);
|
||||
|
||||
foreach (var p in parameters)
|
||||
{
|
||||
Remove(p);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var pair in this)
|
||||
{
|
||||
var stringComparison = GetStringComparison();
|
||||
|
||||
if (string.Equals(key, pair.Name, stringComparison))
|
||||
{
|
||||
pair.Value = value;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Add(key, value);
|
||||
}
|
||||
|
||||
private string Get(string name)
|
||||
{
|
||||
var stringComparison = GetStringComparison();
|
||||
|
||||
foreach (var pair in this)
|
||||
{
|
||||
if (string.Equals(pair.Name, name, stringComparison))
|
||||
{
|
||||
return pair.Value;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private List<NameValuePair> GetItems(string name)
|
||||
{
|
||||
var stringComparison = GetStringComparison();
|
||||
|
||||
var list = new List<NameValuePair>();
|
||||
|
||||
foreach (var pair in this)
|
||||
{
|
||||
if (string.Equals(pair.Name, name, stringComparison))
|
||||
{
|
||||
list.Add(pair);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public virtual List<string> GetValues(string name)
|
||||
{
|
||||
var stringComparison = GetStringComparison();
|
||||
|
||||
var list = new List<string>();
|
||||
|
||||
foreach (var pair in this)
|
||||
{
|
||||
if (string.Equals(pair.Name, name, stringComparison))
|
||||
{
|
||||
list.Add(pair.Value);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
public IEnumerable<string> Keys
|
||||
{
|
||||
get
|
||||
{
|
||||
var keys = new string[this.Count];
|
||||
|
||||
for (var i = 0; i < keys.Length; i++)
|
||||
{
|
||||
keys[i] = this[i].Name;
|
||||
}
|
||||
|
||||
return keys;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a query parameter value by name. A query may contain multiple values of the same name
|
||||
/// (i.e. "x=1&x=2"), in which case the value is an array, which works for both getting and setting.
|
||||
/// </summary>
|
||||
/// <param name="name">The query parameter name.</param>
|
||||
/// <returns>The query parameter value or array of values.</returns>
|
||||
public string this[string name]
|
||||
{
|
||||
get => Get(name);
|
||||
set => Set(name, value);
|
||||
}
|
||||
|
||||
private string GetQueryStringValue(NameValuePair pair)
|
||||
{
|
||||
return pair.Name + "=" + pair.Value;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
var vals = this.Select(GetQueryStringValue).ToArray();
|
||||
|
||||
return string.Join("&", vals);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,163 +0,0 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.Services
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
|
||||
public class RouteAttribute : Attribute
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>Initializes an instance of the <see cref="RouteAttribute"/> class.</para>
|
||||
/// </summary>
|
||||
/// <param name="path">
|
||||
/// <para>The path template to map to the request. See
|
||||
/// <see cref="Path">RouteAttribute.Path</see>
|
||||
/// for details on the correct format.</para>
|
||||
/// </param>
|
||||
public RouteAttribute(string path)
|
||||
: this(path, null)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>Initializes an instance of the <see cref="RouteAttribute"/> class.</para>
|
||||
/// </summary>
|
||||
/// <param name="path">
|
||||
/// <para>The path template to map to the request. See
|
||||
/// <see cref="Path">RouteAttribute.Path</see>
|
||||
/// for details on the correct format.</para>
|
||||
/// </param>
|
||||
/// <param name="verbs">A comma-delimited list of HTTP verbs supported by the
|
||||
/// service. If unspecified, all verbs are assumed to be supported.</param>
|
||||
public RouteAttribute(string path, string verbs)
|
||||
{
|
||||
Path = path;
|
||||
Verbs = verbs;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the path template to be mapped to the request.
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="String"/> value providing the path mapped to
|
||||
/// the request. Never <see langword="null"/>.
|
||||
/// </value>
|
||||
/// <remarks>
|
||||
/// <para>Some examples of valid paths are:</para>
|
||||
///
|
||||
/// <list>
|
||||
/// <item>"/Inventory"</item>
|
||||
/// <item>"/Inventory/{Category}/{ItemId}"</item>
|
||||
/// <item>"/Inventory/{ItemPath*}"</item>
|
||||
/// </list>
|
||||
///
|
||||
/// <para>Variables are specified within "{}"
|
||||
/// brackets. Each variable in the path is mapped to the same-named property
|
||||
/// on the request DTO. At runtime, ServiceStack will parse the
|
||||
/// request URL, extract the variable values, instantiate the request DTO,
|
||||
/// and assign the variable values into the corresponding request properties,
|
||||
/// prior to passing the request DTO to the service object for processing.</para>
|
||||
///
|
||||
/// <para>It is not necessary to specify all request properties as
|
||||
/// variables in the path. For unspecified properties, callers may provide
|
||||
/// values in the query string. For example: the URL
|
||||
/// "http://services/Inventory?Category=Books&ItemId=12345" causes the same
|
||||
/// request DTO to be processed as "http://services/Inventory/Books/12345",
|
||||
/// provided that the paths "/Inventory" (which supports the first URL) and
|
||||
/// "/Inventory/{Category}/{ItemId}" (which supports the second URL)
|
||||
/// are both mapped to the request DTO.</para>
|
||||
///
|
||||
/// <para>Please note that while it is possible to specify property values
|
||||
/// in the query string, it is generally considered to be less RESTful and
|
||||
/// less desirable than to specify them as variables in the path. Using the
|
||||
/// query string to specify property values may also interfere with HTTP
|
||||
/// caching.</para>
|
||||
///
|
||||
/// <para>The final variable in the path may contain a "*" suffix
|
||||
/// to grab all remaining segments in the path portion of the request URL and assign
|
||||
/// them to a single property on the request DTO.
|
||||
/// For example, if the path "/Inventory/{ItemPath*}" is mapped to the request DTO,
|
||||
/// then the request URL "http://services/Inventory/Books/12345" will result
|
||||
/// in a request DTO whose ItemPath property contains "Books/12345".
|
||||
/// You may only specify one such variable in the path, and it must be positioned at
|
||||
/// the end of the path.</para>
|
||||
/// </remarks>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets short summary of what the route does.
|
||||
/// </summary>
|
||||
public string Summary { get; set; }
|
||||
|
||||
public string Description { get; set; }
|
||||
|
||||
public bool IsHidden { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets longer text to explain the behaviour of the route.
|
||||
/// </summary>
|
||||
public string Notes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a comma-delimited list of HTTP verbs supported by the service, such as
|
||||
/// "GET,PUT,POST,DELETE".
|
||||
/// </summary>
|
||||
/// <value>
|
||||
/// A <see cref="String"/> providing a comma-delimited list of HTTP verbs supported
|
||||
/// by the service, <see langword="null"/> or empty if all verbs are supported.
|
||||
/// </value>
|
||||
public string Verbs { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Used to rank the precedences of route definitions in reverse routing.
|
||||
/// i.e. Priorities below 0 are auto-generated have less precedence.
|
||||
/// </summary>
|
||||
public int Priority { get; set; }
|
||||
|
||||
protected bool Equals(RouteAttribute other)
|
||||
{
|
||||
return base.Equals(other)
|
||||
&& string.Equals(Path, other.Path)
|
||||
&& string.Equals(Summary, other.Summary)
|
||||
&& string.Equals(Notes, other.Notes)
|
||||
&& string.Equals(Verbs, other.Verbs)
|
||||
&& Priority == other.Priority;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (ReferenceEquals(null, obj))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ReferenceEquals(this, obj))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
if (obj.GetType() != this.GetType())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return Equals((RouteAttribute)obj);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
var hashCode = base.GetHashCode();
|
||||
hashCode = (hashCode * 397) ^ (Path != null ? Path.GetHashCode() : 0);
|
||||
hashCode = (hashCode * 397) ^ (Summary != null ? Summary.GetHashCode() : 0);
|
||||
hashCode = (hashCode * 397) ^ (Notes != null ? Notes.GetHashCode() : 0);
|
||||
hashCode = (hashCode * 397) ^ (Verbs != null ? Verbs.GetHashCode() : 0);
|
||||
hashCode = (hashCode * 397) ^ Priority;
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Services;
|
||||
|
||||
namespace MediaBrowser.Model.Session
|
||||
{
|
||||
@@ -15,21 +14,18 @@ namespace MediaBrowser.Model.Session
|
||||
/// Gets or sets the item ids.
|
||||
/// </summary>
|
||||
/// <value>The item ids.</value>
|
||||
[ApiMember(Name = "ItemIds", Description = "The ids of the items to play, comma delimited", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST", AllowMultiple = true)]
|
||||
public Guid[] ItemIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the start position ticks that the first item should be played at.
|
||||
/// </summary>
|
||||
/// <value>The start position ticks.</value>
|
||||
[ApiMember(Name = "StartPositionTicks", Description = "The starting position of the first item.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "POST")]
|
||||
public long? StartPositionTicks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the play command.
|
||||
/// </summary>
|
||||
/// <value>The play command.</value>
|
||||
[ApiMember(Name = "PlayCommand", Description = "The type of play command to issue (PlayNow, PlayNext, PlayLast). Clients who have not yet implemented play next and play last may play now.", IsRequired = true, DataType = "string", ParameterType = "query", Verb = "POST")]
|
||||
public PlayCommand PlayCommand { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
using System;
|
||||
using MediaBrowser.Model.Events;
|
||||
using Jellyfin.Data.Events;
|
||||
|
||||
namespace MediaBrowser.Model.Tasks
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Events;
|
||||
using Jellyfin.Data.Events;
|
||||
|
||||
namespace MediaBrowser.Model.Tasks
|
||||
{
|
||||
|
||||
@@ -80,11 +80,11 @@ namespace MediaBrowser.Model.Users
|
||||
|
||||
public bool EnableAllDevices { get; set; }
|
||||
|
||||
public string[] EnabledChannels { get; set; }
|
||||
public Guid[] EnabledChannels { get; set; }
|
||||
|
||||
public bool EnableAllChannels { get; set; }
|
||||
|
||||
public string[] EnabledFolders { get; set; }
|
||||
public Guid[] EnabledFolders { get; set; }
|
||||
|
||||
public bool EnableAllFolders { get; set; }
|
||||
|
||||
@@ -94,9 +94,9 @@ namespace MediaBrowser.Model.Users
|
||||
|
||||
public bool EnablePublicSharing { get; set; }
|
||||
|
||||
public string[] BlockedMediaFolders { get; set; }
|
||||
public Guid[] BlockedMediaFolders { get; set; }
|
||||
|
||||
public string[] BlockedChannels { get; set; }
|
||||
public Guid[] BlockedChannels { get; set; }
|
||||
|
||||
public int RemoteClientBitrateLimit { get; set; }
|
||||
|
||||
@@ -145,10 +145,10 @@ namespace MediaBrowser.Model.Users
|
||||
LoginAttemptsBeforeLockout = -1;
|
||||
|
||||
EnableAllChannels = true;
|
||||
EnabledChannels = Array.Empty<string>();
|
||||
EnabledChannels = Array.Empty<Guid>();
|
||||
|
||||
EnableAllFolders = true;
|
||||
EnabledFolders = Array.Empty<string>();
|
||||
EnabledFolders = Array.Empty<Guid>();
|
||||
|
||||
EnabledDevices = Array.Empty<string>();
|
||||
EnableAllDevices = true;
|
||||
|
||||
Reference in New Issue
Block a user