Merge branch 'master' into websocket

This commit is contained in:
Mark Monteiro 2020-05-14 11:08:08 -04:00 committed by GitHub
commit 2e09311a93
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
140 changed files with 7017 additions and 8066 deletions

View File

@ -13,7 +13,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = null
max_line_length = off
# YAML indentation
[*.{yml,yaml}]
@ -22,6 +22,7 @@ indent_size = 2
# XML indentation
[*.{csproj,xml}]
indent_size = 2
###############################
# .NET Coding Conventions #
###############################
@ -51,11 +52,12 @@ dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
dotnet_prefer_inferred_tuple_names = true:suggestion
dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
###############################
# Naming Conventions #
###############################
@ -67,7 +69,7 @@ dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.symbols = non
dotnet_naming_rule.non_private_static_fields_should_be_pascal_case.style = non_private_static_field_style
dotnet_naming_symbols.non_private_static_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected internal, private protected
dotnet_naming_symbols.non_private_static_fields.applicable_accessibilities = public, protected, internal, protected_internal, private_protected
dotnet_naming_symbols.non_private_static_fields.required_modifiers = static
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case
@ -159,6 +161,7 @@ csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
###############################
# C# Formatting Rules #
###############################
@ -189,9 +192,3 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences
csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = true
###############################
# VB Coding Conventions #
###############################
[*.vb]
# Modifier preferences
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.Buffers.Binary;
using System.IO;

View File

@ -13,6 +13,7 @@
<TargetFramework>netstandard2.1</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
</Project>

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.IO;
namespace DvdLib.Ifo

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.IO;
namespace DvdLib.Ifo

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.IO;
namespace DvdLib.Ifo

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
namespace DvdLib.Ifo
{
public class Chapter

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System;
using System.Collections.Generic;
using System.IO;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System;
namespace DvdLib.Ifo

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.Collections.Generic;
namespace DvdLib.Ifo

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.Collections.Generic;
using System.IO;
using System.Linq;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System.Collections.Generic;
using System.IO;

View File

@ -1,3 +1,5 @@
#pragma warning disable CS1591
using System;
namespace DvdLib.Ifo

View File

@ -89,14 +89,14 @@ namespace Emby.Naming.Video
if (parseName)
{
var cleanDateTimeResult = CleanDateTime(name);
name = cleanDateTimeResult.Name;
year = cleanDateTimeResult.Year;
if (extraResult.ExtraType == null
&& TryCleanString(cleanDateTimeResult.Name, out ReadOnlySpan<char> newName))
&& TryCleanString(name, out ReadOnlySpan<char> newName))
{
name = newName.ToString();
}
year = cleanDateTimeResult.Year;
}
return new VideoFileInfo

View File

@ -519,13 +519,6 @@ namespace Emby.Server.Implementations
serviceCollection.AddSingleton<IJsonSerializer, JsonSerializer>();
// TODO: Remove support for injecting ILogger completely
serviceCollection.AddSingleton((provider) =>
{
Logger.LogWarning("Injecting ILogger directly is deprecated and should be replaced with ILogger<T>");
return Logger;
});
serviceCollection.AddSingleton(_fileSystemManager);
serviceCollection.AddSingleton<TvdbClientManager>();
@ -1122,9 +1115,6 @@ namespace Emby.Server.Implementations
ItemsByNamePath = ApplicationPaths.InternalMetadataPath,
InternalMetadataPath = ApplicationPaths.InternalMetadataPath,
CachePath = ApplicationPaths.CachePath,
HttpServerPortNumber = HttpPort,
SupportsHttps = SupportsHttps,
HttpsPortNumber = HttpsPort,
OperatingSystem = OperatingSystem.Id.ToString(),
OperatingSystemDisplayName = OperatingSystem.Name,
CanSelfRestart = CanSelfRestart,
@ -1160,23 +1150,22 @@ namespace Emby.Server.Implementations
};
}
public bool EnableHttps => SupportsHttps && ServerConfigurationManager.Configuration.EnableHttps;
/// <inheritdoc/>
public bool ListenWithHttps => Certificate != null && ServerConfigurationManager.Configuration.EnableHttps;
public bool SupportsHttps => Certificate != null || ServerConfigurationManager.Configuration.IsBehindProxy;
public async Task<string> GetLocalApiUrl(CancellationToken cancellationToken, bool forceHttp = false)
/// <inheritdoc/>
public async Task<string> GetLocalApiUrl(CancellationToken cancellationToken)
{
try
{
// Return the first matched address, if found, or the first known local address
var addresses = await GetLocalIpAddressesInternal(false, 1, cancellationToken).ConfigureAwait(false);
foreach (var address in addresses)
if (addresses.Count == 0)
{
return GetLocalApiUrl(address, forceHttp);
return null;
}
return null;
return GetLocalApiUrl(addresses.First());
}
catch (Exception ex)
{
@ -1203,7 +1192,7 @@ namespace Emby.Server.Implementations
}
/// <inheritdoc />
public string GetLocalApiUrl(IPAddress ipAddress, bool forceHttp = false)
public string GetLocalApiUrl(IPAddress ipAddress)
{
if (ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
{
@ -1213,29 +1202,30 @@ namespace Emby.Server.Implementations
str.CopyTo(span.Slice(1));
span[^1] = ']';
return GetLocalApiUrl(span, forceHttp);
return GetLocalApiUrl(span);
}
return GetLocalApiUrl(ipAddress.ToString(), forceHttp);
return GetLocalApiUrl(ipAddress.ToString());
}
/// <inheritdoc/>
public string GetLocalApiUrl(ReadOnlySpan<char> host, bool forceHttp = false)
public string GetLoopbackHttpApiUrl()
{
var url = new StringBuilder(64);
bool useHttps = EnableHttps && !forceHttp;
url.Append(useHttps ? "https://" : "http://")
.Append(host)
.Append(':')
.Append(useHttps ? HttpsPort : HttpPort);
string baseUrl = ServerConfigurationManager.Configuration.BaseUrl;
if (baseUrl.Length != 0)
{
url.Append(baseUrl);
return GetLocalApiUrl("127.0.0.1", Uri.UriSchemeHttp, HttpPort);
}
return url.ToString();
/// <inheritdoc/>
public string GetLocalApiUrl(ReadOnlySpan<char> host, string scheme = null, int? port = null)
{
// NOTE: If no BaseUrl is set then UriBuilder appends a trailing slash, but if there is no BaseUrl it does
// not. For consistency, always trim the trailing slash.
return new UriBuilder
{
Scheme = scheme ?? (ListenWithHttps ? Uri.UriSchemeHttps : Uri.UriSchemeHttp),
Host = host.ToString(),
Port = port ?? (ListenWithHttps ? HttpsPort : HttpPort),
Path = ServerConfigurationManager.Configuration.BaseUrl
}.ToString().TrimEnd('/');
}
public Task<List<IPAddress>> GetLocalIpAddresses(CancellationToken cancellationToken)
@ -1269,7 +1259,7 @@ namespace Emby.Server.Implementations
}
}
var valid = await IsIpAddressValidAsync(address, cancellationToken).ConfigureAwait(false);
var valid = await IsLocalIpAddressValidAsync(address, cancellationToken).ConfigureAwait(false);
if (valid)
{
resultList.Add(address);
@ -1303,7 +1293,7 @@ namespace Emby.Server.Implementations
private readonly ConcurrentDictionary<string, bool> _validAddressResults = new ConcurrentDictionary<string, bool>(StringComparer.OrdinalIgnoreCase);
private async Task<bool> IsIpAddressValidAsync(IPAddress address, CancellationToken cancellationToken)
private async Task<bool> IsLocalIpAddressValidAsync(IPAddress address, CancellationToken cancellationToken)
{
if (address.Equals(IPAddress.Loopback)
|| address.Equals(IPAddress.IPv6Loopback))
@ -1311,8 +1301,7 @@ namespace Emby.Server.Implementations
return true;
}
var apiUrl = GetLocalApiUrl(address);
apiUrl += "/system/ping";
var apiUrl = GetLocalApiUrl(address) + "/system/ping";
if (_validAddressResults.TryGetValue(apiUrl, out var cachedResult))
{

View File

@ -31,18 +31,18 @@ namespace Emby.Server.Implementations.Browser
/// Opens the specified URL in an external browser window. Any exceptions will be logged, but ignored.
/// </summary>
/// <param name="appHost">The application host.</param>
/// <param name="url">The URL.</param>
private static void TryOpenUrl(IServerApplicationHost appHost, string url)
/// <param name="relativeUrl">The URL to open, relative to the server base URL.</param>
private static void TryOpenUrl(IServerApplicationHost appHost, string relativeUrl)
{
try
{
string baseUrl = appHost.GetLocalApiUrl("localhost");
appHost.LaunchUrl(baseUrl + url);
appHost.LaunchUrl(baseUrl + relativeUrl);
}
catch (Exception ex)
{
var logger = appHost.Resolve<ILogger>();
logger?.LogError(ex, "Failed to open browser window with URL {URL}", url);
logger?.LogError(ex, "Failed to open browser window with URL {URL}", relativeUrl);
}
}
}

View File

@ -1,7 +1,6 @@
using System.Collections.Generic;
using Emby.Server.Implementations.HttpServer;
using Emby.Server.Implementations.Updates;
using MediaBrowser.Providers.Music;
using static MediaBrowser.Controller.Extensions.ConfigurationExtensions;
namespace Emby.Server.Implementations

View File

@ -375,5 +375,15 @@ namespace Emby.Server.Implementations.Data
return userData;
}
/// <inheritdoc/>
/// <remarks>
/// There is nothing to dispose here since <see cref="BaseSqliteRepository.WriteLock"/> and
/// <see cref="BaseSqliteRepository.WriteConnection"/> are managed by <see cref="SqliteItemRepository"/>.
/// See <see cref="Initialize(IUserManager, SemaphoreSlim, SQLiteDatabaseConnection)"/>.
/// </remarks>
protected override void Dispose(bool dispose)
{
}
}
}

View File

@ -64,7 +64,7 @@ namespace Emby.Server.Implementations.EntryPoints
.Append(config.PublicHttpsPort).Append(Separator)
.Append(_appHost.HttpPort).Append(Separator)
.Append(_appHost.HttpsPort).Append(Separator)
.Append(_appHost.EnableHttps).Append(Separator)
.Append(_appHost.ListenWithHttps).Append(Separator)
.Append(config.EnableRemoteAccess).Append(Separator)
.ToString();
}
@ -158,7 +158,7 @@ namespace Emby.Server.Implementations.EntryPoints
{
yield return CreatePortMap(device, _appHost.HttpPort, _config.Configuration.PublicPort);
if (_appHost.EnableHttps)
if (_appHost.ListenWithHttps)
{
yield return CreatePortMap(device, _appHost.HttpsPort, _config.Configuration.PublicHttpsPort);
}

View File

@ -366,11 +366,14 @@ namespace Emby.Server.Implementations.HttpServer
return true;
}
/// <summary>
/// Validate a connection from a remote IP address to a URL to see if a redirection to HTTPS is required.
/// </summary>
/// <returns>True if the request is valid, or false if the request is not valid and an HTTPS redirect is required.</returns>
private bool ValidateSsl(string remoteIp, string urlString)
{
if (_config.Configuration.RequireHttps
&& _appHost.EnableHttps
&& !_config.Configuration.IsBehindProxy
&& _appHost.ListenWithHttps
&& !urlString.Contains("https://", StringComparison.OrdinalIgnoreCase))
{
// These are hacks, but if these ever occur on ipv6 in the local network they could be incorrectly redirected

View File

@ -16,7 +16,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
/// </summary>
public class MusicAlbumResolver : ItemResolver<MusicAlbum>
{
private readonly ILogger _logger;
private readonly ILogger<MusicAlbumResolver> _logger;
private readonly IFileSystem _fileSystem;
private readonly ILibraryManager _libraryManager;
@ -26,7 +26,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
/// <param name="logger">The logger.</param>
/// <param name="fileSystem">The file system.</param>
/// <param name="libraryManager">The library manager.</param>
public MusicAlbumResolver(ILogger logger, IFileSystem fileSystem, ILibraryManager libraryManager)
public MusicAlbumResolver(ILogger<MusicAlbumResolver> logger, IFileSystem fileSystem, ILibraryManager libraryManager)
{
_logger = logger;
_fileSystem = fileSystem;

View File

@ -15,7 +15,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
/// </summary>
public class MusicArtistResolver : ItemResolver<MusicArtist>
{
private readonly ILogger _logger;
private readonly ILogger<MusicAlbumResolver> _logger;
private readonly IFileSystem _fileSystem;
private readonly ILibraryManager _libraryManager;
private readonly IServerConfigurationManager _config;
@ -23,12 +23,12 @@ namespace Emby.Server.Implementations.Library.Resolvers.Audio
/// <summary>
/// Initializes a new instance of the <see cref="MusicArtistResolver"/> class.
/// </summary>
/// <param name="logger">The logger.</param>
/// <param name="logger">The logger for the created <see cref="MusicAlbumResolver"/> instances.</param>
/// <param name="fileSystem">The file system.</param>
/// <param name="libraryManager">The library manager.</param>
/// <param name="config">The configuration manager.</param>
public MusicArtistResolver(
ILogger<MusicArtistResolver> logger,
ILogger<MusicAlbumResolver> logger,
IFileSystem fileSystem,
ILibraryManager libraryManager,
IServerConfigurationManager config)

View File

@ -608,6 +608,31 @@ namespace Emby.Server.Implementations.Library
return dto;
}
public PublicUserDto GetPublicUserDto(User user, string remoteEndPoint = null)
{
if (user == null)
{
throw new ArgumentNullException(nameof(user));
}
IAuthenticationProvider authenticationProvider = GetAuthenticationProvider(user);
bool hasConfiguredPassword = authenticationProvider.HasPassword(user);
bool hasConfiguredEasyPassword = !string.IsNullOrEmpty(authenticationProvider.GetEasyPasswordHash(user));
bool hasPassword = user.Configuration.EnableLocalPassword &&
!string.IsNullOrEmpty(remoteEndPoint) &&
_networkManager.IsInLocalNetwork(remoteEndPoint) ? hasConfiguredEasyPassword : hasConfiguredPassword;
PublicUserDto dto = new PublicUserDto
{
Name = user.Name,
HasPassword = hasPassword,
HasConfiguredPassword = hasConfiguredPassword,
};
return dto;
}
public UserDto GetOfflineUserDto(User user)
{
var dto = GetUserDto(user);

View File

@ -1059,7 +1059,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
{
var stream = new MediaSourceInfo
{
EncoderPath = _appHost.GetLocalApiUrl("127.0.0.1", true) + "/LiveTv/LiveRecordings/" + info.Id + "/stream",
EncoderPath = _appHost.GetLoopbackHttpApiUrl() + "/LiveTv/LiveRecordings/" + info.Id + "/stream",
EncoderProtocol = MediaProtocol.Http,
Path = info.Path,
Protocol = MediaProtocol.File,

View File

@ -121,7 +121,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
//OpenedMediaSource.Path = tempFile;
//OpenedMediaSource.ReadAtNativeFramerate = true;
MediaSource.Path = _appHost.GetLocalApiUrl("127.0.0.1", true) + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
MediaSource.Path = _appHost.GetLoopbackHttpApiUrl() + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
MediaSource.Protocol = MediaProtocol.Http;
//OpenedMediaSource.SupportsDirectPlay = false;
//OpenedMediaSource.SupportsDirectStream = true;

View File

@ -35,7 +35,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
public M3UTunerHost(
IServerConfigurationManager config,
IMediaSourceManager mediaSourceManager,
ILogger logger,
ILogger<M3UTunerHost> logger,
IJsonSerializer jsonSerializer,
IFileSystem fileSystem,
IHttpClient httpClient,
@ -83,7 +83,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
return Task.FromResult(list);
}
private static readonly string[] _disallowedSharedStreamExtensions = new string[]
private static readonly string[] _disallowedSharedStreamExtensions =
{
".mkv",
".mp4",

View File

@ -106,7 +106,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts
//OpenedMediaSource.Path = tempFile;
//OpenedMediaSource.ReadAtNativeFramerate = true;
MediaSource.Path = _appHost.GetLocalApiUrl("127.0.0.1", true) + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
MediaSource.Path = _appHost.GetLoopbackHttpApiUrl() + "/LiveTv/LiveStreamFiles/" + UniqueId + "/stream.ts";
MediaSource.Protocol = MediaProtocol.Http;
//OpenedMediaSource.Path = TempFilePath;

View File

@ -4,7 +4,7 @@
"Folders": "Fouers",
"Favorites": "Gunstelinge",
"HeaderFavoriteShows": "Gunsteling Vertonings",
"ValueSpecialEpisodeName": "Spesiaal - {0}",
"ValueSpecialEpisodeName": "Spesiale - {0}",
"HeaderAlbumArtists": "Album Kunstenaars",
"Books": "Boeke",
"HeaderNextUp": "Volgende",

View File

@ -91,5 +91,7 @@
"HeaderNextUp": "এরপরে আসছে",
"HeaderLiveTV": "লাইভ টিভি",
"HeaderFavoriteSongs": "প্রিয় গানগুলো",
"HeaderFavoriteShows": "প্রিয় শোগুলো"
"HeaderFavoriteShows": "প্রিয় শোগুলো",
"TasksLibraryCategory": "গ্রন্থাগার",
"TasksMaintenanceCategory": "রক্ষণাবেক্ষণ"
}

View File

@ -11,7 +11,7 @@
"Collections": "Colecciones",
"DeviceOfflineWithName": "{0} se ha desconectado",
"DeviceOnlineWithName": "{0} está conectado",
"FailedLoginAttemptWithUserName": "Intento fallido de inicio de sesión de {0}",
"FailedLoginAttemptWithUserName": "Intento fallido de inicio de sesión desde {0}",
"Favorites": "Favoritos",
"Folders": "Carpetas",
"Genres": "Géneros",

View File

@ -71,7 +71,7 @@
"ScheduledTaskFailedWithName": "{0} falló",
"ScheduledTaskStartedWithName": "{0} iniciada",
"ServerNameNeedsToBeRestarted": "{0} necesita ser reiniciado",
"Shows": "Series",
"Shows": "Mostrar",
"Songs": "Canciones",
"StartupEmbyServerIsLoading": "Jellyfin Server se está cargando. Vuelve a intentarlo en breve.",
"SubtitleDownloadFailureForItem": "Error al descargar subtítulos para {0}",

View File

@ -94,5 +94,23 @@
"ValueSpecialEpisodeName": "Spécial - {0}",
"VersionNumber": "Version {0}",
"TasksLibraryCategory": "Bibliothèque",
"TasksMaintenanceCategory": "Entretien"
"TasksMaintenanceCategory": "Entretien",
"TaskDownloadMissingSubtitlesDescription": "Recherche l'internet pour des sous-titres manquants à base de métadonnées configurées.",
"TaskDownloadMissingSubtitles": "Télécharger des sous-titres manquants",
"TaskRefreshChannelsDescription": "Rafraîchit des informations des chaines d'internet.",
"TaskRefreshChannels": "Rafraîchir des chaines",
"TaskCleanTranscodeDescription": "Retirer des fichiers de transcodage de plus qu'un jour.",
"TaskCleanTranscode": "Nettoyer le directoire de transcodage",
"TaskUpdatePluginsDescription": "Télécharger et installer des mises à jours des plugins qui sont configurés m.à.j. automisés.",
"TaskUpdatePlugins": "Mise à jour des plugins",
"TaskRefreshPeopleDescription": "Met à jour les métadonnées pour les acteurs et réalisateurs dans votre bibliothèque.",
"TaskRefreshPeople": "Rafraîchir les acteurs",
"TaskCleanLogsDescription": "Retire les données qui ont plus que {0} jours.",
"TaskCleanLogs": "Nettoyer les données de directoire",
"TaskRefreshLibraryDescription": "Analyse votre bibliothèque média pour des nouveaux fichiers et rafraîchit les métadonnées.",
"TaskRefreshChapterImages": "Extraire des images du chapitre",
"TaskRefreshChapterImagesDescription": "Créer des vignettes pour des vidéos qui ont des chapitres",
"TaskRefreshLibrary": "Analyser la bibliothèque de média",
"TaskCleanCache": "Nettoyer le cache de directoire",
"TasksApplicationCategory": "Application"
}

View File

@ -1,41 +1,41 @@
{
"Albums": "Albom",
"AppDeviceValues": "App: {0}, Grät: {1}",
"Application": "Aawändig",
"Artists": "Könstler",
"AuthenticationSucceededWithUserName": "{0} het sech aagmäudet",
"Books": "Büecher",
"CameraImageUploadedFrom": "Es nöis Foti esch ufeglade worde vo {0}",
"Channels": "Kanäu",
"ChapterNameValue": "Kapitu {0}",
"Collections": "Sammlige",
"DeviceOfflineWithName": "{0} esch offline gange",
"DeviceOnlineWithName": "{0} esch online cho",
"FailedLoginAttemptWithUserName": "Fäugschlagne Aamäudeversuech vo {0}",
"Favorites": "Favorite",
"Albums": "Alben",
"AppDeviceValues": "App: {0}, Gerät: {1}",
"Application": "Anwendung",
"Artists": "Künstler",
"AuthenticationSucceededWithUserName": "{0} hat sich angemeldet",
"Books": "Bücher",
"CameraImageUploadedFrom": "Ein neues Foto wurde von {0} hochgeladen",
"Channels": "Kanäle",
"ChapterNameValue": "Kapitel {0}",
"Collections": "Sammlungen",
"DeviceOfflineWithName": "{0} wurde getrennt",
"DeviceOnlineWithName": "{0} ist verbunden",
"FailedLoginAttemptWithUserName": "Fehlgeschlagener Anmeldeversuch von {0}",
"Favorites": "Favoriten",
"Folders": "Ordner",
"Genres": "Genres",
"HeaderAlbumArtists": "Albom-Könstler",
"HeaderAlbumArtists": "Album-Künstler",
"HeaderCameraUploads": "Kamera-Uploads",
"HeaderContinueWatching": "Wiiterluege",
"HeaderFavoriteAlbums": "Lieblingsalbe",
"HeaderFavoriteArtists": "Lieblings-Interprete",
"HeaderFavoriteEpisodes": "Lieblingsepisode",
"HeaderFavoriteShows": "Lieblingsserie",
"HeaderContinueWatching": "weiter schauen",
"HeaderFavoriteAlbums": "Lieblingsalben",
"HeaderFavoriteArtists": "Lieblings-Künstler",
"HeaderFavoriteEpisodes": "Lieblingsepisoden",
"HeaderFavoriteShows": "Lieblingsserien",
"HeaderFavoriteSongs": "Lieblingslieder",
"HeaderLiveTV": "Live-Färnseh",
"HeaderNextUp": "Als nächts",
"HeaderRecordingGroups": "Ufnahmegruppe",
"HomeVideos": "Heimfilmli",
"Inherit": "Hinzuefüege",
"ItemAddedWithName": "{0} esch de Bibliothek dezuegfüegt worde",
"ItemRemovedWithName": "{0} esch vo de Bibliothek entfärnt worde",
"LabelIpAddressValue": "IP-Adrässe: {0}",
"LabelRunningTimeValue": "Loufziit: {0}",
"Latest": "Nöischti",
"MessageApplicationUpdated": "Jellyfin Server esch aktualisiert worde",
"MessageApplicationUpdatedTo": "Jellyfin Server esch of Version {0} aktualisiert worde",
"MessageNamedServerConfigurationUpdatedWithValue": "De Serveriistöuigsberiich {0} esch aktualisiert worde",
"HeaderLiveTV": "Live-Fernseh",
"HeaderNextUp": "Als Nächstes",
"HeaderRecordingGroups": "Aufnahme-Gruppen",
"HomeVideos": "Heimvideos",
"Inherit": "Vererben",
"ItemAddedWithName": "{0} wurde der Bibliothek hinzugefügt",
"ItemRemovedWithName": "{0} wurde aus der Bibliothek entfernt",
"LabelIpAddressValue": "IP-Adresse: {0}",
"LabelRunningTimeValue": "Laufzeit: {0}",
"Latest": "Neueste",
"MessageApplicationUpdated": "Jellyfin-Server wurde aktualisiert",
"MessageApplicationUpdatedTo": "Jellyfin-Server wurde auf Version {0} aktualisiert",
"MessageNamedServerConfigurationUpdatedWithValue": "Der Server-Einstellungsbereich {0} wurde aktualisiert",
"MessageServerConfigurationUpdated": "Serveriistöuige send aktualisiert worde",
"MixedContent": "Gmeschti Inhäut",
"Movies": "Film",
@ -50,7 +50,7 @@
"NotificationOptionAudioPlayback": "Audiowedergab gstartet",
"NotificationOptionAudioPlaybackStopped": "Audiwedergab gstoppt",
"NotificationOptionCameraImageUploaded": "Foti ueglade",
"NotificationOptionInstallationFailed": "Installationsfäuer",
"NotificationOptionInstallationFailed": "Installationsfehler",
"NotificationOptionNewLibraryContent": "Nöie Inhaut hinzuegfüegt",
"NotificationOptionPluginError": "Plugin-Fäuer",
"NotificationOptionPluginInstalled": "Plugin installiert",
@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} het d'Wedergab vo {1} of {2} gstoppt",
"ValueHasBeenAddedToLibrary": "{0} esch dinnere Biblithek hinzuegfüegt worde",
"ValueSpecialEpisodeName": "Extra - {0}",
"VersionNumber": "Version {0}"
"VersionNumber": "Version {0}",
"TaskCleanLogs": "Lösche Log Pfad",
"TaskRefreshLibraryDescription": "Scanne alle Bibliotheken für hinzugefügte Datein und erneuere Metadaten.",
"TaskRefreshLibrary": "Scanne alle Bibliotheken",
"TaskRefreshChapterImagesDescription": "Kreiert Vorschaubilder für Videos welche Kapitel haben.",
"TaskRefreshChapterImages": "Extrahiere Kapitel-Bilder",
"TaskCleanCacheDescription": "Löscht Zwischenspeicherdatein die nicht länger von System gebraucht werden.",
"TaskCleanCache": "Leere Cache Pfad",
"TasksChannelsCategory": "Internet Kanäle",
"TasksApplicationCategory": "Applikation",
"TasksLibraryCategory": "Bibliothek",
"TasksMaintenanceCategory": "Verwaltung",
"TaskDownloadMissingSubtitlesDescription": "Durchsucht das Internet nach fehlenden Untertiteln, basierend auf den Metadaten Einstellungen.",
"TaskDownloadMissingSubtitles": "Lade fehlende Untertitel herunter",
"TaskRefreshChannelsDescription": "Aktualisiert Internet Kanal Informationen.",
"TaskRefreshChannels": "Aktualisiere Kanäle",
"TaskCleanTranscodeDescription": "Löscht Transkodierdateien welche älter als ein Tag sind.",
"TaskCleanTranscode": "Räume Transcodier Verzeichnis auf",
"TaskUpdatePluginsDescription": "Lädt Aktualisierungen für Erweiterungen herunter und installiert diese, für welche automatische Aktualisierungen konfiguriert sind.",
"TaskUpdatePlugins": "Aktualisiere Erweiterungen",
"TaskRefreshPeopleDescription": "Aktualisiert Metadaten für Schausteller und Regisseure in deiner Bibliothek.",
"TaskRefreshPeople": "Aktualisiere Schauspieler",
"TaskCleanLogsDescription": "Löscht Log Dateien die älter als {0} Tage sind."
}

View File

@ -99,5 +99,13 @@
"TaskCleanCache": "נקה תיקיית מטמון",
"TasksApplicationCategory": "יישום",
"TasksLibraryCategory": "ספרייה",
"TasksMaintenanceCategory": "תחזוקה"
"TasksMaintenanceCategory": "תחזוקה",
"TaskUpdatePlugins": "עדכן תוספים",
"TaskRefreshPeopleDescription": "מעדכן מטא נתונים עבור שחקנים ובמאים בספריית המדיה שלך.",
"TaskRefreshPeople": "רענן אנשים",
"TaskCleanLogsDescription": "מוחק קבצי יומן בני יותר מ- {0} ימים.",
"TaskCleanLogs": "נקה תיקיית יומן",
"TaskRefreshLibraryDescription": "סורק את ספריית המדיה שלך אחר קבצים חדשים ומרענן מטא נתונים.",
"TaskRefreshChapterImagesDescription": "יוצר תמונות ממוזערות לסרטונים שיש להם פרקים.",
"TasksChannelsCategory": "ערוצי אינטרנט"
}

View File

@ -30,7 +30,7 @@
"Inherit": "Naslijedi",
"ItemAddedWithName": "{0} je dodano u biblioteku",
"ItemRemovedWithName": "{0} je uklonjen iz biblioteke",
"LabelIpAddressValue": "Ip adresa: {0}",
"LabelIpAddressValue": "IP adresa: {0}",
"LabelRunningTimeValue": "Vrijeme rada: {0}",
"Latest": "Najnovije",
"MessageApplicationUpdated": "Jellyfin Server je ažuriran",
@ -92,5 +92,13 @@
"UserStoppedPlayingItemWithValues": "{0} je zaustavio {1}",
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
"ValueSpecialEpisodeName": "Specijal - {0}",
"VersionNumber": "Verzija {0}"
"VersionNumber": "Verzija {0}",
"TaskRefreshLibraryDescription": "Skenira vašu medijsku knjižnicu sa novim datotekama i osvježuje metapodatke.",
"TaskRefreshLibrary": "Skeniraj medijsku knjižnicu",
"TaskRefreshChapterImagesDescription": "Stvara sličice za videozapise koji imaju poglavlja.",
"TaskRefreshChapterImages": "Raspakiraj slike poglavlja",
"TaskCleanCacheDescription": "Briše priručne datoteke nepotrebne za sistem.",
"TaskCleanCache": "Očisti priručnu memoriju",
"TasksApplicationCategory": "Aplikacija",
"TasksMaintenanceCategory": "Održavanje"
}

View File

@ -5,7 +5,7 @@
"Artists": "Artisti",
"AuthenticationSucceededWithUserName": "{0} autenticato con successo",
"Books": "Libri",
"CameraImageUploadedFrom": "È stata caricata una nuova immagine della fotocamera dal device {0}",
"CameraImageUploadedFrom": "È stata caricata una nuova fotografia da {0}",
"Channels": "Canali",
"ChapterNameValue": "Capitolo {0}",
"Collections": "Collezioni",

View File

@ -91,5 +91,12 @@
"Songs": "Песни",
"Shows": "Серии",
"ServerNameNeedsToBeRestarted": "{0} треба да се рестартира",
"ScheduledTaskStartedWithName": "{0} започна"
"ScheduledTaskStartedWithName": "{0} започна",
"TaskRefreshChapterImages": "Извези Слики од Поглавје",
"TaskCleanCacheDescription": "Ги брише кешираните фајлови што не се повеќе потребни од системот.",
"TaskCleanCache": "Исчисти Го Кешот",
"TasksChannelsCategory": "Интернет Канали",
"TasksApplicationCategory": "Апликација",
"TasksLibraryCategory": "Библиотека",
"TasksMaintenanceCategory": "Одржување"
}

View File

@ -5,7 +5,7 @@
"Artists": "Artiesten",
"AuthenticationSucceededWithUserName": "{0} is succesvol geverifieerd",
"Books": "Boeken",
"CameraImageUploadedFrom": "Er is een nieuwe afbeelding toegevoegd via {0}",
"CameraImageUploadedFrom": "Er is een nieuwe camera afbeelding toegevoegd via {0}",
"Channels": "Kanalen",
"ChapterNameValue": "Hoofdstuk {0}",
"Collections": "Verzamelingen",
@ -26,7 +26,7 @@
"HeaderLiveTV": "Live TV",
"HeaderNextUp": "Volgende",
"HeaderRecordingGroups": "Opnamegroepen",
"HomeVideos": "Start video's",
"HomeVideos": "Home video's",
"Inherit": "Overerven",
"ItemAddedWithName": "{0} is toegevoegd aan de bibliotheek",
"ItemRemovedWithName": "{0} is verwijderd uit de bibliotheek",
@ -50,7 +50,7 @@
"NotificationOptionAudioPlayback": "Muziek gestart",
"NotificationOptionAudioPlaybackStopped": "Muziek gestopt",
"NotificationOptionCameraImageUploaded": "Camera-afbeelding geüpload",
"NotificationOptionInstallationFailed": "Installatie mislukking",
"NotificationOptionInstallationFailed": "Installatie mislukt",
"NotificationOptionNewLibraryContent": "Nieuwe content toegevoegd",
"NotificationOptionPluginError": "Plug-in fout",
"NotificationOptionPluginInstalled": "Plug-in geïnstalleerd",

View File

@ -92,5 +92,26 @@
"UserStoppedPlayingItemWithValues": "{0} je nehal predvajati {1} na {2}",
"ValueHasBeenAddedToLibrary": "{0} je bil dodan vaši knjižnici",
"ValueSpecialEpisodeName": "Poseben - {0}",
"VersionNumber": "Različica {0}"
"VersionNumber": "Različica {0}",
"TaskDownloadMissingSubtitles": "Prenesi manjkajoče podnapise",
"TaskRefreshChannelsDescription": "Osveži podatke spletnih kanalov.",
"TaskRefreshChannels": "Osveži kanale",
"TaskCleanTranscodeDescription": "Izbriše več kot dan stare datoteke prekodiranja.",
"TaskCleanTranscode": "Počisti mapo prekodiranja",
"TaskUpdatePluginsDescription": "Prenese in namesti posodobitve za dodatke, ki imajo omogočene samodejne posodobitve.",
"TaskUpdatePlugins": "Posodobi dodatke",
"TaskRefreshPeopleDescription": "Osveži metapodatke za igralce in režiserje v vaši knjižnici.",
"TaskRefreshPeople": "Osveži osebe",
"TaskCleanLogsDescription": "Izbriše dnevniške datoteke starejše od {0} dni.",
"TaskCleanLogs": "Počisti mapo dnevnika",
"TaskRefreshLibraryDescription": "Preišče vašo knjižnico za nove datoteke in osveži metapodatke.",
"TaskRefreshLibrary": "Preišči knjižnico predstavnosti",
"TaskRefreshChapterImagesDescription": "Ustvari sličice za poglavja videoposnetkov.",
"TaskRefreshChapterImages": "Izvleči slike poglavij",
"TaskCleanCacheDescription": "Izbriše predpomnjene datoteke, ki niso več potrebne.",
"TaskCleanCache": "Počisti mapo predpomnilnika",
"TasksChannelsCategory": "Spletni kanali",
"TasksApplicationCategory": "Aplikacija",
"TasksLibraryCategory": "Knjižnica",
"TasksMaintenanceCategory": "Vzdrževanje"
}

View File

@ -0,0 +1,36 @@
{
"MusicVideos": "Музичні відео",
"Music": "Музика",
"Movies": "Фільми",
"MessageApplicationUpdatedTo": "Jellyfin Server був оновлений до версії {0}",
"MessageApplicationUpdated": "Jellyfin Server був оновлений",
"Latest": "Останні",
"LabelIpAddressValue": "IP-адреси: {0}",
"ItemRemovedWithName": "{0} видалено з бібліотеки",
"ItemAddedWithName": "{0} додано до бібліотеки",
"HeaderNextUp": "Наступний",
"HeaderLiveTV": "Ефірне ТБ",
"HeaderFavoriteSongs": "Улюблені пісні",
"HeaderFavoriteShows": "Улюблені шоу",
"HeaderFavoriteEpisodes": "Улюблені серії",
"HeaderFavoriteArtists": "Улюблені виконавці",
"HeaderFavoriteAlbums": "Улюблені альбоми",
"HeaderContinueWatching": "Продовжити перегляд",
"HeaderCameraUploads": "Завантажено з камери",
"HeaderAlbumArtists": "Виконавці альбомів",
"Genres": "Жанри",
"Folders": "Директорії",
"Favorites": "Улюблені",
"DeviceOnlineWithName": "{0} під'єднано",
"DeviceOfflineWithName": "{0} від'єднано",
"Collections": "Колекції",
"ChapterNameValue": "Глава {0}",
"Channels": "Канали",
"CameraImageUploadedFrom": "Нова фотографія завантажена з {0}",
"Books": "Книги",
"AuthenticationSucceededWithUserName": "{0} успішно авторизовані",
"Artists": "Виконавці",
"Application": "Додаток",
"AppDeviceValues": "Додаток: {0}, Пристрій: {1}",
"Albums": "Альбоми"
}

View File

@ -1,6 +1,6 @@
{
"Albums": "專輯",
"AppDeviceValues": "軟: {0}, 設備: {1}",
"AppDeviceValues": "軟: {0}, 設備: {1}",
"Application": "應用程式",
"Artists": "藝人",
"AuthenticationSucceededWithUserName": "{0} 授權成功",
@ -92,5 +92,8 @@
"UserStoppedPlayingItemWithValues": "{0} 已在 {2} 上停止播放 {1}",
"ValueHasBeenAddedToLibrary": "{0} 已添加到你的媒體庫",
"ValueSpecialEpisodeName": "特典 - {0}",
"VersionNumber": "版本{0}"
"VersionNumber": "版本{0}",
"TaskDownloadMissingSubtitles": "下載遺失的字幕",
"TaskUpdatePlugins": "更新插件",
"TasksApplicationCategory": "應用程式"
}

View File

@ -63,6 +63,9 @@ namespace Emby.Server.Implementations.SocketSharp
if (!IPAddress.TryParse(GetHeader(CustomHeaderNames.XRealIP), out ip))
{
ip = Request.HttpContext.Connection.RemoteIpAddress;
// Default to the loopback address if no RemoteIpAddress is specified (i.e. during integration tests)
ip ??= IPAddress.Loopback;
}
}
@ -90,7 +93,10 @@ namespace Emby.Server.Implementations.SocketSharp
public IQueryCollection QueryString => Request.Query;
public bool IsLocal => Request.HttpContext.Connection.LocalIpAddress.Equals(Request.HttpContext.Connection.RemoteIpAddress);
public bool IsLocal =>
(Request.HttpContext.Connection.LocalIpAddress == null
&& Request.HttpContext.Connection.RemoteIpAddress == null)
|| Request.HttpContext.Connection.LocalIpAddress.Equals(Request.HttpContext.Connection.RemoteIpAddress);
public string HttpMethod => Request.Method;

File diff suppressed because it is too large Load Diff

View File

@ -1,23 +1,5 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -48,7 +30,7 @@ namespace Jellyfin.Data.Entities
/// <param name="kind"></param>
/// <param name="_metadata0"></param>
/// <param name="_personrole1"></param>
public Artwork(string path, global::Jellyfin.Data.Enums.ArtKind kind, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.PersonRole _personrole1)
public Artwork(string path, Enums.ArtKind kind, Metadata _metadata0, PersonRole _personrole1)
{
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
this.Path = path;
@ -72,7 +54,7 @@ namespace Jellyfin.Data.Entities
/// <param name="kind"></param>
/// <param name="_metadata0"></param>
/// <param name="_personrole1"></param>
public static Artwork Create(string path, global::Jellyfin.Data.Enums.ArtKind kind, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.PersonRole _personrole1)
public static Artwork Create(string path, Enums.ArtKind kind, Metadata _metadata0, PersonRole _personrole1)
{
return new Artwork(path, kind, _metadata0, _personrole1);
}
@ -159,31 +141,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Backing field for Kind
/// </summary>
internal global::Jellyfin.Data.Enums.ArtKind _Kind;
internal Enums.ArtKind _Kind;
/// <summary>
/// When provided in a partial class, allows value of Kind to be changed before setting.
/// </summary>
partial void SetKind(global::Jellyfin.Data.Enums.ArtKind oldValue, ref global::Jellyfin.Data.Enums.ArtKind newValue);
partial void SetKind(Enums.ArtKind oldValue, ref Enums.ArtKind newValue);
/// <summary>
/// When provided in a partial class, allows value of Kind to be changed before returning.
/// </summary>
partial void GetKind(ref global::Jellyfin.Data.Enums.ArtKind result);
partial void GetKind(ref Enums.ArtKind result);
/// <summary>
/// Indexed, Required
/// </summary>
[Required]
public global::Jellyfin.Data.Enums.ArtKind Kind
public Enums.ArtKind Kind
{
get
{
global::Jellyfin.Data.Enums.ArtKind value = _Kind;
Enums.ArtKind value = _Kind;
GetKind(ref value);
return (_Kind = value);
}
set
{
global::Jellyfin.Data.Enums.ArtKind oldValue = _Kind;
Enums.ArtKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{
@ -193,11 +175,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,37 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Book: global::Jellyfin.Data.Entities.LibraryItem
public partial class Book : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Book(): base()
protected Book()
{
BookMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.BookMetadata>();
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
BookMetadata = new HashSet<BookMetadata>();
Releases = new HashSet<Release>();
Init();
}
@ -52,8 +35,8 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
this.BookMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.BookMetadata>();
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
this.BookMetadata = new HashSet<BookMetadata>();
this.Releases = new HashSet<Release>();
Init();
}
@ -75,9 +58,11 @@ namespace Jellyfin.Data.Entities
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.BookMetadata> BookMetadata { get; protected set; }
[ForeignKey("BookMetadata_BookMetadata_Id")]
public virtual ICollection<BookMetadata> BookMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
}
}

View File

@ -1,36 +1,19 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class BookMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class BookMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected BookMetadata(): base()
protected BookMetadata()
{
Publishers = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
Publishers = new HashSet<Company>();
Init();
}
@ -49,7 +32,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_book0"></param>
public BookMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Book _book0)
public BookMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Book _book0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -60,7 +43,7 @@ namespace Jellyfin.Data.Entities
if (_book0 == null) throw new ArgumentNullException(nameof(_book0));
_book0.BookMetadata.Add(this);
this.Publishers = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
this.Publishers = new HashSet<Company>();
Init();
}
@ -71,7 +54,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_book0"></param>
public static BookMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Book _book0)
public static BookMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Book _book0)
{
return new BookMetadata(title, language, dateadded, datemodified, _book0);
}
@ -116,7 +99,8 @@ namespace Jellyfin.Data.Entities
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Publishers { get; protected set; }
[ForeignKey("Company_Publishers_Id")]
public virtual ICollection<Company> Publishers { get; protected set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -47,7 +30,7 @@ namespace Jellyfin.Data.Entities
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="timestart"></param>
/// <param name="_release0"></param>
public Chapter(string language, long timestart, global::Jellyfin.Data.Entities.Release _release0)
public Chapter(string language, long timestart, Release _release0)
{
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language;
@ -67,7 +50,7 @@ namespace Jellyfin.Data.Entities
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="timestart"></param>
/// <param name="_release0"></param>
public static Chapter Create(string language, long timestart, global::Jellyfin.Data.Entities.Release _release0)
public static Chapter Create(string language, long timestart, Release _release0)
{
return new Chapter(language, timestart, _release0);
}
@ -94,6 +77,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -259,11 +243,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,7 +13,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
public Collection()
{
CollectionItem = new System.Collections.Generic.LinkedList<global::Jellyfin.Data.Entities.CollectionItem>();
CollectionItem = new LinkedList<CollectionItem>();
Init();
}
@ -57,6 +40,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -114,17 +98,22 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.CollectionItem> CollectionItem { get; protected set; }
[ForeignKey("CollectionItem_CollectionItem_Id")]
public virtual ICollection<CollectionItem> CollectionItem { get; protected set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -50,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_collection0"></param>
/// <param name="_collectionitem1"></param>
/// <param name="_collectionitem2"></param>
public CollectionItem(global::Jellyfin.Data.Entities.Collection _collection0, global::Jellyfin.Data.Entities.CollectionItem _collectionitem1, global::Jellyfin.Data.Entities.CollectionItem _collectionitem2)
public CollectionItem(Collection _collection0, CollectionItem _collectionitem1, CollectionItem _collectionitem2)
{
// NOTE: This class has one-to-one associations with CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
@ -74,7 +57,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_collection0"></param>
/// <param name="_collectionitem1"></param>
/// <param name="_collectionitem2"></param>
public static CollectionItem Create(global::Jellyfin.Data.Entities.Collection _collection0, global::Jellyfin.Data.Entities.CollectionItem _collectionitem1, global::Jellyfin.Data.Entities.CollectionItem _collectionitem2)
public static CollectionItem Create(Collection _collection0, CollectionItem _collectionitem1, CollectionItem _collectionitem2)
{
return new CollectionItem(_collection0, _collectionitem1, _collectionitem2);
}
@ -101,6 +84,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -121,11 +105,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
@ -134,17 +123,20 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Required
/// </summary>
public virtual global::Jellyfin.Data.Entities.LibraryItem LibraryItem { get; set; }
[ForeignKey("LibraryItem_Id")]
public virtual LibraryItem LibraryItem { get; set; }
/// <remarks>
/// TODO check if this properly updated dependant and has the proper principal relationship
/// </remarks>
public virtual global::Jellyfin.Data.Entities.CollectionItem Next { get; set; }
[ForeignKey("CollectionItem_Next_Id")]
public virtual CollectionItem Next { get; set; }
/// <remarks>
/// TODO check if this properly updated dependant and has the proper principal relationship
/// </remarks>
public virtual global::Jellyfin.Data.Entities.CollectionItem Previous { get; set; }
[ForeignKey("CollectionItem_Previous_Id")]
public virtual CollectionItem Previous { get; set; }
}
}

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,7 +14,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected Company()
{
CompanyMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CompanyMetadata>();
CompanyMetadata = new HashSet<CompanyMetadata>();
Init();
}
@ -51,7 +35,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_musicalbummetadata2"></param>
/// <param name="_bookmetadata3"></param>
/// <param name="_company4"></param>
public Company(global::Jellyfin.Data.Entities.MovieMetadata _moviemetadata0, global::Jellyfin.Data.Entities.SeriesMetadata _seriesmetadata1, global::Jellyfin.Data.Entities.MusicAlbumMetadata _musicalbummetadata2, global::Jellyfin.Data.Entities.BookMetadata _bookmetadata3, global::Jellyfin.Data.Entities.Company _company4)
public Company(MovieMetadata _moviemetadata0, SeriesMetadata _seriesmetadata1, MusicAlbumMetadata _musicalbummetadata2, BookMetadata _bookmetadata3, Company _company4)
{
if (_moviemetadata0 == null) throw new ArgumentNullException(nameof(_moviemetadata0));
_moviemetadata0.Studios.Add(this);
@ -68,7 +52,7 @@ namespace Jellyfin.Data.Entities
if (_company4 == null) throw new ArgumentNullException(nameof(_company4));
_company4.Parent = this;
this.CompanyMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CompanyMetadata>();
this.CompanyMetadata = new HashSet<CompanyMetadata>();
Init();
}
@ -81,7 +65,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_musicalbummetadata2"></param>
/// <param name="_bookmetadata3"></param>
/// <param name="_company4"></param>
public static Company Create(global::Jellyfin.Data.Entities.MovieMetadata _moviemetadata0, global::Jellyfin.Data.Entities.SeriesMetadata _seriesmetadata1, global::Jellyfin.Data.Entities.MusicAlbumMetadata _musicalbummetadata2, global::Jellyfin.Data.Entities.BookMetadata _bookmetadata3, global::Jellyfin.Data.Entities.Company _company4)
public static Company Create(MovieMetadata _moviemetadata0, SeriesMetadata _seriesmetadata1, MusicAlbumMetadata _musicalbummetadata2, BookMetadata _bookmetadata3, Company _company4)
{
return new Company(_moviemetadata0, _seriesmetadata1, _musicalbummetadata2, _bookmetadata3, _company4);
}
@ -108,6 +92,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -128,19 +113,24 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.CompanyMetadata> CompanyMetadata { get; protected set; }
public virtual global::Jellyfin.Data.Entities.Company Parent { get; set; }
[ForeignKey("CompanyMetadata_CompanyMetadata_Id")]
public virtual ICollection<CompanyMetadata> CompanyMetadata { get; protected set; }
[ForeignKey("Company_Parent_Id")]
public virtual Company Parent { get; set; }
}
}

View File

@ -1,34 +1,16 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class CompanyMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class CompanyMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected CompanyMetadata(): base()
protected CompanyMetadata()
{
Init();
}
@ -47,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_company0"></param>
public CompanyMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Company _company0)
public CompanyMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -68,7 +50,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_company0"></param>
public static CompanyMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Company _company0)
public static CompanyMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Company _company0)
{
return new CompanyMetadata(title, language, dateadded, datemodified, _company0);
}

View File

@ -1,37 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class CustomItem: global::Jellyfin.Data.Entities.LibraryItem
public partial class CustomItem : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected CustomItem(): base()
protected CustomItem()
{
CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>();
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
CustomItemMetadata = new HashSet<CustomItemMetadata>();
Releases = new HashSet<Release>();
Init();
}
@ -52,8 +35,8 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
this.CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>();
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
this.CustomItemMetadata = new HashSet<CustomItemMetadata>();
this.Releases = new HashSet<Release>();
Init();
}
@ -74,10 +57,11 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("CustomItemMetadata_CustomItemMetadata_Id")]
public virtual ICollection<CustomItemMetadata> CustomItemMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.CustomItemMetadata> CustomItemMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
}
}

View File

@ -1,34 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class CustomItemMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class CustomItemMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected CustomItemMetadata(): base()
protected CustomItemMetadata()
{
Init();
}
@ -47,7 +28,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_customitem0"></param>
public CustomItemMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.CustomItem _customitem0)
public CustomItemMetadata(string title, string language, DateTime dateadded, DateTime datemodified, CustomItem _customitem0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -68,7 +49,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_customitem0"></param>
public static CustomItemMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.CustomItem _customitem0)
public static CustomItemMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, CustomItem _customitem0)
{
return new CustomItemMetadata(title, language, dateadded, datemodified, _customitem0);
}

View File

@ -1,40 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Episode: global::Jellyfin.Data.Entities.LibraryItem
public partial class Episode : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Episode(): base()
protected Episode()
{
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
EpisodeMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.EpisodeMetadata>();
Releases = new HashSet<Release>();
EpisodeMetadata = new HashSet<EpisodeMetadata>();
Init();
}
@ -52,7 +35,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
/// <param name="_season0"></param>
public Episode(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Season _season0)
public Episode(Guid urlid, DateTime dateadded, Season _season0)
{
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
@ -62,8 +45,8 @@ namespace Jellyfin.Data.Entities
if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
_season0.Episodes.Add(this);
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
this.EpisodeMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.EpisodeMetadata>();
this.Releases = new HashSet<Release>();
this.EpisodeMetadata = new HashSet<EpisodeMetadata>();
Init();
}
@ -73,7 +56,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
/// <param name="_season0"></param>
public static Episode Create(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Season _season0)
public static Episode Create(Guid urlid, DateTime dateadded, Season _season0)
{
return new Episode(urlid, dateadded, _season0);
}
@ -117,10 +100,10 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.EpisodeMetadata> EpisodeMetadata { get; protected set; }
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
[ForeignKey("EpisodeMetadata_EpisodeMetadata_Id")]
public virtual ICollection<EpisodeMetadata> EpisodeMetadata { get; protected set; }
}
}

View File

@ -1,34 +1,16 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class EpisodeMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class EpisodeMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected EpisodeMetadata(): base()
protected EpisodeMetadata()
{
Init();
}
@ -47,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_episode0"></param>
public EpisodeMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Episode _episode0)
public EpisodeMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Episode _episode0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -68,7 +50,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_episode0"></param>
public static EpisodeMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Episode _episode0)
public static EpisodeMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Episode _episode0)
{
return new EpisodeMetadata(title, language, dateadded, datemodified, _episode0);
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -46,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="name"></param>
/// <param name="_metadata0"></param>
public Genre(string name, global::Jellyfin.Data.Entities.Metadata _metadata0)
public Genre(string name, Metadata _metadata0)
{
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name;
@ -63,7 +46,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="name"></param>
/// <param name="_metadata0"></param>
public static Genre Create(string name, global::Jellyfin.Data.Entities.Metadata _metadata0)
public static Genre Create(string name, Metadata _metadata0)
{
return new Genre(name, _metadata0);
}
@ -90,6 +73,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -148,11 +132,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,9 +14,9 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected Group()
{
GroupPermissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
GroupPermissions = new HashSet<Permission>();
ProviderMappings = new HashSet<ProviderMapping>();
Preferences = new HashSet<Preference>();
Init();
}
@ -50,7 +34,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="name"></param>
/// <param name="_user0"></param>
public Group(string name, global::Jellyfin.Data.Entities.User _user0)
public Group(string name, User _user0)
{
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name;
@ -58,9 +42,9 @@ namespace Jellyfin.Data.Entities
if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
_user0.Groups.Add(this);
this.GroupPermissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
this.ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
this.Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
this.GroupPermissions = new HashSet<Permission>();
this.ProviderMappings = new HashSet<ProviderMapping>();
this.Preferences = new HashSet<Preference>();
Init();
}
@ -70,7 +54,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="name"></param>
/// <param name="_user0"></param>
public static Group Create(string name, global::Jellyfin.Data.Entities.User _user0)
public static Group Create(string name, User _user0)
{
return new Group(name, _user0);
}
@ -84,6 +68,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary>
@ -95,20 +80,29 @@ namespace Jellyfin.Data.Entities
public string Name { get; set; }
/// <summary>
/// Concurrency token
/// Required, ConcurrenyToken
/// </summary>
[Timestamp]
public Byte[] Timestamp { get; set; }
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Permission> GroupPermissions { get; protected set; }
[ForeignKey("Permission_GroupPermissions_Id")]
public virtual ICollection<Permission> GroupPermissions { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.ProviderMapping> ProviderMappings { get; protected set; }
[ForeignKey("ProviderMapping_ProviderMappings_Id")]
public virtual ICollection<ProviderMapping> ProviderMappings { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Preference> Preferences { get; protected set; }
[ForeignKey("Preference_Preferences_Id")]
public virtual ICollection<Preference> Preferences { get; protected set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -85,6 +68,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -143,11 +127,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -67,6 +50,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -160,11 +144,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
@ -173,7 +162,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Required
/// </summary>
public virtual global::Jellyfin.Data.Entities.LibraryRoot LibraryRoot { get; set; }
[ForeignKey("LibraryRoot_Id")]
public virtual LibraryRoot LibraryRoot { get; set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -85,6 +68,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -182,11 +166,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
@ -195,7 +184,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Required
/// </summary>
public virtual global::Jellyfin.Data.Entities.Library Library { get; set; }
[ForeignKey("Library_Id")]
public virtual Library Library { get; set; }
}
}

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,7 +14,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected MediaFile()
{
MediaFileStreams = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFileStream>();
MediaFileStreams = new HashSet<MediaFileStream>();
Init();
}
@ -49,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="path">Relative to the LibraryRoot</param>
/// <param name="kind"></param>
/// <param name="_release0"></param>
public MediaFile(string path, global::Jellyfin.Data.Enums.MediaFileKind kind, global::Jellyfin.Data.Entities.Release _release0)
public MediaFile(string path, Enums.MediaFileKind kind, Release _release0)
{
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
this.Path = path;
@ -59,7 +43,7 @@ namespace Jellyfin.Data.Entities
if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
_release0.MediaFiles.Add(this);
this.MediaFileStreams = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFileStream>();
this.MediaFileStreams = new HashSet<MediaFileStream>();
Init();
}
@ -70,7 +54,7 @@ namespace Jellyfin.Data.Entities
/// <param name="path">Relative to the LibraryRoot</param>
/// <param name="kind"></param>
/// <param name="_release0"></param>
public static MediaFile Create(string path, global::Jellyfin.Data.Enums.MediaFileKind kind, global::Jellyfin.Data.Entities.Release _release0)
public static MediaFile Create(string path, Enums.MediaFileKind kind, Release _release0)
{
return new MediaFile(path, kind, _release0);
}
@ -97,6 +81,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -158,31 +143,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Backing field for Kind
/// </summary>
protected global::Jellyfin.Data.Enums.MediaFileKind _Kind;
protected Enums.MediaFileKind _Kind;
/// <summary>
/// When provided in a partial class, allows value of Kind to be changed before setting.
/// </summary>
partial void SetKind(global::Jellyfin.Data.Enums.MediaFileKind oldValue, ref global::Jellyfin.Data.Enums.MediaFileKind newValue);
partial void SetKind(Enums.MediaFileKind oldValue, ref Enums.MediaFileKind newValue);
/// <summary>
/// When provided in a partial class, allows value of Kind to be changed before returning.
/// </summary>
partial void GetKind(ref global::Jellyfin.Data.Enums.MediaFileKind result);
partial void GetKind(ref Enums.MediaFileKind result);
/// <summary>
/// Required
/// </summary>
[Required]
public global::Jellyfin.Data.Enums.MediaFileKind Kind
public Enums.MediaFileKind Kind
{
get
{
global::Jellyfin.Data.Enums.MediaFileKind value = _Kind;
Enums.MediaFileKind value = _Kind;
GetKind(ref value);
return (_Kind = value);
}
set
{
global::Jellyfin.Data.Enums.MediaFileKind oldValue = _Kind;
Enums.MediaFileKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{
@ -192,17 +177,23 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.MediaFileStream> MediaFileStreams { get; protected set; }
[ForeignKey("MediaFileStream_MediaFileStreams_Id")]
public virtual ICollection<MediaFileStream> MediaFileStreams { get; protected set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -46,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="streamnumber"></param>
/// <param name="_mediafile0"></param>
public MediaFileStream(int streamnumber, global::Jellyfin.Data.Entities.MediaFile _mediafile0)
public MediaFileStream(int streamnumber, MediaFile _mediafile0)
{
this.StreamNumber = streamnumber;
@ -62,7 +45,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="streamnumber"></param>
/// <param name="_mediafile0"></param>
public static MediaFileStream Create(int streamnumber, global::Jellyfin.Data.Entities.MediaFile _mediafile0)
public static MediaFileStream Create(int streamnumber, MediaFile _mediafile0)
{
return new MediaFileStream(streamnumber, _mediafile0);
}
@ -89,6 +72,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -145,11 +129,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,11 +14,11 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected Metadata()
{
PersonRoles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PersonRole>();
Genres = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Genre>();
Artwork = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Artwork>();
Ratings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Rating>();
Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
PersonRoles = new HashSet<PersonRole>();
Genres = new HashSet<Genre>();
Artwork = new HashSet<Artwork>();
Ratings = new HashSet<Rating>();
Sources = new HashSet<MetadataProviderId>();
Init();
}
@ -52,11 +36,11 @@ namespace Jellyfin.Data.Entities
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language;
this.PersonRoles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PersonRole>();
this.Genres = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Genre>();
this.Artwork = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Artwork>();
this.Ratings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Rating>();
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
this.PersonRoles = new HashSet<PersonRole>();
this.Genres = new HashSet<Genre>();
this.Artwork = new HashSet<Artwork>();
this.Ratings = new HashSet<Rating>();
this.Sources = new HashSet<MetadataProviderId>();
Init();
}
@ -83,6 +67,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -360,25 +345,35 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.PersonRole> PersonRoles { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<PersonRole> PersonRoles { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Genre> Genres { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<Genre> Genres { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Artwork> Artwork { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<Artwork> Artwork { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Rating> Ratings { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<Rating> Ratings { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<MetadataProviderId> Sources { get; protected set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -85,6 +68,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -143,11 +127,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -52,7 +35,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_person1"></param>
/// <param name="_personrole2"></param>
/// <param name="_ratingsource3"></param>
public MetadataProviderId(string providerid, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.Person _person1, global::Jellyfin.Data.Entities.PersonRole _personrole2, global::Jellyfin.Data.Entities.RatingSource _ratingsource3)
public MetadataProviderId(string providerid, Metadata _metadata0, Person _person1, PersonRole _personrole2, RatingSource _ratingsource3)
{
// NOTE: This class has one-to-one associations with MetadataProviderId.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
@ -84,7 +67,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_person1"></param>
/// <param name="_personrole2"></param>
/// <param name="_ratingsource3"></param>
public static MetadataProviderId Create(string providerid, global::Jellyfin.Data.Entities.Metadata _metadata0, global::Jellyfin.Data.Entities.Person _person1, global::Jellyfin.Data.Entities.PersonRole _personrole2, global::Jellyfin.Data.Entities.RatingSource _ratingsource3)
public static MetadataProviderId Create(string providerid, Metadata _metadata0, Person _person1, PersonRole _personrole2, RatingSource _ratingsource3)
{
return new MetadataProviderId(providerid, _metadata0, _person1, _personrole2, _ratingsource3);
}
@ -111,6 +94,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -169,11 +153,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
@ -182,7 +171,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Required
/// </summary>
public virtual global::Jellyfin.Data.Entities.MetadataProvider MetadataProvider { get; set; }
[ForeignKey("MetadataProvider_Id")]
public virtual MetadataProvider MetadataProvider { get; set; }
}
}

View File

@ -1,37 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Movie: global::Jellyfin.Data.Entities.LibraryItem
public partial class Movie : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Movie(): base()
protected Movie()
{
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
MovieMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MovieMetadata>();
Releases = new HashSet<Release>();
MovieMetadata = new HashSet<MovieMetadata>();
Init();
}
@ -52,8 +35,8 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
this.MovieMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MovieMetadata>();
this.Releases = new HashSet<Release>();
this.MovieMetadata = new HashSet<MovieMetadata>();
Init();
}
@ -75,9 +58,11 @@ namespace Jellyfin.Data.Entities
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.MovieMetadata> MovieMetadata { get; protected set; }
[ForeignKey("MovieMetadata_MovieMetadata_Id")]
public virtual ICollection<MovieMetadata> MovieMetadata { get; protected set; }
}
}

View File

@ -1,36 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class MovieMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class MovieMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected MovieMetadata(): base()
protected MovieMetadata()
{
Studios = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
Studios = new HashSet<Company>();
Init();
}
@ -49,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_movie0"></param>
public MovieMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Movie _movie0)
public MovieMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Movie _movie0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -60,7 +44,7 @@ namespace Jellyfin.Data.Entities
if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
_movie0.MovieMetadata.Add(this);
this.Studios = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
this.Studios = new HashSet<Company>();
Init();
}
@ -71,7 +55,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_movie0"></param>
public static MovieMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Movie _movie0)
public static MovieMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Movie _movie0)
{
return new MovieMetadata(title, language, dateadded, datemodified, _movie0);
}
@ -231,8 +215,8 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Studios { get; protected set; }
[ForeignKey("Company_Studios_Id")]
public virtual ICollection<Company> Studios { get; protected set; }
}
}

View File

@ -1,37 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class MusicAlbum: global::Jellyfin.Data.Entities.LibraryItem
public partial class MusicAlbum : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected MusicAlbum(): base()
protected MusicAlbum()
{
MusicAlbumMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MusicAlbumMetadata>();
Tracks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Track>();
MusicAlbumMetadata = new HashSet<MusicAlbumMetadata>();
Tracks = new HashSet<Track>();
Init();
}
@ -52,8 +35,8 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
this.MusicAlbumMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MusicAlbumMetadata>();
this.Tracks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Track>();
this.MusicAlbumMetadata = new HashSet<MusicAlbumMetadata>();
this.Tracks = new HashSet<Track>();
Init();
}
@ -74,10 +57,11 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("MusicAlbumMetadata_MusicAlbumMetadata_Id")]
public virtual ICollection<MusicAlbumMetadata> MusicAlbumMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.MusicAlbumMetadata> MusicAlbumMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Track> Tracks { get; protected set; }
[ForeignKey("Track_Tracks_Id")]
public virtual ICollection<Track> Tracks { get; protected set; }
}
}

View File

@ -1,36 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class MusicAlbumMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class MusicAlbumMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected MusicAlbumMetadata(): base()
protected MusicAlbumMetadata()
{
Labels = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
Labels = new HashSet<Company>();
Init();
}
@ -49,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_musicalbum0"></param>
public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.MusicAlbum _musicalbum0)
public MusicAlbumMetadata(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -60,7 +44,7 @@ namespace Jellyfin.Data.Entities
if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
_musicalbum0.MusicAlbumMetadata.Add(this);
this.Labels = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
this.Labels = new HashSet<Company>();
Init();
}
@ -71,7 +55,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_musicalbum0"></param>
public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.MusicAlbum _musicalbum0)
public static MusicAlbumMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, MusicAlbum _musicalbum0)
{
return new MusicAlbumMetadata(title, language, dateadded, datemodified, _musicalbum0);
}
@ -195,7 +179,8 @@ namespace Jellyfin.Data.Entities
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Labels { get; protected set; }
[ForeignKey("Company_Labels_Id")]
public virtual ICollection<Company> Labels { get; protected set; }
}
}

View File

@ -1,22 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
@ -48,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="value"></param>
/// <param name="_user0"></param>
/// <param name="_group1"></param>
public Permission(global::Jellyfin.Data.Enums.PermissionKind kind, bool value, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
public Permission(Enums.PermissionKind kind, bool value, User _user0, Group _group1)
{
this.Kind = kind;
@ -71,7 +56,7 @@ namespace Jellyfin.Data.Entities
/// <param name="value"></param>
/// <param name="_user0"></param>
/// <param name="_group1"></param>
public static Permission Create(global::Jellyfin.Data.Enums.PermissionKind kind, bool value, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
public static Permission Create(Enums.PermissionKind kind, bool value, User _user0, Group _group1)
{
return new Permission(kind, value, _user0, _group1);
}
@ -85,36 +70,37 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary>
/// Backing field for Kind
/// </summary>
protected global::Jellyfin.Data.Enums.PermissionKind _Kind;
protected Enums.PermissionKind _Kind;
/// <summary>
/// When provided in a partial class, allows value of Kind to be changed before setting.
/// </summary>
partial void SetKind(global::Jellyfin.Data.Enums.PermissionKind oldValue, ref global::Jellyfin.Data.Enums.PermissionKind newValue);
partial void SetKind(Enums.PermissionKind oldValue, ref Enums.PermissionKind newValue);
/// <summary>
/// When provided in a partial class, allows value of Kind to be changed before returning.
/// </summary>
partial void GetKind(ref global::Jellyfin.Data.Enums.PermissionKind result);
partial void GetKind(ref Enums.PermissionKind result);
/// <summary>
/// Required
/// </summary>
[Required]
public global::Jellyfin.Data.Enums.PermissionKind Kind
public Enums.PermissionKind Kind
{
get
{
global::Jellyfin.Data.Enums.PermissionKind value = _Kind;
Enums.PermissionKind value = _Kind;
GetKind(ref value);
return (_Kind = value);
}
set
{
global::Jellyfin.Data.Enums.PermissionKind oldValue = _Kind;
Enums.PermissionKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{
@ -131,10 +117,16 @@ namespace Jellyfin.Data.Entities
public bool Value { get; set; }
/// <summary>
/// Concurrency token
/// Required, ConcurrenyToken
/// </summary>
[Timestamp]
public Byte[] Timestamp { get; set; }
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,40 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace Jellyfin.Data.Enums
{
public enum PermissionKind : Int32
{
IsAdministrator,
IsHidden,
IsDisabled,
BlockUnrateditems,
EnbleSharedDeviceControl,
EnableRemoteAccess,
EnableLiveTvManagement,
EnableLiveTvAccess,
EnableMediaPlayback,
EnableAudioPlaybackTranscoding,
EnableVideoPlaybackTranscoding,
EnableContentDeletion,
EnableContentDownloading,
EnableSyncTranscoding,
EnableMediaConversion,
EnableAllDevices,
EnableAllChannels,
EnableAllFolders,
EnablePublicSharing,
AccessSchedules
}
}

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,7 +14,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected Person()
{
Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
Sources = new HashSet<MetadataProviderId>();
Init();
}
@ -55,7 +39,7 @@ namespace Jellyfin.Data.Entities
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name;
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
this.Sources = new HashSet<MetadataProviderId>();
Init();
}
@ -92,6 +76,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -295,17 +280,22 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; }
[ForeignKey("MetadataProviderId_Sources_Id")]
public virtual ICollection<MetadataProviderId> Sources { get; protected set; }
}
}

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -33,7 +17,7 @@ namespace Jellyfin.Data.Entities
// NOTE: This class has one-to-one associations with PersonRole.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
Sources = new HashSet<MetadataProviderId>();
Init();
}
@ -51,7 +35,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="type"></param>
/// <param name="_metadata0"></param>
public PersonRole(global::Jellyfin.Data.Enums.PersonRoleType type, global::Jellyfin.Data.Entities.Metadata _metadata0)
public PersonRole(Enums.PersonRoleType type, Metadata _metadata0)
{
// NOTE: This class has one-to-one associations with PersonRole.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
@ -61,7 +45,7 @@ namespace Jellyfin.Data.Entities
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
_metadata0.PersonRoles.Add(this);
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>();
this.Sources = new HashSet<MetadataProviderId>();
Init();
}
@ -71,7 +55,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="type"></param>
/// <param name="_metadata0"></param>
public static PersonRole Create(global::Jellyfin.Data.Enums.PersonRoleType type, global::Jellyfin.Data.Entities.Metadata _metadata0)
public static PersonRole Create(Enums.PersonRoleType type, Metadata _metadata0)
{
return new PersonRole(type, _metadata0);
}
@ -98,6 +82,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -157,31 +142,31 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Backing field for Type
/// </summary>
protected global::Jellyfin.Data.Enums.PersonRoleType _Type;
protected Enums.PersonRoleType _Type;
/// <summary>
/// When provided in a partial class, allows value of Type to be changed before setting.
/// </summary>
partial void SetType(global::Jellyfin.Data.Enums.PersonRoleType oldValue, ref global::Jellyfin.Data.Enums.PersonRoleType newValue);
partial void SetType(Enums.PersonRoleType oldValue, ref Enums.PersonRoleType newValue);
/// <summary>
/// When provided in a partial class, allows value of Type to be changed before returning.
/// </summary>
partial void GetType(ref global::Jellyfin.Data.Enums.PersonRoleType result);
partial void GetType(ref Enums.PersonRoleType result);
/// <summary>
/// Required
/// </summary>
[Required]
public global::Jellyfin.Data.Enums.PersonRoleType Type
public Enums.PersonRoleType Type
{
get
{
global::Jellyfin.Data.Enums.PersonRoleType value = _Type;
Enums.PersonRoleType value = _Type;
GetType(ref value);
return (_Type = value);
}
set
{
global::Jellyfin.Data.Enums.PersonRoleType oldValue = _Type;
Enums.PersonRoleType oldValue = _Type;
SetType(oldValue, ref value);
if (oldValue != value)
{
@ -191,11 +176,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
@ -204,11 +194,15 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Required
/// </summary>
public virtual global::Jellyfin.Data.Entities.Person Person { get; set; }
[ForeignKey("Person_Id")]
public virtual global::Jellyfin.Data.Entities.Artwork Artwork { get; set; }
public virtual Person Person { get; set; }
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; }
[ForeignKey("Artwork_Artwork_Id")]
public virtual Artwork Artwork { get; set; }
[ForeignKey("MetadataProviderId_Sources_Id")]
public virtual ICollection<MetadataProviderId> Sources { get; protected set; }
}
}

View File

@ -1,37 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Photo: global::Jellyfin.Data.Entities.LibraryItem
public partial class Photo : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Photo(): base()
protected Photo()
{
PhotoMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PhotoMetadata>();
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
PhotoMetadata = new HashSet<PhotoMetadata>();
Releases = new HashSet<Release>();
Init();
}
@ -52,8 +35,8 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
this.PhotoMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PhotoMetadata>();
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
this.PhotoMetadata = new HashSet<PhotoMetadata>();
this.Releases = new HashSet<Release>();
Init();
}
@ -74,10 +57,11 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("PhotoMetadata_PhotoMetadata_Id")]
public virtual ICollection<PhotoMetadata> PhotoMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.PhotoMetadata> PhotoMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
}
}

View File

@ -1,34 +1,16 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class PhotoMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class PhotoMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected PhotoMetadata(): base()
protected PhotoMetadata()
{
Init();
}
@ -47,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_photo0"></param>
public PhotoMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Photo _photo0)
public PhotoMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Photo _photo0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -68,7 +50,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_photo0"></param>
public static PhotoMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Photo _photo0)
public static PhotoMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Photo _photo0)
{
return new PhotoMetadata(title, language, dateadded, datemodified, _photo0);
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -48,7 +31,7 @@ namespace Jellyfin.Data.Entities
/// <param name="value"></param>
/// <param name="_user0"></param>
/// <param name="_group1"></param>
public Preference(global::Jellyfin.Data.Enums.PreferenceKind kind, string value, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
public Preference(Enums.PreferenceKind kind, string value, User _user0, Group _group1)
{
this.Kind = kind;
@ -72,7 +55,7 @@ namespace Jellyfin.Data.Entities
/// <param name="value"></param>
/// <param name="_user0"></param>
/// <param name="_group1"></param>
public static Preference Create(global::Jellyfin.Data.Enums.PreferenceKind kind, string value, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
public static Preference Create(Enums.PreferenceKind kind, string value, User _user0, Group _group1)
{
return new Preference(kind, value, _user0, _group1);
}
@ -86,13 +69,14 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary>
/// Required
/// </summary>
[Required]
public global::Jellyfin.Data.Enums.PreferenceKind Kind { get; set; }
public Enums.PreferenceKind Kind { get; set; }
/// <summary>
/// Required, Max length = 65535
@ -103,10 +87,16 @@ namespace Jellyfin.Data.Entities
public string Value { get; set; }
/// <summary>
/// Concurrency token
/// Required, ConcurrenyToken
/// </summary>
[Timestamp]
public Byte[] Timestamp { get; set; }
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,27 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace Jellyfin.Data.Enums
{
public enum PreferenceKind : Int32
{
MaxParentalRating,
BlockedTags,
RemoteClientBitrateLimit,
EnabledDevices,
EnabledChannels,
EnabledFolders,
EnableContentDeletionFromFolders
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -49,7 +32,7 @@ namespace Jellyfin.Data.Entities
/// <param name="providerdata"></param>
/// <param name="_user0"></param>
/// <param name="_group1"></param>
public ProviderMapping(string providername, string providersecrets, string providerdata, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
public ProviderMapping(string providername, string providersecrets, string providerdata, User _user0, Group _group1)
{
if (string.IsNullOrEmpty(providername)) throw new ArgumentNullException(nameof(providername));
this.ProviderName = providername;
@ -78,7 +61,7 @@ namespace Jellyfin.Data.Entities
/// <param name="providerdata"></param>
/// <param name="_user0"></param>
/// <param name="_group1"></param>
public static ProviderMapping Create(string providername, string providersecrets, string providerdata, global::Jellyfin.Data.Entities.User _user0, global::Jellyfin.Data.Entities.Group _group1)
public static ProviderMapping Create(string providername, string providersecrets, string providerdata, User _user0, Group _group1)
{
return new ProviderMapping(providername, providersecrets, providerdata, _user0, _group1);
}
@ -92,6 +75,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary>
@ -119,10 +103,16 @@ namespace Jellyfin.Data.Entities
public string ProviderData { get; set; }
/// <summary>
/// Concurrency token
/// Required, ConcurrenyToken
/// </summary>
[Timestamp]
public Byte[] Timestamp { get; set; }
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -46,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="value"></param>
/// <param name="_metadata0"></param>
public Rating(double value, global::Jellyfin.Data.Entities.Metadata _metadata0)
public Rating(double value, Metadata _metadata0)
{
this.Value = value;
@ -62,7 +45,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="value"></param>
/// <param name="_metadata0"></param>
public static Rating Create(double value, global::Jellyfin.Data.Entities.Metadata _metadata0)
public static Rating Create(double value, Metadata _metadata0)
{
return new Rating(value, _metadata0);
}
@ -89,6 +72,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -177,11 +161,16 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
@ -190,7 +179,8 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// If this is NULL it&apos;s the internal user rating.
/// </summary>
public virtual global::Jellyfin.Data.Entities.RatingSource RatingType { get; set; }
[ForeignKey("RatingSource_RatingType_Id")]
public virtual RatingSource RatingType { get; set; }
}
}

View File

@ -1,23 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -50,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="maximumvalue"></param>
/// <param name="minimumvalue"></param>
/// <param name="_rating0"></param>
public RatingSource(double maximumvalue, double minimumvalue, global::Jellyfin.Data.Entities.Rating _rating0)
public RatingSource(double maximumvalue, double minimumvalue, Rating _rating0)
{
this.MaximumValue = maximumvalue;
@ -69,7 +52,7 @@ namespace Jellyfin.Data.Entities
/// <param name="maximumvalue"></param>
/// <param name="minimumvalue"></param>
/// <param name="_rating0"></param>
public static RatingSource Create(double maximumvalue, double minimumvalue, global::Jellyfin.Data.Entities.Rating _rating0)
public static RatingSource Create(double maximumvalue, double minimumvalue, Rating _rating0)
{
return new RatingSource(maximumvalue, minimumvalue, _rating0);
}
@ -96,6 +79,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -225,17 +209,22 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual global::Jellyfin.Data.Entities.MetadataProviderId Source { get; set; }
[ForeignKey("MetadataProviderId_Source_Id")]
public virtual MetadataProviderId Source { get; set; }
}
}

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,8 +14,8 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected Release()
{
MediaFiles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFile>();
Chapters = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Chapter>();
MediaFiles = new HashSet<MediaFile>();
Chapters = new HashSet<Chapter>();
Init();
}
@ -54,7 +38,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_customitem3"></param>
/// <param name="_book4"></param>
/// <param name="_photo5"></param>
public Release(string name, global::Jellyfin.Data.Entities.Movie _movie0, global::Jellyfin.Data.Entities.Episode _episode1, global::Jellyfin.Data.Entities.Track _track2, global::Jellyfin.Data.Entities.CustomItem _customitem3, global::Jellyfin.Data.Entities.Book _book4, global::Jellyfin.Data.Entities.Photo _photo5)
public Release(string name, Movie _movie0, Episode _episode1, Track _track2, CustomItem _customitem3, Book _book4, Photo _photo5)
{
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name;
@ -77,8 +61,8 @@ namespace Jellyfin.Data.Entities
if (_photo5 == null) throw new ArgumentNullException(nameof(_photo5));
_photo5.Releases.Add(this);
this.MediaFiles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFile>();
this.Chapters = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Chapter>();
this.MediaFiles = new HashSet<MediaFile>();
this.Chapters = new HashSet<Chapter>();
Init();
}
@ -93,7 +77,7 @@ namespace Jellyfin.Data.Entities
/// <param name="_customitem3"></param>
/// <param name="_book4"></param>
/// <param name="_photo5"></param>
public static Release Create(string name, global::Jellyfin.Data.Entities.Movie _movie0, global::Jellyfin.Data.Entities.Episode _episode1, global::Jellyfin.Data.Entities.Track _track2, global::Jellyfin.Data.Entities.CustomItem _customitem3, global::Jellyfin.Data.Entities.Book _book4, global::Jellyfin.Data.Entities.Photo _photo5)
public static Release Create(string name, Movie _movie0, Episode _episode1, Track _track2, CustomItem _customitem3, Book _book4, Photo _photo5)
{
return new Release(name, _movie0, _episode1, _track2, _customitem3, _book4, _photo5);
}
@ -120,6 +104,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id
{
get
@ -178,19 +163,25 @@ namespace Jellyfin.Data.Entities
}
/// <summary>
/// Required
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] Timestamp { get; set; }
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("MediaFile_MediaFiles_Id")]
public virtual ICollection<MediaFile> MediaFiles { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.MediaFile> MediaFiles { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Chapter> Chapters { get; protected set; }
[ForeignKey("Chapter_Chapters_Id")]
public virtual ICollection<Chapter> Chapters { get; protected set; }
}
}

View File

@ -1,40 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Season: global::Jellyfin.Data.Entities.LibraryItem
public partial class Season : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Season(): base()
protected Season()
{
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
SeasonMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeasonMetadata>();
Episodes = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Episode>();
SeasonMetadata = new HashSet<SeasonMetadata>();
Episodes = new HashSet<Episode>();
Init();
}
@ -52,7 +35,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
/// <param name="_series0"></param>
public Season(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Series _series0)
public Season(Guid urlid, DateTime dateadded, Series _series0)
{
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
@ -62,8 +45,8 @@ namespace Jellyfin.Data.Entities
if (_series0 == null) throw new ArgumentNullException(nameof(_series0));
_series0.Seasons.Add(this);
this.SeasonMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeasonMetadata>();
this.Episodes = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Episode>();
this.SeasonMetadata = new HashSet<SeasonMetadata>();
this.Episodes = new HashSet<Episode>();
Init();
}
@ -73,7 +56,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
/// <param name="_series0"></param>
public static Season Create(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.Series _series0)
public static Season Create(Guid urlid, DateTime dateadded, Series _series0)
{
return new Season(urlid, dateadded, _series0);
}
@ -117,10 +100,11 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("SeasonMetadata_SeasonMetadata_Id")]
public virtual ICollection<SeasonMetadata> SeasonMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.SeasonMetadata> SeasonMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Episode> Episodes { get; protected set; }
[ForeignKey("Episode_Episodes_Id")]
public virtual ICollection<Episode> Episodes { get; protected set; }
}
}

View File

@ -1,34 +1,17 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class SeasonMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class SeasonMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected SeasonMetadata(): base()
protected SeasonMetadata()
{
Init();
}
@ -47,7 +30,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_season0"></param>
public SeasonMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Season _season0)
public SeasonMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Season _season0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -68,7 +51,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_season0"></param>
public static SeasonMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Season _season0)
public static SeasonMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Season _season0)
{
return new SeasonMetadata(title, language, dateadded, datemodified, _season0);
}

View File

@ -1,37 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Series: global::Jellyfin.Data.Entities.LibraryItem
public partial class Series : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Series(): base()
protected Series()
{
SeriesMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeriesMetadata>();
Seasons = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Season>();
SeriesMetadata = new HashSet<SeriesMetadata>();
Seasons = new HashSet<Season>();
Init();
}
@ -52,8 +35,8 @@ namespace Jellyfin.Data.Entities
{
this.UrlId = urlid;
this.SeriesMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeriesMetadata>();
this.Seasons = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Season>();
this.SeriesMetadata = new HashSet<SeriesMetadata>();
this.Seasons = new HashSet<Season>();
Init();
}
@ -74,27 +57,27 @@ namespace Jellyfin.Data.Entities
/// <summary>
/// Backing field for AirsDayOfWeek
/// </summary>
protected global::Jellyfin.Data.Enums.Weekday? _AirsDayOfWeek;
protected Enums.Weekday? _AirsDayOfWeek;
/// <summary>
/// When provided in a partial class, allows value of AirsDayOfWeek to be changed before setting.
/// </summary>
partial void SetAirsDayOfWeek(global::Jellyfin.Data.Enums.Weekday? oldValue, ref global::Jellyfin.Data.Enums.Weekday? newValue);
partial void SetAirsDayOfWeek(Enums.Weekday? oldValue, ref Enums.Weekday? newValue);
/// <summary>
/// When provided in a partial class, allows value of AirsDayOfWeek to be changed before returning.
/// </summary>
partial void GetAirsDayOfWeek(ref global::Jellyfin.Data.Enums.Weekday? result);
partial void GetAirsDayOfWeek(ref Enums.Weekday? result);
public global::Jellyfin.Data.Enums.Weekday? AirsDayOfWeek
public Enums.Weekday? AirsDayOfWeek
{
get
{
global::Jellyfin.Data.Enums.Weekday? value = _AirsDayOfWeek;
Enums.Weekday? value = _AirsDayOfWeek;
GetAirsDayOfWeek(ref value);
return (_AirsDayOfWeek = value);
}
set
{
global::Jellyfin.Data.Enums.Weekday? oldValue = _AirsDayOfWeek;
Enums.Weekday? oldValue = _AirsDayOfWeek;
SetAirsDayOfWeek(oldValue, ref value);
if (oldValue != value)
{
@ -173,10 +156,11 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("SeriesMetadata_SeriesMetadata_Id")]
public virtual ICollection<SeriesMetadata> SeriesMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.SeriesMetadata> SeriesMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Season> Seasons { get; protected set; }
[ForeignKey("Season_Seasons_Id")]
public virtual ICollection<Season> Seasons { get; protected set; }
}
}

View File

@ -1,36 +1,20 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class SeriesMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class SeriesMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected SeriesMetadata(): base()
protected SeriesMetadata()
{
Networks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
Networks = new HashSet<Company>();
Init();
}
@ -49,7 +33,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_series0"></param>
public SeriesMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Series _series0)
public SeriesMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Series _series0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -60,7 +44,7 @@ namespace Jellyfin.Data.Entities
if (_series0 == null) throw new ArgumentNullException(nameof(_series0));
_series0.SeriesMetadata.Add(this);
this.Networks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>();
this.Networks = new HashSet<Company>();
Init();
}
@ -71,7 +55,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_series0"></param>
public static SeriesMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Series _series0)
public static SeriesMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Series _series0)
{
return new SeriesMetadata(title, language, dateadded, datemodified, _series0);
}
@ -231,8 +215,8 @@ namespace Jellyfin.Data.Entities
/*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Networks { get; protected set; }
[ForeignKey("Company_Networks_Id")]
public virtual ICollection<Company> Networks { get; protected set; }
}
}

View File

@ -1,40 +1,23 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class Track: global::Jellyfin.Data.Entities.LibraryItem
public partial class Track : LibraryItem
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected Track(): base()
protected Track()
{
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
TrackMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.TrackMetadata>();
Releases = new HashSet<Release>();
TrackMetadata = new HashSet<TrackMetadata>();
Init();
}
@ -52,7 +35,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
/// <param name="_musicalbum0"></param>
public Track(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.MusicAlbum _musicalbum0)
public Track(Guid urlid, DateTime dateadded, MusicAlbum _musicalbum0)
{
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem.
// One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
@ -62,8 +45,8 @@ namespace Jellyfin.Data.Entities
if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
_musicalbum0.Tracks.Add(this);
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>();
this.TrackMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.TrackMetadata>();
this.Releases = new HashSet<Release>();
this.TrackMetadata = new HashSet<TrackMetadata>();
Init();
}
@ -73,7 +56,7 @@ namespace Jellyfin.Data.Entities
/// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
/// <param name="_musicalbum0"></param>
public static Track Create(Guid urlid, DateTime dateadded, global::Jellyfin.Data.Entities.MusicAlbum _musicalbum0)
public static Track Create(Guid urlid, DateTime dateadded, MusicAlbum _musicalbum0)
{
return new Track(urlid, dateadded, _musicalbum0);
}
@ -118,9 +101,11 @@ namespace Jellyfin.Data.Entities
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; }
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.TrackMetadata> TrackMetadata { get; protected set; }
[ForeignKey("TrackMetadata_TrackMetadata_Id")]
public virtual ICollection<TrackMetadata> TrackMetadata { get; protected set; }
}
}

View File

@ -1,34 +1,16 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
public partial class TrackMetadata: global::Jellyfin.Data.Entities.Metadata
public partial class TrackMetadata : Metadata
{
partial void Init();
/// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary>
protected TrackMetadata(): base()
protected TrackMetadata()
{
Init();
}
@ -47,7 +29,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_track0"></param>
public TrackMetadata(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Track _track0)
public TrackMetadata(string title, string language, DateTime dateadded, DateTime datemodified, Track _track0)
{
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title;
@ -68,7 +50,7 @@ namespace Jellyfin.Data.Entities
/// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_track0"></param>
public static TrackMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, global::Jellyfin.Data.Entities.Track _track0)
public static TrackMetadata Create(string title, string language, DateTime dateadded, DateTime datemodified, Track _track0)
{
return new TrackMetadata(title, language, dateadded, datemodified, _track0);
}

View File

@ -1,23 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities
{
@ -30,10 +14,10 @@ namespace Jellyfin.Data.Entities
/// </summary>
protected User()
{
Groups = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Group>();
Permissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
Groups = new HashSet<Group>();
Permissions = new HashSet<Permission>();
ProviderMappings = new HashSet<ProviderMapping>();
Preferences = new HashSet<Preference>();
Init();
}
@ -76,10 +60,10 @@ namespace Jellyfin.Data.Entities
this.PlayDefaultAudioTrack = playdefaultaudiotrack;
this.Groups = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Group>();
this.Permissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>();
this.ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>();
this.Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>();
this.Groups = new HashSet<Group>();
this.Permissions = new HashSet<Permission>();
this.ProviderMappings = new HashSet<ProviderMapping>();
this.Preferences = new HashSet<Preference>();
Init();
}
@ -108,14 +92,8 @@ namespace Jellyfin.Data.Entities
/// </summary>
[Key]
[Required]
public Guid Id { get; protected set; }
/// <summary>
/// Required
/// </summary>
[ConcurrencyCheck]
[Required]
public byte[] LastLoginTimestamp { get; set; }
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary>
/// Required, Max length = 255
@ -225,17 +203,32 @@ namespace Jellyfin.Data.Entities
public bool? EnableUserPreferenceAccess { get; set; }
/// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("Group_Groups_Id")]
public virtual ICollection<Group> Groups { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Group> Groups { get; protected set; }
[ForeignKey("Permission_Permissions_Id")]
public virtual ICollection<Permission> Permissions { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Permission> Permissions { get; protected set; }
[ForeignKey("ProviderMapping_ProviderMappings_Id")]
public virtual ICollection<ProviderMapping> ProviderMappings { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.ProviderMapping> ProviderMappings { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Preference> Preferences { get; protected set; }
[ForeignKey("Preference_Preferences_Id")]
public virtual ICollection<Preference> Preferences { get; protected set; }
}
}

View File

@ -1,20 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace Jellyfin.Data.Enums
{
public enum ArtKind : Int32
public enum ArtKind
{
Other,
Poster,

View File

@ -1,20 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace Jellyfin.Data.Enums
{
public enum MediaFileKind : Int32
public enum MediaFileKind
{
Main,
Sidecar,

View File

@ -0,0 +1,26 @@
namespace Jellyfin.Data.Enums
{
public enum PermissionKind
{
IsAdministrator,
IsHidden,
IsDisabled,
BlockUnrateditems,
EnbleSharedDeviceControl,
EnableRemoteAccess,
EnableLiveTvManagement,
EnableLiveTvAccess,
EnableMediaPlayback,
EnableAudioPlaybackTranscoding,
EnableVideoPlaybackTranscoding,
EnableContentDeletion,
EnableContentDownloading,
EnableSyncTranscoding,
EnableMediaConversion,
EnableAllDevices,
EnableAllChannels,
EnableAllFolders,
EnablePublicSharing,
AccessSchedules
}
}

View File

@ -1,20 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace Jellyfin.Data.Enums
{
public enum PersonRoleType : Int32
public enum PersonRoleType
{
Other,
Director,

View File

@ -0,0 +1,13 @@
namespace Jellyfin.Data.Enums
{
public enum PreferenceKind
{
MaxParentalRating,
BlockedTags,
RemoteClientBitrateLimit,
EnabledDevices,
EnabledChannels,
EnabledFolders,
EnableContentDeletionFromFolders
}
}

View File

@ -1,20 +1,6 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated from a template.
//
// Manual changes to this file may cause unexpected behavior in your application.
// Manual changes to this file will be overwritten if the code is regenerated.
//
// Produced by Entity Framework Visual Editor
// https://github.com/msawczyn/EFDesigner
// </auto-generated>
//------------------------------------------------------------------------------
using System;
namespace Jellyfin.Data.Enums
{
public enum Weekday : Int32
public enum Weekday
{
Sunday,
Monday,

View File

@ -0,0 +1,9 @@
#pragma warning disable CS1591
namespace Jellyfin.Data
{
public interface ISavingChanges
{
void OnSavingChanges();
}
}

View File

@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<CodeAnalysisRuleSet>../jellyfin.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<!-- Code analysers-->
<ItemGroup Condition=" '$(Configuration)' == 'Debug' ">
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.8" PrivateAssets="All" />
<PackageReference Include="SerilogAnalyzer" Version="0.15.0" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
<PackageReference Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" PrivateAssets="All" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\SharedVersion.cs" />
<Compile Remove="Migrations\20200430214405_InitialSchema.cs" />
<Compile Remove="Migrations\20200430214405_InitialSchema.Designer.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Jellyfin.Data\Jellyfin.Data.csproj" />
<ProjectReference Include="..\MediaBrowser.Controller\MediaBrowser.Controller.csproj" />
<ProjectReference Include="..\MediaBrowser.Model\MediaBrowser.Model.csproj" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,115 @@
#pragma warning disable CS1591
#pragma warning disable SA1201 // Constuctors should not follow properties
#pragma warning disable SA1516 // Elements should be followed by a blank line
#pragma warning disable SA1623 // Property's documentation should begin with gets or sets
#pragma warning disable SA1629 // Documentation should end with a period
#pragma warning disable SA1648 // Inheritdoc should be used with inheriting class
using System.Linq;
using Jellyfin.Data;
using Jellyfin.Data.Entities;
using Microsoft.EntityFrameworkCore;
namespace Jellyfin.Server.Implementations
{
/// <inheritdoc/>
public partial class JellyfinDb : DbContext
{
/*public virtual DbSet<Artwork> Artwork { get; set; }
public virtual DbSet<Book> Books { get; set; }
public virtual DbSet<BookMetadata> BookMetadata { get; set; }
public virtual DbSet<Chapter> Chapters { get; set; }
public virtual DbSet<Collection> Collections { get; set; }
public virtual DbSet<CollectionItem> CollectionItems { get; set; }
public virtual DbSet<Company> Companies { get; set; }
public virtual DbSet<CompanyMetadata> CompanyMetadata { get; set; }
public virtual DbSet<CustomItem> CustomItems { get; set; }
public virtual DbSet<CustomItemMetadata> CustomItemMetadata { get; set; }
public virtual DbSet<Episode> Episodes { get; set; }
public virtual DbSet<EpisodeMetadata> EpisodeMetadata { get; set; }
public virtual DbSet<Genre> Genres { get; set; }
public virtual DbSet<Group> Groups { get; set; }
public virtual DbSet<Library> Libraries { get; set; }
public virtual DbSet<LibraryItem> LibraryItems { get; set; }
public virtual DbSet<LibraryRoot> LibraryRoot { get; set; }
public virtual DbSet<MediaFile> MediaFiles { get; set; }
public virtual DbSet<MediaFileStream> MediaFileStream { get; set; }
public virtual DbSet<Metadata> Metadata { get; set; }
public virtual DbSet<MetadataProvider> MetadataProviders { get; set; }
public virtual DbSet<MetadataProviderId> MetadataProviderIds { get; set; }
public virtual DbSet<Movie> Movies { get; set; }
public virtual DbSet<MovieMetadata> MovieMetadata { get; set; }
public virtual DbSet<MusicAlbum> MusicAlbums { get; set; }
public virtual DbSet<MusicAlbumMetadata> MusicAlbumMetadata { get; set; }
public virtual DbSet<Permission> Permissions { get; set; }
public virtual DbSet<Person> People { get; set; }
public virtual DbSet<PersonRole> PersonRoles { get; set; }
public virtual DbSet<Photo> Photo { get; set; }
public virtual DbSet<PhotoMetadata> PhotoMetadata { get; set; }
public virtual DbSet<Preference> Preferences { get; set; }
public virtual DbSet<ProviderMapping> ProviderMappings { get; set; }
public virtual DbSet<Rating> Ratings { get; set; }
/// <summary>
/// Repository for global::Jellyfin.Data.Entities.RatingSource - This is the entity to
/// store review ratings, not age ratings
/// </summary>
public virtual DbSet<RatingSource> RatingSources { get; set; }
public virtual DbSet<Release> Releases { get; set; }
public virtual DbSet<Season> Seasons { get; set; }
public virtual DbSet<SeasonMetadata> SeasonMetadata { get; set; }
public virtual DbSet<Series> Series { get; set; }
public virtual DbSet<SeriesMetadata> SeriesMetadata { get; set; }
public virtual DbSet<Track> Tracks { get; set; }
public virtual DbSet<TrackMetadata> TrackMetadata { get; set; }
public virtual DbSet<User> Users { get; set; } */
/// <summary>
/// Gets or sets the default connection string.
/// </summary>
public static string ConnectionString { get; set; } = @"Data Source=jellyfin.db";
/// <inheritdoc />
public JellyfinDb(DbContextOptions<JellyfinDb> options) : base(options)
{
}
partial void CustomInit(DbContextOptionsBuilder optionsBuilder);
/// <inheritdoc />
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
CustomInit(optionsBuilder);
}
partial void OnModelCreatingImpl(ModelBuilder modelBuilder);
partial void OnModelCreatedImpl(ModelBuilder modelBuilder);
/// <inheritdoc />
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
OnModelCreatingImpl(modelBuilder);
modelBuilder.HasDefaultSchema("jellyfin");
/*modelBuilder.Entity<Artwork>().HasIndex(t => t.Kind);
modelBuilder.Entity<Genre>().HasIndex(t => t.Name)
.IsUnique();
modelBuilder.Entity<LibraryItem>().HasIndex(t => t.UrlId)
.IsUnique();*/
OnModelCreatedImpl(modelBuilder);
}
public override int SaveChanges()
{
foreach (var entity in ChangeTracker.Entries().Where(e => e.State == EntityState.Modified))
{
var saveEntity = entity.Entity as ISavingChanges;
saveEntity.OnSavingChanges();
}
return base.SaveChanges();
}
}
}

View File

@ -21,8 +21,6 @@ namespace Jellyfin.Server.Migrations
/// <summary>
/// Execute the migration routine.
/// </summary>
/// <param name="host">Host that hosts current version.</param>
/// <param name="logger">Host logger.</param>
public void Perform(CoreAppHost host, ILogger logger);
public void Perform();
}
}

View File

@ -1,6 +1,7 @@
using System;
using System.Linq;
using MediaBrowser.Common.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Server.Migrations
@ -13,10 +14,10 @@ namespace Jellyfin.Server.Migrations
/// <summary>
/// The list of known migrations, in order of applicability.
/// </summary>
internal static readonly IMigrationRoutine[] Migrations =
private static readonly Type[] _migrationTypes =
{
new Routines.DisableTranscodingThrottling(),
new Routines.CreateUserLoggingConfigFile()
typeof(Routines.DisableTranscodingThrottling),
typeof(Routines.CreateUserLoggingConfigFile)
};
/// <summary>
@ -27,6 +28,10 @@ namespace Jellyfin.Server.Migrations
public static void Run(CoreAppHost host, ILoggerFactory loggerFactory)
{
var logger = loggerFactory.CreateLogger<MigrationRunner>();
var migrations = _migrationTypes
.Select(m => ActivatorUtilities.CreateInstance(host.ServiceProvider, m))
.OfType<IMigrationRoutine>()
.ToArray();
var migrationOptions = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<MigrationOptions>(MigrationsListStore.StoreKey);
if (!host.ServerConfigurationManager.Configuration.IsStartupWizardCompleted && migrationOptions.Applied.Count == 0)
@ -34,16 +39,16 @@ namespace Jellyfin.Server.Migrations
// If startup wizard is not finished, this is a fresh install.
// Don't run any migrations, just mark all of them as applied.
logger.LogInformation("Marking all known migrations as applied because this is a fresh install");
migrationOptions.Applied.AddRange(Migrations.Select(m => (m.Id, m.Name)));
migrationOptions.Applied.AddRange(migrations.Select(m => (m.Id, m.Name)));
host.ServerConfigurationManager.SaveConfiguration(MigrationsListStore.StoreKey, migrationOptions);
return;
}
var appliedMigrationIds = migrationOptions.Applied.Select(m => m.Id).ToHashSet();
for (var i = 0; i < Migrations.Length; i++)
for (var i = 0; i < migrations.Length; i++)
{
var migrationRoutine = Migrations[i];
var migrationRoutine = migrations[i];
if (appliedMigrationIds.Contains(migrationRoutine.Id))
{
logger.LogDebug("Skipping migration '{Name}' since it is already applied", migrationRoutine.Name);
@ -54,7 +59,7 @@ namespace Jellyfin.Server.Migrations
try
{
migrationRoutine.Perform(host, logger);
migrationRoutine.Perform();
}
catch (Exception ex)
{

Some files were not shown because too many files have changed in this diff Show More