mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
Merge pull request #4034 from barronpm/jellyfin-data-warnings
Fix all warnings in Jellyfin.Data
This commit is contained in:
commit
e6c22a9707
49 changed files with 419 additions and 419 deletions
|
@ -1,5 +1,3 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
@ -11,7 +9,7 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity referencing an activity log entry.
|
/// An entity referencing an activity log entry.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class ActivityLog : IHasConcurrencyToken
|
public class ActivityLog : IHasConcurrencyToken
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ActivityLog"/> class.
|
/// Initializes a new instance of the <see cref="ActivityLog"/> class.
|
||||||
|
@ -32,13 +30,11 @@ namespace Jellyfin.Data.Entities
|
||||||
throw new ArgumentNullException(nameof(type));
|
throw new ArgumentNullException(nameof(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.Name = name;
|
Name = name;
|
||||||
this.Type = type;
|
Type = type;
|
||||||
this.UserId = userId;
|
UserId = userId;
|
||||||
this.DateCreated = DateTime.UtcNow;
|
DateCreated = DateTime.UtcNow;
|
||||||
this.LogSeverity = LogLevel.Trace;
|
LogSeverity = LogLevel.Trace;
|
||||||
|
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -47,38 +43,21 @@ namespace Jellyfin.Data.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected ActivityLog()
|
protected ActivityLog()
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Static create function (for use in LINQ queries, etc.)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="name">The name.</param>
|
|
||||||
/// <param name="type">The type.</param>
|
|
||||||
/// <param name="userId">The user's id.</param>
|
|
||||||
/// <returns>The new <see cref="ActivityLog"/> instance.</returns>
|
|
||||||
public static ActivityLog Create(string name, string type, Guid userId)
|
|
||||||
{
|
|
||||||
return new ActivityLog(name, type, userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the identity of this instance.
|
/// Gets or sets the identity of this instance.
|
||||||
/// This is the key in the backing database.
|
/// This is the key in the backing database.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Key]
|
|
||||||
[Required]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public int Id { get; protected set; }
|
public int Id { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the name.
|
/// Gets or sets the name.
|
||||||
/// Required, Max length = 512.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Required, Max length = 512.
|
||||||
|
/// </remarks>
|
||||||
[Required]
|
[Required]
|
||||||
[MaxLength(512)]
|
[MaxLength(512)]
|
||||||
[StringLength(512)]
|
[StringLength(512)]
|
||||||
|
@ -86,24 +65,30 @@ namespace Jellyfin.Data.Entities
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the overview.
|
/// Gets or sets the overview.
|
||||||
/// Max length = 512.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Max length = 512.
|
||||||
|
/// </remarks>
|
||||||
[MaxLength(512)]
|
[MaxLength(512)]
|
||||||
[StringLength(512)]
|
[StringLength(512)]
|
||||||
public string Overview { get; set; }
|
public string Overview { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the short overview.
|
/// Gets or sets the short overview.
|
||||||
/// Max length = 512.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Max length = 512.
|
||||||
|
/// </remarks>
|
||||||
[MaxLength(512)]
|
[MaxLength(512)]
|
||||||
[StringLength(512)]
|
[StringLength(512)]
|
||||||
public string ShortOverview { get; set; }
|
public string ShortOverview { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the type.
|
/// Gets or sets the type.
|
||||||
/// Required, Max length = 256.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Required, Max length = 256.
|
||||||
|
/// </remarks>
|
||||||
[Required]
|
[Required]
|
||||||
[MaxLength(256)]
|
[MaxLength(256)]
|
||||||
[StringLength(256)]
|
[StringLength(256)]
|
||||||
|
@ -111,43 +96,42 @@ namespace Jellyfin.Data.Entities
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the user id.
|
/// Gets or sets the user id.
|
||||||
/// Required.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
/// <remarks>
|
||||||
|
/// Required.
|
||||||
|
/// </remarks>
|
||||||
public Guid UserId { get; set; }
|
public Guid UserId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the item id.
|
/// Gets or sets the item id.
|
||||||
/// Max length = 256.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Max length = 256.
|
||||||
|
/// </remarks>
|
||||||
[MaxLength(256)]
|
[MaxLength(256)]
|
||||||
[StringLength(256)]
|
[StringLength(256)]
|
||||||
public string ItemId { get; set; }
|
public string ItemId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the date created. This should be in UTC.
|
/// Gets or sets the date created. This should be in UTC.
|
||||||
/// Required.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
/// <remarks>
|
||||||
|
/// Required.
|
||||||
|
/// </remarks>
|
||||||
public DateTime DateCreated { get; set; }
|
public DateTime DateCreated { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the log severity. Default is <see cref="LogLevel.Trace"/>.
|
/// Gets or sets the log severity. Default is <see cref="LogLevel.Trace"/>.
|
||||||
/// Required.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
/// <remarks>
|
||||||
|
/// Required.
|
||||||
|
/// </remarks>
|
||||||
public LogLevel LogSeverity { get; set; }
|
public LogLevel LogSeverity { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// Gets or sets the row version.
|
|
||||||
/// Required, ConcurrencyToken.
|
|
||||||
/// </summary>
|
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
|
||||||
public uint RowVersion { get; set; }
|
public uint RowVersion { get; set; }
|
||||||
|
|
||||||
partial void Init();
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public void OnSavingChanges()
|
public void OnSavingChanges()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
using System;
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#pragma warning disable CS1591
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
@ -13,11 +12,10 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity representing a group.
|
/// An entity representing a group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Group : IHasPermissions, IHasConcurrencyToken
|
public class Group : IHasPermissions, IHasConcurrencyToken
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Group"/> class.
|
/// Initializes a new instance of the <see cref="Group"/> class.
|
||||||
/// Public constructor with required data.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of the group.</param>
|
/// <param name="name">The name of the group.</param>
|
||||||
public Group(string name)
|
public Group(string name)
|
||||||
|
@ -31,33 +29,25 @@ namespace Jellyfin.Data.Entities
|
||||||
Id = Guid.NewGuid();
|
Id = Guid.NewGuid();
|
||||||
|
|
||||||
Permissions = new HashSet<Permission>();
|
Permissions = new HashSet<Permission>();
|
||||||
ProviderMappings = new HashSet<ProviderMapping>();
|
|
||||||
Preferences = new HashSet<Preference>();
|
Preferences = new HashSet<Preference>();
|
||||||
|
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Group"/> class.
|
/// Initializes a new instance of the <see cref="Group"/> class.
|
||||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||||
|
/// </remarks>
|
||||||
protected Group()
|
protected Group()
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the id of this group.
|
/// Gets or sets the id of this group.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Identity, Indexed, Required.
|
/// Identity, Indexed, Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Key]
|
|
||||||
[Required]
|
|
||||||
public Guid Id { get; protected set; }
|
public Guid Id { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -71,42 +61,19 @@ namespace Jellyfin.Data.Entities
|
||||||
[StringLength(255)]
|
[StringLength(255)]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// Gets or sets the row version.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Required, Concurrency Token.
|
|
||||||
/// </remarks>
|
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
|
||||||
public uint RowVersion { get; set; }
|
public uint RowVersion { get; set; }
|
||||||
|
|
||||||
public void OnSavingChanges()
|
/// <summary>
|
||||||
{
|
/// Gets or sets a collection containing the group's permissions.
|
||||||
RowVersion++;
|
/// </summary>
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Navigation properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
[ForeignKey("Permission_GroupPermissions_Id")]
|
|
||||||
public virtual ICollection<Permission> Permissions { get; protected set; }
|
public virtual ICollection<Permission> Permissions { get; protected set; }
|
||||||
|
|
||||||
[ForeignKey("ProviderMapping_ProviderMappings_Id")]
|
|
||||||
public virtual ICollection<ProviderMapping> ProviderMappings { get; protected set; }
|
|
||||||
|
|
||||||
[ForeignKey("Preference_Preferences_Id")]
|
|
||||||
public virtual ICollection<Preference> Preferences { get; protected set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Static create function (for use in LINQ queries, etc.)
|
/// Gets or sets a collection containing the group's preferences.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of this group.</param>
|
public virtual ICollection<Preference> Preferences { get; protected set; }
|
||||||
public static Group Create(string name)
|
|
||||||
{
|
|
||||||
return new Group(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public bool HasPermission(PermissionKind kind)
|
public bool HasPermission(PermissionKind kind)
|
||||||
|
@ -120,6 +87,10 @@ namespace Jellyfin.Data.Entities
|
||||||
Permissions.First(p => p.Kind == kind).Value = value;
|
Permissions.First(p => p.Kind == kind).Value = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void Init();
|
/// <inheritdoc />
|
||||||
|
public void OnSavingChanges()
|
||||||
|
{
|
||||||
|
RowVersion++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +1,65 @@
|
||||||
#pragma warning disable CS1591
|
using System;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace Jellyfin.Data.Entities
|
namespace Jellyfin.Data.Entities
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An entity representing an image.
|
||||||
|
/// </summary>
|
||||||
public class ImageInfo
|
public class ImageInfo
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="ImageInfo"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="path">The path.</param>
|
||||||
public ImageInfo(string path)
|
public ImageInfo(string path)
|
||||||
{
|
{
|
||||||
Path = path;
|
Path = path;
|
||||||
LastModified = DateTime.UtcNow;
|
LastModified = DateTime.UtcNow;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Key]
|
/// <summary>
|
||||||
[Required]
|
/// Initializes a new instance of the <see cref="ImageInfo"/> class.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
||||||
|
/// </remarks>
|
||||||
|
protected ImageInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the id.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Identity, Indexed, Required.
|
||||||
|
/// </remarks>
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public int Id { get; protected set; }
|
public int Id { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the user id.
|
||||||
|
/// </summary>
|
||||||
public Guid? UserId { get; protected set; }
|
public Guid? UserId { get; protected set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the path of the image.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Required.
|
||||||
|
/// </remarks>
|
||||||
[Required]
|
[Required]
|
||||||
[MaxLength(512)]
|
[MaxLength(512)]
|
||||||
[StringLength(512)]
|
[StringLength(512)]
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
[Required]
|
/// <summary>
|
||||||
|
/// Gets or sets the date last modified.
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// Required.
|
||||||
|
/// </remarks>
|
||||||
public DateTime LastModified { get; set; }
|
public DateTime LastModified { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#pragma warning disable CS1591
|
using System;
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
|
|
||||||
namespace Jellyfin.Data.Entities
|
namespace Jellyfin.Data.Entities
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An entity that represents a user's display preferences for a specific item.
|
||||||
|
/// </summary>
|
||||||
public class ItemDisplayPreferences
|
public class ItemDisplayPreferences
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
@ -8,7 +10,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity containing metadata for a book.
|
/// An entity containing metadata for a book.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BookMetadata : Metadata, IHasCompanies
|
public class BookMetadata : ItemMetadata, IHasCompanies
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="BookMetadata"/> class.
|
/// Initializes a new instance of the <see cref="BookMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// Gets or sets the next item in the collection.
|
/// Gets or sets the next item in the collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// TODO check if this properly updated dependant and has the proper principal relationship
|
/// TODO check if this properly updated dependant and has the proper principal relationship.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public virtual CollectionItem Next { get; set; }
|
public virtual CollectionItem Next { get; set; }
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// Gets or sets the previous item in the collection.
|
/// Gets or sets the previous item in the collection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// TODO check if this properly updated dependant and has the proper principal relationship
|
/// TODO check if this properly updated dependant and has the proper principal relationship.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public virtual CollectionItem Previous { get; set; }
|
public virtual CollectionItem Previous { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity holding metadata for a <see cref="Company"/>.
|
/// An entity holding metadata for a <see cref="Company"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CompanyMetadata : Metadata
|
public class CompanyMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="CompanyMetadata"/> class.
|
/// Initializes a new instance of the <see cref="CompanyMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity containing metadata for a custom item.
|
/// An entity containing metadata for a custom item.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class CustomItemMetadata : Metadata
|
public class CustomItemMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
|
/// Initializes a new instance of the <see cref="CustomItemMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity containing metadata for an <see cref="Episode"/>.
|
/// An entity containing metadata for an <see cref="Episode"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class EpisodeMetadata : Metadata
|
public class EpisodeMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="EpisodeMetadata"/> class.
|
/// Initializes a new instance of the <see cref="EpisodeMetadata"/> class.
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// Initializes a new instance of the <see cref="Genre"/> class.
|
/// Initializes a new instance of the <see cref="Genre"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name.</param>
|
/// <param name="name">The name.</param>
|
||||||
/// <param name="metadata">The metadata.</param>
|
/// <param name="itemMetadata">The metadata.</param>
|
||||||
public Genre(string name, Metadata metadata)
|
public Genre(string name, ItemMetadata itemMetadata)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(name))
|
if (string.IsNullOrEmpty(name))
|
||||||
{
|
{
|
||||||
|
@ -24,12 +24,12 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
|
|
||||||
Name = name;
|
Name = name;
|
||||||
|
|
||||||
if (metadata == null)
|
if (itemMetadata == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(metadata));
|
throw new ArgumentNullException(nameof(itemMetadata));
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata.Genres.Add(this);
|
itemMetadata.Genres.Add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
@ -9,14 +11,14 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An abstract class that holds metadata.
|
/// An abstract class that holds metadata.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract class Metadata : IHasArtwork, IHasConcurrencyToken
|
public abstract class ItemMetadata : IHasArtwork, IHasConcurrencyToken
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Metadata"/> class.
|
/// Initializes a new instance of the <see cref="ItemMetadata"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="title">The title or name of the object.</param>
|
/// <param name="title">The title or name of the object.</param>
|
||||||
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
/// <param name="language">ISO-639-3 3-character language codes.</param>
|
||||||
protected Metadata(string title, string language)
|
protected ItemMetadata(string title, string language)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(title))
|
if (string.IsNullOrEmpty(title))
|
||||||
{
|
{
|
||||||
|
@ -41,12 +43,12 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Metadata"/> class.
|
/// Initializes a new instance of the <see cref="ItemMetadata"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Default constructor. Protected due to being abstract.
|
/// Default constructor. Protected due to being abstract.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected Metadata()
|
protected ItemMetadata()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
|
@ -14,8 +14,8 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// Initializes a new instance of the <see cref="MetadataProviderId"/> class.
|
/// Initializes a new instance of the <see cref="MetadataProviderId"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="providerId">The provider id.</param>
|
/// <param name="providerId">The provider id.</param>
|
||||||
/// <param name="metadata">The metadata entity.</param>
|
/// <param name="itemMetadata">The metadata entity.</param>
|
||||||
public MetadataProviderId(string providerId, Metadata metadata)
|
public MetadataProviderId(string providerId, ItemMetadata itemMetadata)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(providerId))
|
if (string.IsNullOrEmpty(providerId))
|
||||||
{
|
{
|
||||||
|
@ -24,12 +24,12 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
|
|
||||||
ProviderId = providerId;
|
ProviderId = providerId;
|
||||||
|
|
||||||
if (metadata == null)
|
if (itemMetadata == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(metadata));
|
throw new ArgumentNullException(nameof(itemMetadata));
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata.Sources.Add(this);
|
itemMetadata.Sources.Add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
@ -8,7 +10,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity holding the metadata for a movie.
|
/// An entity holding the metadata for a movie.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MovieMetadata : Metadata, IHasCompanies
|
public class MovieMetadata : ItemMetadata, IHasCompanies
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="MovieMetadata"/> class.
|
/// Initializes a new instance of the <see cref="MovieMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Jellyfin.Data.Entities.Libraries
|
namespace Jellyfin.Data.Entities.Libraries
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
|
@ -6,7 +8,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity holding the metadata for a music album.
|
/// An entity holding the metadata for a music album.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class MusicAlbumMetadata : Metadata
|
public class MusicAlbumMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class.
|
/// Initializes a new instance of the <see cref="MusicAlbumMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
@ -16,17 +18,17 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// Initializes a new instance of the <see cref="PersonRole"/> class.
|
/// Initializes a new instance of the <see cref="PersonRole"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="type">The role type.</param>
|
/// <param name="type">The role type.</param>
|
||||||
/// <param name="metadata">The metadata.</param>
|
/// <param name="itemMetadata">The metadata.</param>
|
||||||
public PersonRole(PersonRoleType type, Metadata metadata)
|
public PersonRole(PersonRoleType type, ItemMetadata itemMetadata)
|
||||||
{
|
{
|
||||||
Type = type;
|
Type = type;
|
||||||
|
|
||||||
if (metadata == null)
|
if (itemMetadata == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(metadata));
|
throw new ArgumentNullException(nameof(itemMetadata));
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata.PersonRoles.Add(this);
|
itemMetadata.PersonRoles.Add(this);
|
||||||
|
|
||||||
Sources = new HashSet<MetadataProviderId>();
|
Sources = new HashSet<MetadataProviderId>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity that holds metadata for a photo.
|
/// An entity that holds metadata for a photo.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class PhotoMetadata : Metadata
|
public class PhotoMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="PhotoMetadata"/> class.
|
/// Initializes a new instance of the <see cref="PhotoMetadata"/> class.
|
||||||
|
|
|
@ -14,17 +14,17 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// Initializes a new instance of the <see cref="Rating"/> class.
|
/// Initializes a new instance of the <see cref="Rating"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value">The value.</param>
|
/// <param name="value">The value.</param>
|
||||||
/// <param name="metadata">The metadata.</param>
|
/// <param name="itemMetadata">The metadata.</param>
|
||||||
public Rating(double value, Metadata metadata)
|
public Rating(double value, ItemMetadata itemMetadata)
|
||||||
{
|
{
|
||||||
Value = value;
|
Value = value;
|
||||||
|
|
||||||
if (metadata == null)
|
if (itemMetadata == null)
|
||||||
{
|
{
|
||||||
throw new ArgumentNullException(nameof(metadata));
|
throw new ArgumentNullException(nameof(itemMetadata));
|
||||||
}
|
}
|
||||||
|
|
||||||
metadata.Ratings.Add(this);
|
itemMetadata.Ratings.Add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity that holds metadata for seasons.
|
/// An entity that holds metadata for seasons.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SeasonMetadata : Metadata
|
public class SeasonMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SeasonMetadata"/> class.
|
/// Initializes a new instance of the <see cref="SeasonMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
@ -9,7 +11,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity representing series metadata.
|
/// An entity representing series metadata.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class SeriesMetadata : Metadata, IHasCompanies
|
public class SeriesMetadata : ItemMetadata, IHasCompanies
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="SeriesMetadata"/> class.
|
/// Initializes a new instance of the <see cref="SeriesMetadata"/> class.
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Jellyfin.Data.Interfaces;
|
using Jellyfin.Data.Interfaces;
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace Jellyfin.Data.Entities.Libraries
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity holding metadata for a track.
|
/// An entity holding metadata for a track.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class TrackMetadata : Metadata
|
public class TrackMetadata : ItemMetadata
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="TrackMetadata"/> class.
|
/// Initializes a new instance of the <see cref="TrackMetadata"/> class.
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using Jellyfin.Data.Enums;
|
using Jellyfin.Data.Enums;
|
||||||
|
@ -10,7 +8,7 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity representing whether the associated user has a specific permission.
|
/// An entity representing whether the associated user has a specific permission.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Permission : IHasConcurrencyToken
|
public class Permission : IHasConcurrencyToken
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="Permission"/> class.
|
/// Initializes a new instance of the <see cref="Permission"/> class.
|
||||||
|
@ -22,8 +20,6 @@ namespace Jellyfin.Data.Entities
|
||||||
{
|
{
|
||||||
Kind = kind;
|
Kind = kind;
|
||||||
Value = value;
|
Value = value;
|
||||||
|
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -32,21 +28,14 @@ namespace Jellyfin.Data.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected Permission()
|
protected Permission()
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the id of this permission.
|
/// Gets or sets the id of this permission.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Identity, Indexed, Required.
|
/// Identity, Indexed, Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Key]
|
|
||||||
[Required]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public int Id { get; protected set; }
|
public int Id { get; protected set; }
|
||||||
|
|
||||||
|
@ -56,7 +45,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public PermissionKind Kind { get; protected set; }
|
public PermissionKind Kind { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -65,36 +53,16 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool Value { get; set; }
|
public bool Value { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc />
|
||||||
/// Gets or sets the row version.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Required, ConcurrencyToken.
|
|
||||||
/// </remarks>
|
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
|
||||||
public uint RowVersion { get; set; }
|
public uint RowVersion { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Static create function (for use in LINQ queries, etc.)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="kind">The permission kind.</param>
|
|
||||||
/// <param name="value">The value of this permission.</param>
|
|
||||||
/// <returns>The newly created instance.</returns>
|
|
||||||
public static Permission Create(PermissionKind kind, bool value)
|
|
||||||
{
|
|
||||||
return new Permission(kind, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void OnSavingChanges()
|
public void OnSavingChanges()
|
||||||
{
|
{
|
||||||
RowVersion++;
|
RowVersion++;
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void Init();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,18 +31,12 @@ namespace Jellyfin.Data.Entities
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the id of this preference.
|
/// Gets or sets the id of this preference.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Identity, Indexed, Required.
|
/// Identity, Indexed, Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Key]
|
|
||||||
[Required]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
public int Id { get; protected set; }
|
public int Id { get; protected set; }
|
||||||
|
|
||||||
|
@ -52,7 +46,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public PreferenceKind Kind { get; protected set; }
|
public PreferenceKind Kind { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -66,27 +59,10 @@ namespace Jellyfin.Data.Entities
|
||||||
[StringLength(65535)]
|
[StringLength(65535)]
|
||||||
public string Value { get; set; }
|
public string Value { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc/>
|
||||||
/// Gets or sets the row version.
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// Required, ConcurrencyToken.
|
|
||||||
/// </remarks>
|
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
|
||||||
public uint RowVersion { get; set; }
|
public uint RowVersion { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Static create function (for use in LINQ queries, etc.)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="kind">The preference kind.</param>
|
|
||||||
/// <param name="value">The value.</param>
|
|
||||||
/// <returns>The new instance.</returns>
|
|
||||||
public static Preference Create(PreferenceKind kind, string value)
|
|
||||||
{
|
|
||||||
return new Preference(kind, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void OnSavingChanges()
|
public void OnSavingChanges()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,129 +0,0 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
|
|
||||||
namespace Jellyfin.Data.Entities
|
|
||||||
{
|
|
||||||
public partial class ProviderMapping
|
|
||||||
{
|
|
||||||
partial void Init();
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Default constructor. Protected due to required properties, but present because EF needs it.
|
|
||||||
/// </summary>
|
|
||||||
protected ProviderMapping()
|
|
||||||
{
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
|
|
||||||
/// </summary>
|
|
||||||
public static ProviderMapping CreateProviderMappingUnsafe()
|
|
||||||
{
|
|
||||||
return new ProviderMapping();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Public constructor with required data.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="providername"></param>
|
|
||||||
/// <param name="providersecrets"></param>
|
|
||||||
/// <param name="providerdata"></param>
|
|
||||||
/// <param name="_user0"></param>
|
|
||||||
/// <param name="_group1"></param>
|
|
||||||
public ProviderMapping(string providername, string providersecrets, string providerdata, User _user0, Group _group1)
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(providername))
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(providername));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ProviderName = providername;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(providersecrets))
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(providersecrets));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ProviderSecrets = providersecrets;
|
|
||||||
|
|
||||||
if (string.IsNullOrEmpty(providerdata))
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(providerdata));
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ProviderData = providerdata;
|
|
||||||
|
|
||||||
Init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Static create function (for use in LINQ queries, etc.)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="providername"></param>
|
|
||||||
/// <param name="providersecrets"></param>
|
|
||||||
/// <param name="providerdata"></param>
|
|
||||||
/// <param name="_user0"></param>
|
|
||||||
/// <param name="_group1"></param>
|
|
||||||
public static ProviderMapping Create(string providername, string providersecrets, string providerdata, User _user0, Group _group1)
|
|
||||||
{
|
|
||||||
return new ProviderMapping(providername, providersecrets, providerdata, _user0, _group1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Identity, Indexed, Required.
|
|
||||||
/// </summary>
|
|
||||||
[Key]
|
|
||||||
[Required]
|
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
|
||||||
public int Id { get; protected set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required, Max length = 255
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
[MaxLength(255)]
|
|
||||||
[StringLength(255)]
|
|
||||||
public string ProviderName { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required, Max length = 65535
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
[MaxLength(65535)]
|
|
||||||
[StringLength(65535)]
|
|
||||||
public string ProviderSecrets { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required, Max length = 65535
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
[MaxLength(65535)]
|
|
||||||
[StringLength(65535)]
|
|
||||||
public string ProviderData { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required, ConcurrenyToken.
|
|
||||||
/// </summary>
|
|
||||||
[ConcurrencyCheck]
|
|
||||||
[Required]
|
|
||||||
public uint RowVersion { get; set; }
|
|
||||||
|
|
||||||
public void OnSavingChanges()
|
|
||||||
{
|
|
||||||
RowVersion++;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Navigation properties
|
|
||||||
*************************************************************************/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#pragma warning disable CS1591
|
#pragma warning disable CA2227
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
@ -15,7 +15,7 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An entity representing a user.
|
/// An entity representing a user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class User : IHasPermissions, IHasConcurrencyToken
|
public class User : IHasPermissions, IHasConcurrencyToken
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The values being delimited here are Guids, so commas work as they do not appear in Guids.
|
/// The values being delimited here are Guids, so commas work as they do not appear in Guids.
|
||||||
|
@ -75,7 +75,6 @@ namespace Jellyfin.Data.Entities
|
||||||
|
|
||||||
AddDefaultPermissions();
|
AddDefaultPermissions();
|
||||||
AddDefaultPreferences();
|
AddDefaultPreferences();
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -84,21 +83,14 @@ namespace Jellyfin.Data.Entities
|
||||||
/// </summary>
|
/// </summary>
|
||||||
protected User()
|
protected User()
|
||||||
{
|
{
|
||||||
Init();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the Id of the user.
|
/// Gets or sets the Id of the user.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Identity, Indexed, Required.
|
/// Identity, Indexed, Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Key]
|
|
||||||
[Required]
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
|
@ -139,7 +131,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool MustUpdatePassword { get; set; }
|
public bool MustUpdatePassword { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -180,7 +171,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public int InvalidLoginAttemptCount { get; set; }
|
public int InvalidLoginAttemptCount { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -204,7 +194,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -213,7 +202,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool PlayDefaultAudioTrack { get; set; }
|
public bool PlayDefaultAudioTrack { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -232,7 +220,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool DisplayMissingEpisodes { get; set; }
|
public bool DisplayMissingEpisodes { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -241,7 +228,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool DisplayCollectionsView { get; set; }
|
public bool DisplayCollectionsView { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -250,7 +236,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool EnableLocalPassword { get; set; }
|
public bool EnableLocalPassword { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -259,7 +244,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool HidePlayedInLatest { get; set; }
|
public bool HidePlayedInLatest { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -268,7 +252,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool RememberAudioSelections { get; set; }
|
public bool RememberAudioSelections { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -277,7 +260,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool RememberSubtitleSelections { get; set; }
|
public bool RememberSubtitleSelections { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -286,7 +268,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool EnableNextEpisodeAutoPlay { get; set; }
|
public bool EnableNextEpisodeAutoPlay { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -295,7 +276,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool EnableAutoLogin { get; set; }
|
public bool EnableAutoLogin { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -304,7 +284,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Required.
|
/// Required.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Required]
|
|
||||||
public bool EnableUserPreferenceAccess { get; set; }
|
public bool EnableUserPreferenceAccess { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -322,7 +301,6 @@ namespace Jellyfin.Data.Entities
|
||||||
/// This is a temporary stopgap for until the library db is migrated.
|
/// This is a temporary stopgap for until the library db is migrated.
|
||||||
/// This corresponds to the value of the index of this user in the library db.
|
/// This corresponds to the value of the index of this user in the library db.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Required]
|
|
||||||
public long InternalId { get; set; }
|
public long InternalId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -340,7 +318,9 @@ namespace Jellyfin.Data.Entities
|
||||||
[Required]
|
[Required]
|
||||||
public virtual DisplayPreferences DisplayPreferences { get; set; }
|
public virtual DisplayPreferences DisplayPreferences { get; set; }
|
||||||
|
|
||||||
[Required]
|
/// <summary>
|
||||||
|
/// Gets or sets the level of sync play permissions this user has.
|
||||||
|
/// </summary>
|
||||||
public SyncPlayAccess SyncPlayAccess { get; set; }
|
public SyncPlayAccess SyncPlayAccess { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -350,13 +330,8 @@ namespace Jellyfin.Data.Entities
|
||||||
/// Required, Concurrency Token.
|
/// Required, Concurrency Token.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[ConcurrencyCheck]
|
[ConcurrencyCheck]
|
||||||
[Required]
|
|
||||||
public uint RowVersion { get; set; }
|
public uint RowVersion { get; set; }
|
||||||
|
|
||||||
/*************************************************************************
|
|
||||||
* Navigation properties
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the list of access schedules this user has.
|
/// Gets or sets the list of access schedules this user has.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -395,18 +370,6 @@ namespace Jellyfin.Data.Entities
|
||||||
[ForeignKey("Preference_Preferences_Guid")]
|
[ForeignKey("Preference_Preferences_Guid")]
|
||||||
public virtual ICollection<Preference> Preferences { get; protected set; }
|
public virtual ICollection<Preference> Preferences { get; protected set; }
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Static create function (for use in LINQ queries, etc.)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="username">The username for the created user.</param>
|
|
||||||
/// <param name="authenticationProviderId">The Id of the user's authentication provider.</param>
|
|
||||||
/// <param name="passwordResetProviderId">The Id of the user's password reset provider.</param>
|
|
||||||
/// <returns>The created instance.</returns>
|
|
||||||
public static User Create(string username, string authenticationProviderId, string passwordResetProviderId)
|
|
||||||
{
|
|
||||||
return new User(username, authenticationProviderId, passwordResetProviderId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
public void OnSavingChanges()
|
public void OnSavingChanges()
|
||||||
{
|
{
|
||||||
|
@ -519,7 +482,5 @@ namespace Jellyfin.Data.Entities
|
||||||
Preferences.Add(new Preference(val, string.Empty));
|
Preferences.Add(new Preference(val, string.Empty));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
partial void Init();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,33 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
namespace Jellyfin.Data.Enums
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum representing types of art.
|
||||||
|
/// </summary>
|
||||||
public enum ArtKind
|
public enum ArtKind
|
||||||
{
|
{
|
||||||
Other,
|
/// <summary>
|
||||||
Poster,
|
/// Another type of art, not covered by the other members.
|
||||||
Banner,
|
/// </summary>
|
||||||
Thumbnail,
|
Other = 0,
|
||||||
Logo
|
|
||||||
|
/// <summary>
|
||||||
|
/// A poster.
|
||||||
|
/// </summary>
|
||||||
|
Poster = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A banner.
|
||||||
|
/// </summary>
|
||||||
|
Banner = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A thumbnail.
|
||||||
|
/// </summary>
|
||||||
|
Thumbnail = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A logo.
|
||||||
|
/// </summary>
|
||||||
|
Logo = 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,58 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
namespace Jellyfin.Data.Enums
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum that represents a day of the week, weekdays, weekends, or all days.
|
||||||
|
/// </summary>
|
||||||
public enum DynamicDayOfWeek
|
public enum DynamicDayOfWeek
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Sunday.
|
||||||
|
/// </summary>
|
||||||
Sunday = 0,
|
Sunday = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Monday.
|
||||||
|
/// </summary>
|
||||||
Monday = 1,
|
Monday = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Tuesday.
|
||||||
|
/// </summary>
|
||||||
Tuesday = 2,
|
Tuesday = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wednesday.
|
||||||
|
/// </summary>
|
||||||
Wednesday = 3,
|
Wednesday = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Thursday.
|
||||||
|
/// </summary>
|
||||||
Thursday = 4,
|
Thursday = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Friday.
|
||||||
|
/// </summary>
|
||||||
Friday = 5,
|
Friday = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saturday.
|
||||||
|
/// </summary>
|
||||||
Saturday = 6,
|
Saturday = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// All days of the week.
|
||||||
|
/// </summary>
|
||||||
Everyday = 7,
|
Everyday = 7,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A week day, or Monday-Friday.
|
||||||
|
/// </summary>
|
||||||
Weekday = 8,
|
Weekday = 8,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saturday and Sunday.
|
||||||
|
/// </summary>
|
||||||
Weekend = 9
|
Weekend = 9
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
#pragma warning disable CS1591
|
namespace Jellyfin.Data.Enums
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum representing a type of indexing in a user's display preferences.
|
||||||
|
/// </summary>
|
||||||
public enum IndexingKind
|
public enum IndexingKind
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -1,13 +1,33 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
namespace Jellyfin.Data.Enums
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum representing the type of media file.
|
||||||
|
/// </summary>
|
||||||
public enum MediaFileKind
|
public enum MediaFileKind
|
||||||
{
|
{
|
||||||
Main,
|
/// <summary>
|
||||||
Sidecar,
|
/// The main file.
|
||||||
AdditionalPart,
|
/// </summary>
|
||||||
AlternativeFormat,
|
Main = 0,
|
||||||
AdditionalStream
|
|
||||||
|
/// <summary>
|
||||||
|
/// A sidecar file.
|
||||||
|
/// </summary>
|
||||||
|
Sidecar = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An additional part to the main file.
|
||||||
|
/// </summary>
|
||||||
|
AdditionalPart = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An alternative format to the main file.
|
||||||
|
/// </summary>
|
||||||
|
AlternativeFormat = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An additional stream for the main file.
|
||||||
|
/// </summary>
|
||||||
|
AdditionalStream = 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +1,68 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
namespace Jellyfin.Data.Enums
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum representing a person's role in a specific media item.
|
||||||
|
/// </summary>
|
||||||
public enum PersonRoleType
|
public enum PersonRoleType
|
||||||
{
|
{
|
||||||
Other,
|
/// <summary>
|
||||||
Director,
|
/// Another role, not covered by the other types.
|
||||||
Artist,
|
/// </summary>
|
||||||
OriginalArtist,
|
Other = 0,
|
||||||
Actor,
|
|
||||||
VoiceActor,
|
/// <summary>
|
||||||
Producer,
|
/// The director of the media.
|
||||||
Remixer,
|
/// </summary>
|
||||||
Conductor,
|
Director = 1,
|
||||||
Composer,
|
|
||||||
Author,
|
/// <summary>
|
||||||
Editor
|
/// An artist.
|
||||||
|
/// </summary>
|
||||||
|
Artist = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The original artist.
|
||||||
|
/// </summary>
|
||||||
|
OriginalArtist = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An actor.
|
||||||
|
/// </summary>
|
||||||
|
Actor = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A voice actor.
|
||||||
|
/// </summary>
|
||||||
|
VoiceActor = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A producer.
|
||||||
|
/// </summary>
|
||||||
|
Producer = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A remixer.
|
||||||
|
/// </summary>
|
||||||
|
Remixer = 7,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A conductor.
|
||||||
|
/// </summary>
|
||||||
|
Conductor = 8,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A composer.
|
||||||
|
/// </summary>
|
||||||
|
Composer = 9,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An author.
|
||||||
|
/// </summary>
|
||||||
|
Author = 10,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// An editor.
|
||||||
|
/// </summary>
|
||||||
|
Editor = 11
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,33 @@
|
||||||
#pragma warning disable CS1591
|
namespace Jellyfin.Data.Enums
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum representing a subtitle playback mode.
|
||||||
|
/// </summary>
|
||||||
public enum SubtitlePlaybackMode
|
public enum SubtitlePlaybackMode
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The default subtitle playback mode.
|
||||||
|
/// </summary>
|
||||||
Default = 0,
|
Default = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Always show subtitles.
|
||||||
|
/// </summary>
|
||||||
Always = 1,
|
Always = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Only show forced subtitles.
|
||||||
|
/// </summary>
|
||||||
OnlyForced = 2,
|
OnlyForced = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Don't show subtitles.
|
||||||
|
/// </summary>
|
||||||
None = 3,
|
None = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Only show subtitles when the current audio stream is in a different language.
|
||||||
|
/// </summary>
|
||||||
Smart = 4
|
Smart = 4
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,53 @@
|
||||||
#pragma warning disable CS1591
|
|
||||||
|
|
||||||
namespace Jellyfin.Data.Enums
|
namespace Jellyfin.Data.Enums
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// An enum representing an unrated item.
|
||||||
|
/// </summary>
|
||||||
public enum UnratedItem
|
public enum UnratedItem
|
||||||
{
|
{
|
||||||
Movie,
|
/// <summary>
|
||||||
Trailer,
|
/// A movie.
|
||||||
Series,
|
/// </summary>
|
||||||
Music,
|
Movie = 0,
|
||||||
Book,
|
|
||||||
LiveTvChannel,
|
/// <summary>
|
||||||
LiveTvProgram,
|
/// A trailer.
|
||||||
ChannelContent,
|
/// </summary>
|
||||||
Other
|
Trailer = 1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A series.
|
||||||
|
/// </summary>
|
||||||
|
Series = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Music.
|
||||||
|
/// </summary>
|
||||||
|
Music = 3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A book.
|
||||||
|
/// </summary>
|
||||||
|
Book = 4,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A live TV channel
|
||||||
|
/// </summary>
|
||||||
|
LiveTvChannel = 5,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// A live TV program.
|
||||||
|
/// </summary>
|
||||||
|
LiveTvProgram = 6,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Channel content.
|
||||||
|
/// </summary>
|
||||||
|
ChannelContent = 7,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Another type, not covered by the other fields.
|
||||||
|
/// </summary>
|
||||||
|
Other = 8
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
|
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||||
<TreatWarningsAsErrors Condition=" '$(Configuration)' == 'Release' ">true</TreatWarningsAsErrors>
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||||
<IncludeSymbols>true</IncludeSymbols>
|
<IncludeSymbols>true</IncludeSymbols>
|
||||||
|
@ -45,4 +45,8 @@
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="..\SharedVersion.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
Loading…
Reference in a new issue