mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 19:08:27 +01:00
Merge branch 'master' into hwaccel
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
using Jellyfin.Data.Enums;
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public enum DynamicDayOfWeek
|
||||
{
|
||||
Sunday = 0,
|
||||
Monday = 1,
|
||||
Tuesday = 2,
|
||||
Wednesday = 3,
|
||||
Thursday = 4,
|
||||
Friday = 5,
|
||||
Saturday = 6,
|
||||
Everyday = 7,
|
||||
Weekday = 8,
|
||||
Weekend = 9
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public enum SubtitlePlaybackMode
|
||||
{
|
||||
Default = 0,
|
||||
Always = 1,
|
||||
OnlyForced = 2,
|
||||
None = 3,
|
||||
Smart = 4
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum SyncPlayAccess.
|
||||
/// </summary>
|
||||
public enum SyncPlayAccess
|
||||
{
|
||||
/// <summary>
|
||||
/// User can create groups and join them.
|
||||
/// </summary>
|
||||
CreateAndJoinGroups,
|
||||
|
||||
/// <summary>
|
||||
/// User can only join already existing groups.
|
||||
/// </summary>
|
||||
JoinGroups,
|
||||
|
||||
/// <summary>
|
||||
/// SyncPlay is disabled for the user.
|
||||
/// </summary>
|
||||
None
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
public enum UnratedItem
|
||||
{
|
||||
Movie,
|
||||
Trailer,
|
||||
Series,
|
||||
Music,
|
||||
Book,
|
||||
LiveTvChannel,
|
||||
LiveTvProgram,
|
||||
ChannelContent,
|
||||
Other
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
|
||||
namespace MediaBrowser.Model.Configuration
|
||||
{
|
||||
|
||||
@@ -79,11 +79,11 @@ namespace MediaBrowser.Model.Dlna
|
||||
DlnaFlags.InteractiveTransferMode |
|
||||
DlnaFlags.DlnaV15;
|
||||
|
||||
//if (isDirectStream)
|
||||
// if (isDirectStream)
|
||||
//{
|
||||
// flagValue = flagValue | DlnaFlags.ByteBasedSeek;
|
||||
//}
|
||||
//else if (runtimeTicks.HasValue)
|
||||
// else if (runtimeTicks.HasValue)
|
||||
//{
|
||||
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
|
||||
//}
|
||||
@@ -148,11 +148,11 @@ namespace MediaBrowser.Model.Dlna
|
||||
DlnaFlags.InteractiveTransferMode |
|
||||
DlnaFlags.DlnaV15;
|
||||
|
||||
//if (isDirectStream)
|
||||
// if (isDirectStream)
|
||||
//{
|
||||
// flagValue = flagValue | DlnaFlags.ByteBasedSeek;
|
||||
//}
|
||||
//else if (runtimeTicks.HasValue)
|
||||
// else if (runtimeTicks.HasValue)
|
||||
//{
|
||||
// flagValue = flagValue | DlnaFlags.TimeBasedSeek;
|
||||
//}
|
||||
|
||||
@@ -158,7 +158,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
return new MediaFormatProfile[] { ValueOf(string.Format("VC1_TS_HD_DTS{0}", suffix)) };
|
||||
}
|
||||
|
||||
}
|
||||
else if (string.Equals(videoCodec, "mpeg4", StringComparison.OrdinalIgnoreCase) || string.Equals(videoCodec, "msmpeg4", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value)
|
||||
: this(condition, property, value, false)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public ProfileCondition(ProfileConditionType condition, ProfileConditionValue property, string value, bool isRequired)
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
public SortCriteria(string value)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
||||
}).ThenBy(i =>
|
||||
{
|
||||
switch (i.PlayMethod)
|
||||
@@ -121,7 +120,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
}).ThenBy(i =>
|
||||
{
|
||||
switch (i.MediaSource.Protocol)
|
||||
@@ -131,7 +129,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
default:
|
||||
return 1;
|
||||
}
|
||||
|
||||
}).ThenBy(i =>
|
||||
{
|
||||
if (maxBitrate > 0)
|
||||
@@ -143,7 +140,6 @@ namespace MediaBrowser.Model.Dlna
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}).ThenBy(streams.IndexOf);
|
||||
}
|
||||
|
||||
@@ -781,7 +777,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (!ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
|
||||
{
|
||||
//LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
|
||||
// LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
|
||||
applyConditions = false;
|
||||
break;
|
||||
}
|
||||
@@ -825,7 +821,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
|
||||
if (!ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, inputAudioBitrate, inputAudioSampleRate, inputAudioBitDepth, audioProfile, isSecondaryAudio))
|
||||
{
|
||||
//LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
|
||||
// LogConditionFailure(options.Profile, "VideoCodecProfile.ApplyConditions", applyCondition, item);
|
||||
applyConditions = false;
|
||||
break;
|
||||
}
|
||||
@@ -1046,7 +1042,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if (!ConditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
|
||||
{
|
||||
//LogConditionFailure(profile, "VideoCodecProfile.ApplyConditions", applyCondition, mediaSource);
|
||||
// LogConditionFailure(profile, "VideoCodecProfile.ApplyConditions", applyCondition, mediaSource);
|
||||
applyConditions = false;
|
||||
break;
|
||||
}
|
||||
@@ -1092,7 +1088,7 @@ namespace MediaBrowser.Model.Dlna
|
||||
{
|
||||
if (!ConditionProcessor.IsVideoAudioConditionSatisfied(applyCondition, audioChannels, audioBitrate, audioSampleRate, audioBitDepth, audioProfile, isSecondaryAudio))
|
||||
{
|
||||
//LogConditionFailure(profile, "VideoAudioCodecProfile.ApplyConditions", applyCondition, mediaSource);
|
||||
// LogConditionFailure(profile, "VideoAudioCodecProfile.ApplyConditions", applyCondition, mediaSource);
|
||||
applyConditions = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ namespace MediaBrowser.Model.Dto
|
||||
/// Gets or sets the locked fields.
|
||||
/// </summary>
|
||||
/// <value>The locked fields.</value>
|
||||
public MetadataFields[] LockedFields { get; set; }
|
||||
public MetadataField[] LockedFields { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the trailer count.
|
||||
|
||||
@@ -63,6 +63,11 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <summary>
|
||||
/// The box rear.
|
||||
/// </summary>
|
||||
BoxRear = 11
|
||||
BoxRear = 11,
|
||||
|
||||
/// <summary>
|
||||
/// The user profile image.
|
||||
/// </summary>
|
||||
Profile = 12
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ namespace MediaBrowser.Model.Entities
|
||||
{
|
||||
if (Type == MediaStreamType.Audio)
|
||||
{
|
||||
//if (!string.IsNullOrEmpty(Title))
|
||||
// if (!string.IsNullOrEmpty(Title))
|
||||
//{
|
||||
// return AddLanguageIfNeeded(Title);
|
||||
//}
|
||||
@@ -208,7 +208,6 @@ namespace MediaBrowser.Model.Entities
|
||||
|
||||
if (Type == MediaStreamType.Video)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -3,7 +3,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <summary>
|
||||
/// Enum MetadataFields.
|
||||
/// </summary>
|
||||
public enum MetadataFields
|
||||
public enum MetadataField
|
||||
{
|
||||
/// <summary>
|
||||
/// The cast.
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <summary>
|
||||
/// Enum MetadataProviders
|
||||
/// </summary>
|
||||
public enum MetadataProviders
|
||||
public enum MetadataProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// The imdb
|
||||
@@ -36,6 +36,5 @@ namespace MediaBrowser.Model.Entities
|
||||
/// Gets or sets the time of review.
|
||||
/// </summary>
|
||||
public DateTime timestamp { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
|
||||
public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
public static bool HasProviderId(this IHasProviderIds instance, MetadataProvider provider)
|
||||
{
|
||||
return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string? GetProviderId(this IHasProviderIds instance, MetadataProviders provider)
|
||||
public static string? GetProviderId(this IHasProviderIds instance, MetadataProvider provider)
|
||||
{
|
||||
return instance.GetProviderId(provider.ToString());
|
||||
}
|
||||
@@ -94,7 +94,7 @@ namespace MediaBrowser.Model.Entities
|
||||
/// <param name="instance">The instance.</param>
|
||||
/// <param name="provider">The provider.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
public static void SetProviderId(this IHasProviderIds instance, MetadataProviders provider, string value)
|
||||
public static void SetProviderId(this IHasProviderIds instance, MetadataProvider provider, string value)
|
||||
{
|
||||
instance.SetProviderId(provider.ToString(), value);
|
||||
}
|
||||
|
||||
@@ -41,6 +41,5 @@ namespace MediaBrowser.Model.LiveTv
|
||||
/// </summary>
|
||||
/// <value>The program information.</value>
|
||||
public BaseItemDto ProgramInfo { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="3.1.5" />
|
||||
<PackageReference Include="System.Globalization" Version="4.3.0" />
|
||||
<PackageReference Include="System.Text.Json" Version="4.7.2" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace MediaBrowser.Model.Net
|
||||
public HttpException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using Jellyfin.Data.Enums;
|
||||
using MediaBrowser.Model.Extensions;
|
||||
using System.Linq;
|
||||
using Jellyfin.Data.Entities;
|
||||
using MediaBrowser.Model.Users;
|
||||
|
||||
namespace MediaBrowser.Model.Notifications
|
||||
@@ -104,7 +107,7 @@ namespace MediaBrowser.Model.Notifications
|
||||
!opt.DisabledMonitorUsers.Contains(userId.ToString(""), StringComparer.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy)
|
||||
public bool IsEnabledToSendToUser(string type, string userId, User user)
|
||||
{
|
||||
NotificationOption opt = GetOptions(type);
|
||||
|
||||
@@ -115,7 +118,7 @@ namespace MediaBrowser.Model.Notifications
|
||||
return true;
|
||||
}
|
||||
|
||||
if (opt.SendToUserMode == SendToUserType.Admins && userPolicy.IsAdministrator)
|
||||
if (opt.SendToUserMode == SendToUserType.Admins && user.HasPermission(PermissionKind.IsAdministrator))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -51,6 +51,5 @@ namespace MediaBrowser.Model.Providers
|
||||
|
||||
public RemoteSearchResult[] Artists { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,42 +9,52 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// The user-joined update. Tells members of a group about a new user.
|
||||
/// </summary>
|
||||
UserJoined,
|
||||
|
||||
/// <summary>
|
||||
/// The user-left update. Tells members of a group that a user left.
|
||||
/// </summary>
|
||||
UserLeft,
|
||||
|
||||
/// <summary>
|
||||
/// The group-joined update. Tells a user that the group has been joined.
|
||||
/// </summary>
|
||||
GroupJoined,
|
||||
|
||||
/// <summary>
|
||||
/// The group-left update. Tells a user that the group has been left.
|
||||
/// </summary>
|
||||
GroupLeft,
|
||||
|
||||
/// <summary>
|
||||
/// The group-wait update. Tells members of the group that a user is buffering.
|
||||
/// </summary>
|
||||
GroupWait,
|
||||
|
||||
/// <summary>
|
||||
/// The prepare-session update. Tells a user to load some content.
|
||||
/// </summary>
|
||||
PrepareSession,
|
||||
|
||||
/// <summary>
|
||||
/// The not-in-group error. Tells a user that they don't belong to a group.
|
||||
/// </summary>
|
||||
NotInGroup,
|
||||
|
||||
/// <summary>
|
||||
/// The group-does-not-exist error. Sent when trying to join a non-existing group.
|
||||
/// </summary>
|
||||
GroupDoesNotExist,
|
||||
|
||||
/// <summary>
|
||||
/// The create-group-denied error. Sent when a user tries to create a group without required permissions.
|
||||
/// </summary>
|
||||
CreateGroupDenied,
|
||||
|
||||
/// <summary>
|
||||
/// The join-group-denied error. Sent when a user tries to join a group without required permissions.
|
||||
/// </summary>
|
||||
JoinGroupDenied,
|
||||
|
||||
/// <summary>
|
||||
/// The library-access-denied error. Sent when a user tries to join a group without required access to the library.
|
||||
/// </summary>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace MediaBrowser.Model.SyncPlay
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum PlaybackRequestType
|
||||
/// Enum PlaybackRequestType.
|
||||
/// </summary>
|
||||
public enum PlaybackRequestType
|
||||
{
|
||||
@@ -9,22 +9,27 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// A user is requesting a play command for the group.
|
||||
/// </summary>
|
||||
Play = 0,
|
||||
|
||||
/// <summary>
|
||||
/// A user is requesting a pause command for the group.
|
||||
/// </summary>
|
||||
Pause = 1,
|
||||
|
||||
/// <summary>
|
||||
/// A user is requesting a seek command for the group.
|
||||
/// </summary>
|
||||
Seek = 2,
|
||||
|
||||
/// <summary>
|
||||
/// A user is signaling that playback is buffering.
|
||||
/// </summary>
|
||||
Buffering = 3,
|
||||
|
||||
/// <summary>
|
||||
/// A user is signaling that playback resumed.
|
||||
/// </summary>
|
||||
BufferingDone = 4,
|
||||
|
||||
/// <summary>
|
||||
/// A user is reporting its ping.
|
||||
/// </summary>
|
||||
|
||||
@@ -9,10 +9,12 @@ namespace MediaBrowser.Model.SyncPlay
|
||||
/// The play command. Instructs users to start playback.
|
||||
/// </summary>
|
||||
Play = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The pause command. Instructs users to pause playback.
|
||||
/// </summary>
|
||||
Pause = 1,
|
||||
|
||||
/// <summary>
|
||||
/// The seek command. Instructs users to seek to a specified time.
|
||||
/// </summary>
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
using MediaBrowser.Model.Configuration;
|
||||
using System.Xml.Serialization;
|
||||
using Jellyfin.Data.Enums;
|
||||
using AccessSchedule = Jellyfin.Data.Entities.AccessSchedule;
|
||||
|
||||
namespace MediaBrowser.Model.Users
|
||||
{
|
||||
@@ -78,6 +80,8 @@ namespace MediaBrowser.Model.Users
|
||||
public string[] BlockedChannels { get; set; }
|
||||
|
||||
public int RemoteClientBitrateLimit { get; set; }
|
||||
|
||||
[XmlElement(ElementName = "AuthenticationProviderId")]
|
||||
public string AuthenticationProviderId { get; set; }
|
||||
public string PasswordResetProviderId { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user