Merge pull request #4034 from barronpm/jellyfin-data-warnings
Fix all warnings in Jellyfin.Datapull/4062/head
commit
e6c22a9707
@ -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,13 +1,33 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace Jellyfin.Data.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum representing types of art.
|
||||
/// </summary>
|
||||
public enum ArtKind
|
||||
{
|
||||
Other,
|
||||
Poster,
|
||||
Banner,
|
||||
Thumbnail,
|
||||
Logo
|
||||
/// <summary>
|
||||
/// Another type of art, not covered by the other members.
|
||||
/// </summary>
|
||||
Other = 0,
|
||||
|
||||
/// <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
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum that represents a day of the week, weekdays, weekends, or all days.
|
||||
/// </summary>
|
||||
public enum DynamicDayOfWeek
|
||||
{
|
||||
/// <summary>
|
||||
/// Sunday.
|
||||
/// </summary>
|
||||
Sunday = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Monday.
|
||||
/// </summary>
|
||||
Monday = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Tuesday.
|
||||
/// </summary>
|
||||
Tuesday = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Wednesday.
|
||||
/// </summary>
|
||||
Wednesday = 3,
|
||||
|
||||
/// <summary>
|
||||
/// Thursday.
|
||||
/// </summary>
|
||||
Thursday = 4,
|
||||
|
||||
/// <summary>
|
||||
/// Friday.
|
||||
/// </summary>
|
||||
Friday = 5,
|
||||
|
||||
/// <summary>
|
||||
/// Saturday.
|
||||
/// </summary>
|
||||
Saturday = 6,
|
||||
|
||||
/// <summary>
|
||||
/// All days of the week.
|
||||
/// </summary>
|
||||
Everyday = 7,
|
||||
|
||||
/// <summary>
|
||||
/// A week day, or Monday-Friday.
|
||||
/// </summary>
|
||||
Weekday = 8,
|
||||
|
||||
/// <summary>
|
||||
/// Saturday and Sunday.
|
||||
/// </summary>
|
||||
Weekend = 9
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,33 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace Jellyfin.Data.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum representing the type of media file.
|
||||
/// </summary>
|
||||
public enum MediaFileKind
|
||||
{
|
||||
Main,
|
||||
Sidecar,
|
||||
AdditionalPart,
|
||||
AlternativeFormat,
|
||||
AdditionalStream
|
||||
/// <summary>
|
||||
/// The main file.
|
||||
/// </summary>
|
||||
Main = 0,
|
||||
|
||||
/// <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
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum representing a person's role in a specific media item.
|
||||
/// </summary>
|
||||
public enum PersonRoleType
|
||||
{
|
||||
Other,
|
||||
Director,
|
||||
Artist,
|
||||
OriginalArtist,
|
||||
Actor,
|
||||
VoiceActor,
|
||||
Producer,
|
||||
Remixer,
|
||||
Conductor,
|
||||
Composer,
|
||||
Author,
|
||||
Editor
|
||||
/// <summary>
|
||||
/// Another role, not covered by the other types.
|
||||
/// </summary>
|
||||
Other = 0,
|
||||
|
||||
/// <summary>
|
||||
/// The director of the media.
|
||||
/// </summary>
|
||||
Director = 1,
|
||||
|
||||
/// <summary>
|
||||
/// 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,17 +1,53 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
namespace Jellyfin.Data.Enums
|
||||
{
|
||||
/// <summary>
|
||||
/// An enum representing an unrated item.
|
||||
/// </summary>
|
||||
public enum UnratedItem
|
||||
{
|
||||
Movie,
|
||||
Trailer,
|
||||
Series,
|
||||
Music,
|
||||
Book,
|
||||
LiveTvChannel,
|
||||
LiveTvProgram,
|
||||
ChannelContent,
|
||||
Other
|
||||
/// <summary>
|
||||
/// A movie.
|
||||
/// </summary>
|
||||
Movie = 0,
|
||||
|
||||
/// <summary>
|
||||
/// A trailer.
|
||||
/// </summary>
|
||||
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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in new issue