Initial migration code

This commit is contained in:
Patrick Barron
2020-05-12 22:10:35 -04:00
parent a78184ef44
commit 9ad839c776
135 changed files with 2114 additions and 3260 deletions

View File

@@ -1,3 +1,5 @@
using Jellyfin.Data.Enums;
#pragma warning disable CS1591
namespace MediaBrowser.Model.Configuration

View File

@@ -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
}
}

View File

@@ -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
}
}

View File

@@ -1,17 +0,0 @@
#pragma warning disable CS1591
namespace MediaBrowser.Model.Configuration
{
public enum UnratedItem
{
Movie,
Trailer,
Series,
Music,
Book,
LiveTvChannel,
LiveTvProgram,
ChannelContent,
Other
}
}

View File

@@ -1,6 +1,7 @@
#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Configuration
{

View File

@@ -1,6 +1,7 @@
#pragma warning disable CS1591
using System;
using Jellyfin.Data.Enums;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.Users;
@@ -109,7 +110,7 @@ namespace MediaBrowser.Model.Notifications
!ListHelper.ContainsIgnoreCase(opt.DisabledMonitorUsers, userId.ToString(""));
}
public bool IsEnabledToSendToUser(string type, string userId, UserPolicy userPolicy)
public bool IsEnabledToSendToUser(string type, string userId, Jellyfin.Data.Entities.User user)
{
NotificationOption opt = GetOptions(type);
@@ -120,7 +121,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;
}

View File

@@ -1,7 +1,8 @@
#pragma warning disable CS1591
using System;
using MediaBrowser.Model.Configuration;
using Jellyfin.Data.Entities;
using Jellyfin.Data.Enums;
namespace MediaBrowser.Model.Users
{
@@ -33,7 +34,7 @@ namespace MediaBrowser.Model.Users
public string[] BlockedTags { get; set; }
public bool EnableUserPreferenceAccess { get; set; }
public AccessSchedule[] AccessSchedules { get; set; }
public Jellyfin.Data.Entities.AccessSchedule[] AccessSchedules { get; set; }
public UnratedItem[] BlockUnratedItems { get; set; }
public bool EnableRemoteControlOfOtherUsers { get; set; }
public bool EnableSharedDeviceControl { get; set; }
@@ -77,7 +78,7 @@ namespace MediaBrowser.Model.Users
public string[] BlockedChannels { get; set; }
public int RemoteClientBitrateLimit { get; set; }
public string AuthenticationProviderId { get; set; }
public string AuthenticatioIsnProviderId { get; set; }
public string PasswordResetProviderId { get; set; }
public UserPolicy()