Explorar o código

Replace Weekday with DayOfWeek

Patrick Barron %!s(int64=5) %!d(string=hai) anos
pai
achega
42177d1739

+ 6 - 14
Jellyfin.Data/Entities/Series.cs

@@ -19,14 +19,6 @@ namespace Jellyfin.Data.Entities
             Init();
         }
 
-        /// <summary>
-        /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
-        /// </summary>
-        public static Series CreateSeriesUnsafe()
-        {
-            return new Series();
-        }
-
         /// <summary>
         /// Public constructor with required data
         /// </summary>
@@ -57,27 +49,27 @@ namespace Jellyfin.Data.Entities
         /// <summary>
         /// Backing field for AirsDayOfWeek
         /// </summary>
-        protected Enums.Weekday? _AirsDayOfWeek;
+        protected DayOfWeek? _AirsDayOfWeek;
         /// <summary>
         /// When provided in a partial class, allows value of AirsDayOfWeek to be changed before setting.
         /// </summary>
-        partial void SetAirsDayOfWeek(Enums.Weekday? oldValue, ref Enums.Weekday? newValue);
+        partial void SetAirsDayOfWeek(DayOfWeek? oldValue, ref DayOfWeek? newValue);
         /// <summary>
         /// When provided in a partial class, allows value of AirsDayOfWeek to be changed before returning.
         /// </summary>
-        partial void GetAirsDayOfWeek(ref Enums.Weekday? result);
+        partial void GetAirsDayOfWeek(ref DayOfWeek? result);
 
-        public Enums.Weekday? AirsDayOfWeek
+        public DayOfWeek? AirsDayOfWeek
         {
             get
             {
-                Enums.Weekday? value = _AirsDayOfWeek;
+                DayOfWeek? value = _AirsDayOfWeek;
                 GetAirsDayOfWeek(ref value);
                 return (_AirsDayOfWeek = value);
             }
             set
             {
-                Enums.Weekday? oldValue = _AirsDayOfWeek;
+                DayOfWeek? oldValue = _AirsDayOfWeek;
                 SetAirsDayOfWeek(oldValue, ref value);
                 if (oldValue != value)
                 {

+ 0 - 6
Jellyfin.Data/Entities/User.cs

@@ -73,12 +73,6 @@ namespace Jellyfin.Data.Entities
         /// </summary>
         protected User()
         {
-            Groups = new HashSet<Group>();
-            Permissions = new HashSet<Permission>();
-            ProviderMappings = new HashSet<ProviderMapping>();
-            Preferences = new HashSet<Preference>();
-            AccessSchedules = new HashSet<AccessSchedule>();
-
             Init();
         }
 

+ 0 - 13
Jellyfin.Data/Enums/Weekday.cs

@@ -1,13 +0,0 @@
-namespace Jellyfin.Data.Enums
-{
-    public enum Weekday
-    {
-        Sunday = 0,
-        Monday = 1,
-        Tuesday = 2,
-        Wednesday = 3,
-        Thursday = 4,
-        Friday = 5,
-        Saturday = 6
-    }
-}

+ 1 - 1
Jellyfin.Server.Implementations/JellyfinDb.cs

@@ -23,7 +23,7 @@ namespace Jellyfin.Server.Implementations
 
         public virtual DbSet<Preference> Preferences { get; set; }
 
-        public virtual DbSet<Data.Entities.User> Users { get; set; }
+        public virtual DbSet<User> Users { get; set; }
         /*public virtual DbSet<Artwork> Artwork { get; set; }
         public virtual DbSet<Book> Books { get; set; }
         public virtual DbSet<BookMetadata> BookMetadata { get; set; }