Merge branch 'master' into activitydb-efcore

This commit is contained in:
Patrick Barron 2020-05-12 16:08:28 +00:00 committed by GitHub
commit 6379391f87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
121 changed files with 6945 additions and 6801 deletions

View File

@ -13,7 +13,7 @@ charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true insert_final_newline = true
end_of_line = lf end_of_line = lf
max_line_length = null max_line_length = off
# YAML indentation # YAML indentation
[*.{yml,yaml}] [*.{yml,yaml}]
@ -22,6 +22,7 @@ indent_size = 2
# XML indentation # XML indentation
[*.{csproj,xml}] [*.{csproj,xml}]
indent_size = 2 indent_size = 2
############################### ###############################
# .NET Coding Conventions # # .NET Coding Conventions #
############################### ###############################
@ -51,11 +52,12 @@ dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_null_propagation = true:suggestion dotnet_style_null_propagation = true:suggestion
dotnet_style_coalesce_expression = true:suggestion dotnet_style_coalesce_expression = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
dotnet_prefer_inferred_tuple_names = true:suggestion dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_prefer_inferred_anonymous_type_member_names = true:suggestion dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_auto_properties = true:silent dotnet_style_prefer_auto_properties = true:silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent dotnet_style_prefer_conditional_expression_over_return = true:silent
############################### ###############################
# Naming Conventions # # 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_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_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_symbols.non_private_static_fields.required_modifiers = static
dotnet_naming_style.non_private_static_field_style.capitalization = pascal_case 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_prefer_simple_default_expression = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true:suggestion csharp_style_pattern_local_over_anonymous_function = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion csharp_style_inlined_variable_declaration = true:suggestion
############################### ###############################
# C# Formatting Rules # # C# Formatting Rules #
############################### ###############################
@ -189,9 +192,3 @@ csharp_space_between_method_call_empty_parameter_list_parentheses = false
# Wrapping preferences # Wrapping preferences
csharp_preserve_single_line_statements = true csharp_preserve_single_line_statements = true
csharp_preserve_single_line_blocks = 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.Buffers.Binary;
using System.IO; using System.IO;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -375,5 +375,15 @@ namespace Emby.Server.Implementations.Data
return userData; 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

@ -608,6 +608,31 @@ namespace Emby.Server.Implementations.Library
return dto; 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) public UserDto GetOfflineUserDto(User user)
{ {
var dto = GetUserDto(user); var dto = GetUserDto(user);

View File

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

View File

@ -11,7 +11,7 @@
"Collections": "Colecciones", "Collections": "Colecciones",
"DeviceOfflineWithName": "{0} se ha desconectado", "DeviceOfflineWithName": "{0} se ha desconectado",
"DeviceOnlineWithName": "{0} está conectado", "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", "Favorites": "Favoritos",
"Folders": "Carpetas", "Folders": "Carpetas",
"Genres": "Géneros", "Genres": "Géneros",

View File

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

View File

@ -1,5 +1,5 @@
{ {
"HeaderLiveTV": "Suorat lähetykset", "HeaderLiveTV": "Live-TV",
"NewVersionIsAvailable": "Uusi versio Jellyfin palvelimesta on ladattavissa.", "NewVersionIsAvailable": "Uusi versio Jellyfin palvelimesta on ladattavissa.",
"NameSeasonUnknown": "Tuntematon Kausi", "NameSeasonUnknown": "Tuntematon Kausi",
"NameSeasonNumber": "Kausi {0}", "NameSeasonNumber": "Kausi {0}",
@ -12,7 +12,7 @@
"MessageNamedServerConfigurationUpdatedWithValue": "Palvelimen asetusryhmä {0} on päivitetty", "MessageNamedServerConfigurationUpdatedWithValue": "Palvelimen asetusryhmä {0} on päivitetty",
"MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty versioon {0}", "MessageApplicationUpdatedTo": "Jellyfin palvelin on päivitetty versioon {0}",
"MessageApplicationUpdated": "Jellyfin palvelin on päivitetty", "MessageApplicationUpdated": "Jellyfin palvelin on päivitetty",
"Latest": "Viimeisin", "Latest": "Uusimmat",
"LabelRunningTimeValue": "Toiston kesto: {0}", "LabelRunningTimeValue": "Toiston kesto: {0}",
"LabelIpAddressValue": "IP-osoite: {0}", "LabelIpAddressValue": "IP-osoite: {0}",
"ItemRemovedWithName": "{0} poistettiin kirjastosta", "ItemRemovedWithName": "{0} poistettiin kirjastosta",
@ -41,7 +41,7 @@
"CameraImageUploadedFrom": "Uusi kamerakuva on ladattu {0}", "CameraImageUploadedFrom": "Uusi kamerakuva on ladattu {0}",
"Books": "Kirjat", "Books": "Kirjat",
"AuthenticationSucceededWithUserName": "{0} todennus onnistui", "AuthenticationSucceededWithUserName": "{0} todennus onnistui",
"Artists": "Esiintyjät", "Artists": "Artistit",
"Application": "Sovellus", "Application": "Sovellus",
"AppDeviceValues": "Sovellus: {0}, Laite: {1}", "AppDeviceValues": "Sovellus: {0}, Laite: {1}",
"Albums": "Albumit", "Albums": "Albumit",
@ -67,21 +67,21 @@
"UserDownloadingItemWithValues": "{0} lataa {1}", "UserDownloadingItemWithValues": "{0} lataa {1}",
"UserDeletedWithName": "Käyttäjä {0} poistettu", "UserDeletedWithName": "Käyttäjä {0} poistettu",
"UserCreatedWithName": "Käyttäjä {0} luotu", "UserCreatedWithName": "Käyttäjä {0} luotu",
"TvShows": "TV-Ohjelmat", "TvShows": "TV-sarjat",
"Sync": "Synkronoi", "Sync": "Synkronoi",
"SubtitleDownloadFailureFromForItem": "Tekstityksen lataaminen epäonnistui {0} - {1}", "SubtitleDownloadFailureFromForItem": "Tekstitysten lataus ({0} -> {1}) epäonnistui //this string would have to be generated for each provider and movie because of finnish cases, sorry",
"StartupEmbyServerIsLoading": "Jellyfin palvelin latautuu. Kokeile hetken kuluttua uudelleen.", "StartupEmbyServerIsLoading": "Jellyfin palvelin latautuu. Kokeile hetken kuluttua uudelleen.",
"Songs": "Kappaleet", "Songs": "Kappaleet",
"Shows": "Ohjelmat", "Shows": "Sarjat",
"ServerNameNeedsToBeRestarted": "{0} vaatii uudelleenkäynnistyksen", "ServerNameNeedsToBeRestarted": "{0} täytyy käynnistää uudelleen",
"ProviderValue": "Tarjoaja: {0}", "ProviderValue": "Tarjoaja: {0}",
"Plugin": "Liitännäinen", "Plugin": "Liitännäinen",
"NotificationOptionVideoPlaybackStopped": "Videon toisto pysäytetty", "NotificationOptionVideoPlaybackStopped": "Videon toisto pysäytetty",
"NotificationOptionVideoPlayback": "Videon toisto aloitettu", "NotificationOptionVideoPlayback": "Videota toistetaan",
"NotificationOptionUserLockedOut": "Käyttäjä lukittu", "NotificationOptionUserLockedOut": "Käyttäjä kirjautui ulos",
"NotificationOptionTaskFailed": "Ajastettu tehtävä epäonnistui", "NotificationOptionTaskFailed": "Ajastettu tehtävä epäonnistui",
"NotificationOptionServerRestartRequired": "Palvelimen uudelleenkäynnistys vaaditaan", "NotificationOptionServerRestartRequired": "Palvelin pitää käynnistää uudelleen",
"NotificationOptionPluginUpdateInstalled": "Lisäosan päivitys asennettu", "NotificationOptionPluginUpdateInstalled": "Liitännäinen päivitetty",
"NotificationOptionPluginUninstalled": "Liitännäinen poistettu", "NotificationOptionPluginUninstalled": "Liitännäinen poistettu",
"NotificationOptionPluginInstalled": "Liitännäinen asennettu", "NotificationOptionPluginInstalled": "Liitännäinen asennettu",
"NotificationOptionPluginError": "Ongelma liitännäisessä", "NotificationOptionPluginError": "Ongelma liitännäisessä",
@ -90,8 +90,8 @@
"NotificationOptionCameraImageUploaded": "Kameran kuva ladattu", "NotificationOptionCameraImageUploaded": "Kameran kuva ladattu",
"NotificationOptionAudioPlaybackStopped": "Äänen toisto lopetettu", "NotificationOptionAudioPlaybackStopped": "Äänen toisto lopetettu",
"NotificationOptionAudioPlayback": "Toistetaan ääntä", "NotificationOptionAudioPlayback": "Toistetaan ääntä",
"NotificationOptionApplicationUpdateInstalled": "Uusi sovellusversio asennettu", "NotificationOptionApplicationUpdateInstalled": "Sovelluspäivitys asennettu",
"NotificationOptionApplicationUpdateAvailable": "Sovelluksesta on uusi versio saatavilla", "NotificationOptionApplicationUpdateAvailable": "Ohjelmistopäivitys saatavilla",
"TasksMaintenanceCategory": "Ylläpito", "TasksMaintenanceCategory": "Ylläpito",
"TaskDownloadMissingSubtitlesDescription": "Etsii puuttuvia tekstityksiä videon metadatatietojen pohjalta.", "TaskDownloadMissingSubtitlesDescription": "Etsii puuttuvia tekstityksiä videon metadatatietojen pohjalta.",
"TaskDownloadMissingSubtitles": "Lataa puuttuvat tekstitykset", "TaskDownloadMissingSubtitles": "Lataa puuttuvat tekstitykset",

View File

@ -94,5 +94,23 @@
"ValueSpecialEpisodeName": "Spécial - {0}", "ValueSpecialEpisodeName": "Spécial - {0}",
"VersionNumber": "Version {0}", "VersionNumber": "Version {0}",
"TasksLibraryCategory": "Bibliothèque", "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", "Albums": "Alben",
"AppDeviceValues": "App: {0}, Grät: {1}", "AppDeviceValues": "App: {0}, Gerät: {1}",
"Application": "Aawändig", "Application": "Anwendung",
"Artists": "Könstler", "Artists": "Künstler",
"AuthenticationSucceededWithUserName": "{0} het sech aagmäudet", "AuthenticationSucceededWithUserName": "{0} hat sich angemeldet",
"Books": "Büecher", "Books": "Bücher",
"CameraImageUploadedFrom": "Es nöis Foti esch ufeglade worde vo {0}", "CameraImageUploadedFrom": "Ein neues Foto wurde von {0} hochgeladen",
"Channels": "Kanäu", "Channels": "Kanäle",
"ChapterNameValue": "Kapitu {0}", "ChapterNameValue": "Kapitel {0}",
"Collections": "Sammlige", "Collections": "Sammlungen",
"DeviceOfflineWithName": "{0} esch offline gange", "DeviceOfflineWithName": "{0} wurde getrennt",
"DeviceOnlineWithName": "{0} esch online cho", "DeviceOnlineWithName": "{0} ist verbunden",
"FailedLoginAttemptWithUserName": "Fäugschlagne Aamäudeversuech vo {0}", "FailedLoginAttemptWithUserName": "Fehlgeschlagener Anmeldeversuch von {0}",
"Favorites": "Favorite", "Favorites": "Favoriten",
"Folders": "Ordner", "Folders": "Ordner",
"Genres": "Genres", "Genres": "Genres",
"HeaderAlbumArtists": "Albom-Könstler", "HeaderAlbumArtists": "Album-Künstler",
"HeaderCameraUploads": "Kamera-Uploads", "HeaderCameraUploads": "Kamera-Uploads",
"HeaderContinueWatching": "Wiiterluege", "HeaderContinueWatching": "weiter schauen",
"HeaderFavoriteAlbums": "Lieblingsalbe", "HeaderFavoriteAlbums": "Lieblingsalben",
"HeaderFavoriteArtists": "Lieblings-Interprete", "HeaderFavoriteArtists": "Lieblings-Künstler",
"HeaderFavoriteEpisodes": "Lieblingsepisode", "HeaderFavoriteEpisodes": "Lieblingsepisoden",
"HeaderFavoriteShows": "Lieblingsserie", "HeaderFavoriteShows": "Lieblingsserien",
"HeaderFavoriteSongs": "Lieblingslieder", "HeaderFavoriteSongs": "Lieblingslieder",
"HeaderLiveTV": "Live-Färnseh", "HeaderLiveTV": "Live-Fernseh",
"HeaderNextUp": "Als nächts", "HeaderNextUp": "Als Nächstes",
"HeaderRecordingGroups": "Ufnahmegruppe", "HeaderRecordingGroups": "Aufnahme-Gruppen",
"HomeVideos": "Heimfilmli", "HomeVideos": "Heimvideos",
"Inherit": "Hinzuefüege", "Inherit": "Vererben",
"ItemAddedWithName": "{0} esch de Bibliothek dezuegfüegt worde", "ItemAddedWithName": "{0} wurde der Bibliothek hinzugefügt",
"ItemRemovedWithName": "{0} esch vo de Bibliothek entfärnt worde", "ItemRemovedWithName": "{0} wurde aus der Bibliothek entfernt",
"LabelIpAddressValue": "IP-Adrässe: {0}", "LabelIpAddressValue": "IP-Adresse: {0}",
"LabelRunningTimeValue": "Loufziit: {0}", "LabelRunningTimeValue": "Laufzeit: {0}",
"Latest": "Nöischti", "Latest": "Neueste",
"MessageApplicationUpdated": "Jellyfin Server esch aktualisiert worde", "MessageApplicationUpdated": "Jellyfin-Server wurde aktualisiert",
"MessageApplicationUpdatedTo": "Jellyfin Server esch of Version {0} aktualisiert worde", "MessageApplicationUpdatedTo": "Jellyfin-Server wurde auf Version {0} aktualisiert",
"MessageNamedServerConfigurationUpdatedWithValue": "De Serveriistöuigsberiich {0} esch aktualisiert worde", "MessageNamedServerConfigurationUpdatedWithValue": "Der Server-Einstellungsbereich {0} wurde aktualisiert",
"MessageServerConfigurationUpdated": "Serveriistöuige send aktualisiert worde", "MessageServerConfigurationUpdated": "Serveriistöuige send aktualisiert worde",
"MixedContent": "Gmeschti Inhäut", "MixedContent": "Gmeschti Inhäut",
"Movies": "Film", "Movies": "Film",
@ -50,7 +50,7 @@
"NotificationOptionAudioPlayback": "Audiowedergab gstartet", "NotificationOptionAudioPlayback": "Audiowedergab gstartet",
"NotificationOptionAudioPlaybackStopped": "Audiwedergab gstoppt", "NotificationOptionAudioPlaybackStopped": "Audiwedergab gstoppt",
"NotificationOptionCameraImageUploaded": "Foti ueglade", "NotificationOptionCameraImageUploaded": "Foti ueglade",
"NotificationOptionInstallationFailed": "Installationsfäuer", "NotificationOptionInstallationFailed": "Installationsfehler",
"NotificationOptionNewLibraryContent": "Nöie Inhaut hinzuegfüegt", "NotificationOptionNewLibraryContent": "Nöie Inhaut hinzuegfüegt",
"NotificationOptionPluginError": "Plugin-Fäuer", "NotificationOptionPluginError": "Plugin-Fäuer",
"NotificationOptionPluginInstalled": "Plugin installiert", "NotificationOptionPluginInstalled": "Plugin installiert",
@ -92,5 +92,27 @@
"UserStoppedPlayingItemWithValues": "{0} het d'Wedergab vo {1} of {2} gstoppt", "UserStoppedPlayingItemWithValues": "{0} het d'Wedergab vo {1} of {2} gstoppt",
"ValueHasBeenAddedToLibrary": "{0} esch dinnere Biblithek hinzuegfüegt worde", "ValueHasBeenAddedToLibrary": "{0} esch dinnere Biblithek hinzuegfüegt worde",
"ValueSpecialEpisodeName": "Extra - {0}", "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

@ -62,7 +62,7 @@
"NotificationOptionVideoPlayback": "Video playback started", "NotificationOptionVideoPlayback": "Video playback started",
"NotificationOptionVideoPlaybackStopped": "Video playback stopped", "NotificationOptionVideoPlaybackStopped": "Video playback stopped",
"Photos": "תמונות", "Photos": "תמונות",
"Playlists": "רשימות ניגון", "Playlists": "רשימות הפעלה",
"Plugin": "Plugin", "Plugin": "Plugin",
"PluginInstalledWithName": "{0} was installed", "PluginInstalledWithName": "{0} was installed",
"PluginUninstalledWithName": "{0} was uninstalled", "PluginUninstalledWithName": "{0} was uninstalled",

View File

@ -30,7 +30,7 @@
"Inherit": "Naslijedi", "Inherit": "Naslijedi",
"ItemAddedWithName": "{0} je dodano u biblioteku", "ItemAddedWithName": "{0} je dodano u biblioteku",
"ItemRemovedWithName": "{0} je uklonjen iz biblioteke", "ItemRemovedWithName": "{0} je uklonjen iz biblioteke",
"LabelIpAddressValue": "Ip adresa: {0}", "LabelIpAddressValue": "IP adresa: {0}",
"LabelRunningTimeValue": "Vrijeme rada: {0}", "LabelRunningTimeValue": "Vrijeme rada: {0}",
"Latest": "Najnovije", "Latest": "Najnovije",
"MessageApplicationUpdated": "Jellyfin Server je ažuriran", "MessageApplicationUpdated": "Jellyfin Server je ažuriran",
@ -92,5 +92,13 @@
"UserStoppedPlayingItemWithValues": "{0} je zaustavio {1}", "UserStoppedPlayingItemWithValues": "{0} je zaustavio {1}",
"ValueHasBeenAddedToLibrary": "{0} has been added to your media library", "ValueHasBeenAddedToLibrary": "{0} has been added to your media library",
"ValueSpecialEpisodeName": "Specijal - {0}", "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", "Artists": "Artisti",
"AuthenticationSucceededWithUserName": "{0} autenticato con successo", "AuthenticationSucceededWithUserName": "{0} autenticato con successo",
"Books": "Libri", "Books": "Libri",
"CameraImageUploadedFrom": "È stata caricata una nuova immagine della fotocamera dal device {0}", "CameraImageUploadedFrom": "È stata caricata una nuova fotografia da {0}",
"Channels": "Canali", "Channels": "Canali",
"ChapterNameValue": "Capitolo {0}", "ChapterNameValue": "Capitolo {0}",
"Collections": "Collezioni", "Collections": "Collezioni",

View File

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

View File

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

View File

@ -92,5 +92,26 @@
"UserStoppedPlayingItemWithValues": "{0} je nehal predvajati {1} na {2}", "UserStoppedPlayingItemWithValues": "{0} je nehal predvajati {1} na {2}",
"ValueHasBeenAddedToLibrary": "{0} je bil dodan vaši knjižnici", "ValueHasBeenAddedToLibrary": "{0} je bil dodan vaši knjižnici",
"ValueSpecialEpisodeName": "Poseben - {0}", "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

@ -9,7 +9,7 @@
"Channels": "Kanaler", "Channels": "Kanaler",
"ChapterNameValue": "Kapitel {0}", "ChapterNameValue": "Kapitel {0}",
"Collections": "Samlingar", "Collections": "Samlingar",
"DeviceOfflineWithName": "{0} har tappat anslutningen", "DeviceOfflineWithName": "{0} har kopplat från",
"DeviceOnlineWithName": "{0} är ansluten", "DeviceOnlineWithName": "{0} är ansluten",
"FailedLoginAttemptWithUserName": "Misslyckat inloggningsförsök från {0}", "FailedLoginAttemptWithUserName": "Misslyckat inloggningsförsök från {0}",
"Favorites": "Favoriter", "Favorites": "Favoriter",
@ -50,7 +50,7 @@
"NotificationOptionAudioPlayback": "Ljuduppspelning har påbörjats", "NotificationOptionAudioPlayback": "Ljuduppspelning har påbörjats",
"NotificationOptionAudioPlaybackStopped": "Ljuduppspelning stoppades", "NotificationOptionAudioPlaybackStopped": "Ljuduppspelning stoppades",
"NotificationOptionCameraImageUploaded": "Kamerabild har laddats upp", "NotificationOptionCameraImageUploaded": "Kamerabild har laddats upp",
"NotificationOptionInstallationFailed": "Fel vid installation", "NotificationOptionInstallationFailed": "Installationen misslyckades",
"NotificationOptionNewLibraryContent": "Nytt innehåll har lagts till", "NotificationOptionNewLibraryContent": "Nytt innehåll har lagts till",
"NotificationOptionPluginError": "Fel uppstod med tillägget", "NotificationOptionPluginError": "Fel uppstod med tillägget",
"NotificationOptionPluginInstalled": "Tillägg har installerats", "NotificationOptionPluginInstalled": "Tillägg har installerats",
@ -113,5 +113,6 @@
"TasksChannelsCategory": "Internetkanaler", "TasksChannelsCategory": "Internetkanaler",
"TasksApplicationCategory": "Applikation", "TasksApplicationCategory": "Applikation",
"TasksLibraryCategory": "Bibliotek", "TasksLibraryCategory": "Bibliotek",
"TasksMaintenanceCategory": "Underhåll" "TasksMaintenanceCategory": "Underhåll",
"TaskRefreshPeople": "Uppdatera Personer"
} }

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": "專輯", "Albums": "專輯",
"AppDeviceValues": "軟: {0}, 設備: {1}", "AppDeviceValues": "軟: {0}, 設備: {1}",
"Application": "應用程式", "Application": "應用程式",
"Artists": "藝人", "Artists": "藝人",
"AuthenticationSucceededWithUserName": "{0} 授權成功", "AuthenticationSucceededWithUserName": "{0} 授權成功",
@ -92,5 +92,8 @@
"UserStoppedPlayingItemWithValues": "{0} 已在 {2} 上停止播放 {1}", "UserStoppedPlayingItemWithValues": "{0} 已在 {2} 上停止播放 {1}",
"ValueHasBeenAddedToLibrary": "{0} 已添加到你的媒體庫", "ValueHasBeenAddedToLibrary": "{0} 已添加到你的媒體庫",
"ValueSpecialEpisodeName": "特典 - {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)) if (!IPAddress.TryParse(GetHeader(CustomHeaderNames.XRealIP), out ip))
{ {
ip = Request.HttpContext.Connection.RemoteIpAddress; 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 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; public string HttpMethod => Request.Method;

View File

@ -1,208 +1,195 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Artwork public partial class Artwork
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Artwork() protected Artwork()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Artwork CreateArtworkUnsafe() public static Artwork CreateArtworkUnsafe()
{ {
return new Artwork(); return new Artwork();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="path"></param> /// <param name="path"></param>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="_metadata0"></param> /// <param name="_metadata0"></param>
/// <param name="_personrole1"></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)); if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
this.Path = path; this.Path = path;
this.Kind = kind; this.Kind = kind;
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0)); if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
_metadata0.Artwork.Add(this); _metadata0.Artwork.Add(this);
if (_personrole1 == null) throw new ArgumentNullException(nameof(_personrole1)); if (_personrole1 == null) throw new ArgumentNullException(nameof(_personrole1));
_personrole1.Artwork = this; _personrole1.Artwork = this;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="path"></param> /// <param name="path"></param>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="_metadata0"></param> /// <param name="_metadata0"></param>
/// <param name="_personrole1"></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); return new Artwork(path, kind, _metadata0, _personrole1);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id public int Id
{ {
get get
{
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Path
/// </summary>
protected string _Path;
/// <summary>
/// When provided in a partial class, allows value of Path to be changed before setting.
/// </summary>
partial void SetPath(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Path to be changed before returning.
/// </summary>
partial void GetPath(ref string result);
/// <summary>
/// Required, Max length = 65535
/// </summary>
[Required]
[MaxLength(65535)]
[StringLength(65535)]
public string Path
{
get
{
string value = _Path;
GetPath(ref value);
return (_Path = value);
}
set
{
string oldValue = _Path;
SetPath(oldValue, ref value);
if (oldValue != value)
{ {
_Path = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Kind /// Backing field for Path
/// </summary> /// </summary>
internal global::Jellyfin.Data.Enums.ArtKind _Kind; protected string _Path;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Kind to be changed before setting. /// When provided in a partial class, allows value of Path to be changed before setting.
/// </summary> /// </summary>
partial void SetKind(global::Jellyfin.Data.Enums.ArtKind oldValue, ref global::Jellyfin.Data.Enums.ArtKind newValue); partial void SetPath(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Kind to be changed before returning. /// When provided in a partial class, allows value of Path to be changed before returning.
/// </summary> /// </summary>
partial void GetKind(ref global::Jellyfin.Data.Enums.ArtKind result); partial void GetPath(ref string result);
/// <summary> /// <summary>
/// Indexed, Required /// Required, Max length = 65535
/// </summary> /// </summary>
[Required] [Required]
public global::Jellyfin.Data.Enums.ArtKind Kind [MaxLength(65535)]
{ [StringLength(65535)]
get public string Path
{ {
global::Jellyfin.Data.Enums.ArtKind value = _Kind; get
GetKind(ref value);
return (_Kind = value);
}
set
{
global::Jellyfin.Data.Enums.ArtKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{ {
_Kind = value; string value = _Path;
GetPath(ref value);
return (_Path = value);
} }
} set
} {
string oldValue = _Path;
SetPath(oldValue, ref value);
if (oldValue != value)
{
_Path = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for Kind
/// </summary> /// </summary>
[ConcurrencyCheck] internal Enums.ArtKind _Kind;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Kind to be changed before setting.
/// </summary>
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 Enums.ArtKind result);
/************************************************************************* /// <summary>
* Navigation properties /// Indexed, Required
*************************************************************************/ /// </summary>
[Required]
public Enums.ArtKind Kind
{
get
{
Enums.ArtKind value = _Kind;
GetKind(ref value);
return (_Kind = value);
}
set
{
Enums.ArtKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{
_Kind = value;
}
}
}
} /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,84 +1,69 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Book: global::Jellyfin.Data.Entities.LibraryItem public partial class Book : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Book(): base() protected Book()
{ {
BookMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.BookMetadata>(); BookMetadata = new HashSet<BookMetadata>();
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); Releases = new HashSet<Release>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Book CreateBookUnsafe() public static Book CreateBookUnsafe()
{ {
return new Book(); return new Book();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public Book(Guid urlid, DateTime dateadded) public Book(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
this.BookMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.BookMetadata>(); this.BookMetadata = new HashSet<BookMetadata>();
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); this.Releases = new HashSet<Release>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public static Book Create(Guid urlid, DateTime dateadded) public static Book Create(Guid urlid, DateTime dateadded)
{ {
return new Book(urlid, dateadded); return new Book(urlid, dateadded);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * 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,123 +1,107 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class BookMetadata: global::Jellyfin.Data.Entities.Metadata public partial class BookMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected BookMetadata(): base() protected BookMetadata()
{ {
Publishers = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); Publishers = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static BookMetadata CreateBookMetadataUnsafe() public static BookMetadata CreateBookMetadataUnsafe()
{ {
return new BookMetadata(); return new BookMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_book0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_book0 == null) throw new ArgumentNullException(nameof(_book0)); if (_book0 == null) throw new ArgumentNullException(nameof(_book0));
_book0.BookMetadata.Add(this); _book0.BookMetadata.Add(this);
this.Publishers = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); this.Publishers = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_book0"></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); return new BookMetadata(title, language, dateadded, datemodified, _book0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for ISBN /// Backing field for ISBN
/// </summary> /// </summary>
protected long? _ISBN; protected long? _ISBN;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of ISBN to be changed before setting. /// When provided in a partial class, allows value of ISBN to be changed before setting.
/// </summary> /// </summary>
partial void SetISBN(long? oldValue, ref long? newValue); partial void SetISBN(long? oldValue, ref long? newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of ISBN to be changed before returning. /// When provided in a partial class, allows value of ISBN to be changed before returning.
/// </summary> /// </summary>
partial void GetISBN(ref long? result); partial void GetISBN(ref long? result);
public long? ISBN public long? ISBN
{ {
get get
{
long? value = _ISBN;
GetISBN(ref value);
return (_ISBN = value);
}
set
{
long? oldValue = _ISBN;
SetISBN(oldValue, ref value);
if (oldValue != value)
{ {
_ISBN = value; long? value = _ISBN;
GetISBN(ref value);
return (_ISBN = value);
} }
} set
} {
long? oldValue = _ISBN;
SetISBN(oldValue, ref value);
if (oldValue != value)
{
_ISBN = value;
}
}
}
/************************************************************************* /*************************************************************************
* Navigation properties * 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,274 +1,263 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Chapter public partial class Chapter
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Chapter() protected Chapter()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Chapter CreateChapterUnsafe() public static Chapter CreateChapterUnsafe()
{ {
return new Chapter(); return new Chapter();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="timestart"></param> /// <param name="timestart"></param>
/// <param name="_release0"></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)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
this.TimeStart = timestart; this.TimeStart = timestart;
if (_release0 == null) throw new ArgumentNullException(nameof(_release0)); if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
_release0.Chapters.Add(this); _release0.Chapters.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="timestart"></param> /// <param name="timestart"></param>
/// <param name="_release0"></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); return new Chapter(language, timestart, _release0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
protected string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Language /// Backing field for Name
/// </summary> /// </summary>
protected string _Language; protected string _Name;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Language to be changed before setting. /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary> /// </summary>
partial void SetLanguage(string oldValue, ref string newValue); partial void SetName(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Language to be changed before returning. /// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary> /// </summary>
partial void GetLanguage(ref string result); partial void GetName(ref string result);
/// <summary> /// <summary>
/// Required, Min length = 3, Max length = 3 /// Max length = 1024
/// ISO-639-3 3-character language codes /// </summary>
/// </summary> [MaxLength(1024)]
[Required] [StringLength(1024)]
[MinLength(3)] public string Name
[MaxLength(3)] {
[StringLength(3)] get
public string Language
{
get
{
string value = _Language;
GetLanguage(ref value);
return (_Language = value);
}
set
{
string oldValue = _Language;
SetLanguage(oldValue, ref value);
if (oldValue != value)
{ {
_Language = value; string value = _Name;
GetName(ref value);
return (_Name = value);
} }
} set
}
/// <summary>
/// Backing field for TimeStart
/// </summary>
protected long _TimeStart;
/// <summary>
/// When provided in a partial class, allows value of TimeStart to be changed before setting.
/// </summary>
partial void SetTimeStart(long oldValue, ref long newValue);
/// <summary>
/// When provided in a partial class, allows value of TimeStart to be changed before returning.
/// </summary>
partial void GetTimeStart(ref long result);
/// <summary>
/// Required
/// </summary>
[Required]
public long TimeStart
{
get
{
long value = _TimeStart;
GetTimeStart(ref value);
return (_TimeStart = value);
}
set
{
long oldValue = _TimeStart;
SetTimeStart(oldValue, ref value);
if (oldValue != value)
{ {
_TimeStart = value; string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for TimeEnd /// Backing field for Language
/// </summary> /// </summary>
protected long? _TimeEnd; protected string _Language;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of TimeEnd to be changed before setting. /// When provided in a partial class, allows value of Language to be changed before setting.
/// </summary> /// </summary>
partial void SetTimeEnd(long? oldValue, ref long? newValue); partial void SetLanguage(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of TimeEnd to be changed before returning. /// When provided in a partial class, allows value of Language to be changed before returning.
/// </summary> /// </summary>
partial void GetTimeEnd(ref long? result); partial void GetLanguage(ref string result);
public long? TimeEnd /// <summary>
{ /// Required, Min length = 3, Max length = 3
get /// ISO-639-3 3-character language codes
{ /// </summary>
long? value = _TimeEnd; [Required]
GetTimeEnd(ref value); [MinLength(3)]
return (_TimeEnd = value); [MaxLength(3)]
} [StringLength(3)]
set public string Language
{ {
long? oldValue = _TimeEnd; get
SetTimeEnd(oldValue, ref value);
if (oldValue != value)
{ {
_TimeEnd = value; string value = _Language;
GetLanguage(ref value);
return (_Language = value);
} }
} set
} {
string oldValue = _Language;
SetLanguage(oldValue, ref value);
if (oldValue != value)
{
_Language = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for TimeStart
/// </summary> /// </summary>
[ConcurrencyCheck] protected long _TimeStart;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of TimeStart to be changed before setting.
/// </summary>
partial void SetTimeStart(long oldValue, ref long newValue);
/// <summary>
/// When provided in a partial class, allows value of TimeStart to be changed before returning.
/// </summary>
partial void GetTimeStart(ref long result);
/************************************************************************* /// <summary>
* Navigation properties /// Required
*************************************************************************/ /// </summary>
[Required]
public long TimeStart
{
get
{
long value = _TimeStart;
GetTimeStart(ref value);
return (_TimeStart = value);
}
set
{
long oldValue = _TimeStart;
SetTimeStart(oldValue, ref value);
if (oldValue != value)
{
_TimeStart = value;
}
}
}
} /// <summary>
/// Backing field for TimeEnd
/// </summary>
protected long? _TimeEnd;
/// <summary>
/// When provided in a partial class, allows value of TimeEnd to be changed before setting.
/// </summary>
partial void SetTimeEnd(long? oldValue, ref long? newValue);
/// <summary>
/// When provided in a partial class, allows value of TimeEnd to be changed before returning.
/// </summary>
partial void GetTimeEnd(ref long? result);
public long? TimeEnd
{
get
{
long? value = _TimeEnd;
GetTimeEnd(ref value);
return (_TimeEnd = value);
}
set
{
long? oldValue = _TimeEnd;
SetTimeEnd(oldValue, ref value);
if (oldValue != value)
{
_TimeEnd = value;
}
}
}
/// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,131 +1,120 @@
//------------------------------------------------------------------------------
// <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.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Collection public partial class Collection
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor /// Default constructor
/// </summary> /// </summary>
public Collection() public Collection()
{ {
CollectionItem = new System.Collections.Generic.LinkedList<global::Jellyfin.Data.Entities.CollectionItem>(); CollectionItem = new LinkedList<CollectionItem>();
Init(); Init();
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
protected string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for Name
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _Name;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Max length = 1024
*************************************************************************/ /// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.CollectionItem> CollectionItem { get; protected set; } /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
} public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("CollectionItem_CollectionItem_Id")]
public virtual ICollection<CollectionItem> CollectionItem { get; protected set; }
}
} }

View File

@ -1,151 +1,143 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class CollectionItem public partial class CollectionItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected CollectionItem() protected CollectionItem()
{ {
// NOTE: This class has one-to-one associations with CollectionItem. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static CollectionItem CreateCollectionItemUnsafe() public static CollectionItem CreateCollectionItemUnsafe()
{ {
return new CollectionItem(); return new CollectionItem();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="_collection0"></param> /// <param name="_collection0"></param>
/// <param name="_collectionitem1"></param> /// <param name="_collectionitem1"></param>
/// <param name="_collectionitem2"></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. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
if (_collection0 == null) throw new ArgumentNullException(nameof(_collection0)); if (_collection0 == null) throw new ArgumentNullException(nameof(_collection0));
_collection0.CollectionItem.Add(this); _collection0.CollectionItem.Add(this);
if (_collectionitem1 == null) throw new ArgumentNullException(nameof(_collectionitem1)); if (_collectionitem1 == null) throw new ArgumentNullException(nameof(_collectionitem1));
_collectionitem1.Next = this; _collectionitem1.Next = this;
if (_collectionitem2 == null) throw new ArgumentNullException(nameof(_collectionitem2)); if (_collectionitem2 == null) throw new ArgumentNullException(nameof(_collectionitem2));
_collectionitem2.Previous = this; _collectionitem2.Previous = this;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="_collection0"></param> /// <param name="_collection0"></param>
/// <param name="_collectionitem1"></param> /// <param name="_collectionitem1"></param>
/// <param name="_collectionitem2"></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); return new CollectionItem(_collection0, _collectionitem1, _collectionitem2);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
} {
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Required, ConcurrenyToken
/// </summary> /// </summary>
[ConcurrencyCheck] [ConcurrencyCheck]
[Required] [Required]
public byte[] Timestamp { get; set; } public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ RowVersion++;
}
/// <summary> /*************************************************************************
/// Required * Navigation properties
/// </summary> *************************************************************************/
public virtual global::Jellyfin.Data.Entities.LibraryItem LibraryItem { get; set; }
/// <remarks> /// <summary>
/// TODO check if this properly updated dependant and has the proper principal relationship /// Required
/// </remarks> /// </summary>
public virtual global::Jellyfin.Data.Entities.CollectionItem Next { get; set; } [ForeignKey("LibraryItem_Id")]
public virtual LibraryItem LibraryItem { get; set; }
/// <remarks> /// <remarks>
/// TODO check if this properly updated dependant and has the proper principal relationship /// TODO check if this properly updated dependant and has the proper principal relationship
/// </remarks> /// </remarks>
public virtual global::Jellyfin.Data.Entities.CollectionItem Previous { 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>
[ForeignKey("CollectionItem_Previous_Id")]
public virtual CollectionItem Previous { get; set; }
}
} }

View File

@ -1,147 +1,137 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Company public partial class Company
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Company() protected Company()
{ {
CompanyMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CompanyMetadata>(); CompanyMetadata = new HashSet<CompanyMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Company CreateCompanyUnsafe() public static Company CreateCompanyUnsafe()
{ {
return new Company(); return new Company();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="_moviemetadata0"></param> /// <param name="_moviemetadata0"></param>
/// <param name="_seriesmetadata1"></param> /// <param name="_seriesmetadata1"></param>
/// <param name="_musicalbummetadata2"></param> /// <param name="_musicalbummetadata2"></param>
/// <param name="_bookmetadata3"></param> /// <param name="_bookmetadata3"></param>
/// <param name="_company4"></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)); if (_moviemetadata0 == null) throw new ArgumentNullException(nameof(_moviemetadata0));
_moviemetadata0.Studios.Add(this); _moviemetadata0.Studios.Add(this);
if (_seriesmetadata1 == null) throw new ArgumentNullException(nameof(_seriesmetadata1)); if (_seriesmetadata1 == null) throw new ArgumentNullException(nameof(_seriesmetadata1));
_seriesmetadata1.Networks.Add(this); _seriesmetadata1.Networks.Add(this);
if (_musicalbummetadata2 == null) throw new ArgumentNullException(nameof(_musicalbummetadata2)); if (_musicalbummetadata2 == null) throw new ArgumentNullException(nameof(_musicalbummetadata2));
_musicalbummetadata2.Labels.Add(this); _musicalbummetadata2.Labels.Add(this);
if (_bookmetadata3 == null) throw new ArgumentNullException(nameof(_bookmetadata3)); if (_bookmetadata3 == null) throw new ArgumentNullException(nameof(_bookmetadata3));
_bookmetadata3.Publishers.Add(this); _bookmetadata3.Publishers.Add(this);
if (_company4 == null) throw new ArgumentNullException(nameof(_company4)); if (_company4 == null) throw new ArgumentNullException(nameof(_company4));
_company4.Parent = this; _company4.Parent = this;
this.CompanyMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CompanyMetadata>(); this.CompanyMetadata = new HashSet<CompanyMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="_moviemetadata0"></param> /// <param name="_moviemetadata0"></param>
/// <param name="_seriesmetadata1"></param> /// <param name="_seriesmetadata1"></param>
/// <param name="_musicalbummetadata2"></param> /// <param name="_musicalbummetadata2"></param>
/// <param name="_bookmetadata3"></param> /// <param name="_bookmetadata3"></param>
/// <param name="_company4"></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); return new Company(_moviemetadata0, _seriesmetadata1, _musicalbummetadata2, _bookmetadata3, _company4);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
} {
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Required, ConcurrenyToken
/// </summary> /// </summary>
[ConcurrencyCheck] [ConcurrencyCheck]
[Required] [Required]
public byte[] Timestamp { get; set; } public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ RowVersion++;
}
public virtual ICollection<global::Jellyfin.Data.Entities.CompanyMetadata> CompanyMetadata { get; protected set; } /*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("CompanyMetadata_CompanyMetadata_Id")]
public virtual ICollection<CompanyMetadata> CompanyMetadata { get; protected set; }
[ForeignKey("Company_Parent_Id")]
public virtual Company Parent { get; set; }
public virtual global::Jellyfin.Data.Entities.Company Parent { get; set; } }
}
} }

View File

@ -1,234 +1,216 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class CompanyMetadata: global::Jellyfin.Data.Entities.Metadata public partial class CompanyMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected CompanyMetadata(): base() protected CompanyMetadata()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static CompanyMetadata CreateCompanyMetadataUnsafe() public static CompanyMetadata CreateCompanyMetadataUnsafe()
{ {
return new CompanyMetadata(); return new CompanyMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_company0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_company0 == null) throw new ArgumentNullException(nameof(_company0)); if (_company0 == null) throw new ArgumentNullException(nameof(_company0));
_company0.CompanyMetadata.Add(this); _company0.CompanyMetadata.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_company0"></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); return new CompanyMetadata(title, language, dateadded, datemodified, _company0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Description /// Backing field for Description
/// </summary> /// </summary>
protected string _Description; protected string _Description;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Description to be changed before setting. /// When provided in a partial class, allows value of Description to be changed before setting.
/// </summary> /// </summary>
partial void SetDescription(string oldValue, ref string newValue); partial void SetDescription(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Description to be changed before returning. /// When provided in a partial class, allows value of Description to be changed before returning.
/// </summary> /// </summary>
partial void GetDescription(ref string result); partial void GetDescription(ref string result);
/// <summary> /// <summary>
/// Max length = 65535 /// Max length = 65535
/// </summary> /// </summary>
[MaxLength(65535)] [MaxLength(65535)]
[StringLength(65535)] [StringLength(65535)]
public string Description public string Description
{ {
get get
{
string value = _Description;
GetDescription(ref value);
return (_Description = value);
}
set
{
string oldValue = _Description;
SetDescription(oldValue, ref value);
if (oldValue != value)
{ {
_Description = value; string value = _Description;
GetDescription(ref value);
return (_Description = value);
} }
} set
}
/// <summary>
/// Backing field for Headquarters
/// </summary>
protected string _Headquarters;
/// <summary>
/// When provided in a partial class, allows value of Headquarters to be changed before setting.
/// </summary>
partial void SetHeadquarters(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Headquarters to be changed before returning.
/// </summary>
partial void GetHeadquarters(ref string result);
/// <summary>
/// Max length = 255
/// </summary>
[MaxLength(255)]
[StringLength(255)]
public string Headquarters
{
get
{
string value = _Headquarters;
GetHeadquarters(ref value);
return (_Headquarters = value);
}
set
{
string oldValue = _Headquarters;
SetHeadquarters(oldValue, ref value);
if (oldValue != value)
{ {
_Headquarters = value; string oldValue = _Description;
SetDescription(oldValue, ref value);
if (oldValue != value)
{
_Description = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Country /// Backing field for Headquarters
/// </summary> /// </summary>
protected string _Country; protected string _Headquarters;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting. /// When provided in a partial class, allows value of Headquarters to be changed before setting.
/// </summary> /// </summary>
partial void SetCountry(string oldValue, ref string newValue); partial void SetHeadquarters(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning. /// When provided in a partial class, allows value of Headquarters to be changed before returning.
/// </summary> /// </summary>
partial void GetCountry(ref string result); partial void GetHeadquarters(ref string result);
/// <summary> /// <summary>
/// Max length = 2 /// Max length = 255
/// </summary> /// </summary>
[MaxLength(2)] [MaxLength(255)]
[StringLength(2)] [StringLength(255)]
public string Country public string Headquarters
{ {
get get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{ {
_Country = value; string value = _Headquarters;
GetHeadquarters(ref value);
return (_Headquarters = value);
} }
} set
}
/// <summary>
/// Backing field for Homepage
/// </summary>
protected string _Homepage;
/// <summary>
/// When provided in a partial class, allows value of Homepage to be changed before setting.
/// </summary>
partial void SetHomepage(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Homepage to be changed before returning.
/// </summary>
partial void GetHomepage(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Homepage
{
get
{
string value = _Homepage;
GetHomepage(ref value);
return (_Homepage = value);
}
set
{
string oldValue = _Homepage;
SetHomepage(oldValue, ref value);
if (oldValue != value)
{ {
_Homepage = value; string oldValue = _Headquarters;
SetHeadquarters(oldValue, ref value);
if (oldValue != value)
{
_Headquarters = value;
}
} }
} }
}
/************************************************************************* /// <summary>
* Navigation properties /// Backing field for Country
*************************************************************************/ /// </summary>
protected string _Country;
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting.
/// </summary>
partial void SetCountry(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning.
/// </summary>
partial void GetCountry(ref string result);
} /// <summary>
/// Max length = 2
/// </summary>
[MaxLength(2)]
[StringLength(2)]
public string Country
{
get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{
_Country = value;
}
}
}
/// <summary>
/// Backing field for Homepage
/// </summary>
protected string _Homepage;
/// <summary>
/// When provided in a partial class, allows value of Homepage to be changed before setting.
/// </summary>
partial void SetHomepage(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Homepage to be changed before returning.
/// </summary>
partial void GetHomepage(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Homepage
{
get
{
string value = _Homepage;
GetHomepage(ref value);
return (_Homepage = value);
}
set
{
string oldValue = _Homepage;
SetHomepage(oldValue, ref value);
if (oldValue != value)
{
_Homepage = value;
}
}
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,84 +1,68 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class CustomItem: global::Jellyfin.Data.Entities.LibraryItem public partial class CustomItem : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected CustomItem(): base() protected CustomItem()
{ {
CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>(); CustomItemMetadata = new HashSet<CustomItemMetadata>();
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); Releases = new HashSet<Release>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static CustomItem CreateCustomItemUnsafe() public static CustomItem CreateCustomItemUnsafe()
{ {
return new CustomItem(); return new CustomItem();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public CustomItem(Guid urlid, DateTime dateadded) public CustomItem(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
this.CustomItemMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.CustomItemMetadata>(); this.CustomItemMetadata = new HashSet<CustomItemMetadata>();
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); this.Releases = new HashSet<Release>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public static CustomItem Create(Guid urlid, DateTime dateadded) public static CustomItem Create(Guid urlid, DateTime dateadded)
{ {
return new CustomItem(urlid, dateadded); return new CustomItem(urlid, dateadded);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * 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; } [ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; } }
}
} }

View File

@ -1,86 +1,67 @@
//------------------------------------------------------------------------------
// <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;
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 namespace Jellyfin.Data.Entities
{ {
public partial class CustomItemMetadata: global::Jellyfin.Data.Entities.Metadata public partial class CustomItemMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected CustomItemMetadata(): base() protected CustomItemMetadata()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static CustomItemMetadata CreateCustomItemMetadataUnsafe() public static CustomItemMetadata CreateCustomItemMetadataUnsafe()
{ {
return new CustomItemMetadata(); return new CustomItemMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_customitem0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_customitem0 == null) throw new ArgumentNullException(nameof(_customitem0)); if (_customitem0 == null) throw new ArgumentNullException(nameof(_customitem0));
_customitem0.CustomItemMetadata.Add(this); _customitem0.CustomItemMetadata.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_customitem0"></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); return new CustomItemMetadata(title, language, dateadded, datemodified, _customitem0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * Navigation properties
*************************************************************************/ *************************************************************************/
} }
} }

View File

@ -1,127 +1,110 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Episode: global::Jellyfin.Data.Entities.LibraryItem public partial class Episode : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Episode(): base() protected Episode()
{ {
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem. // 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. // 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>(); Releases = new HashSet<Release>();
EpisodeMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.EpisodeMetadata>(); EpisodeMetadata = new HashSet<EpisodeMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Episode CreateEpisodeUnsafe() public static Episode CreateEpisodeUnsafe()
{ {
return new Episode(); return new Episode();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <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> /// <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. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
this.UrlId = urlid; this.UrlId = urlid;
if (_season0 == null) throw new ArgumentNullException(nameof(_season0)); if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
_season0.Episodes.Add(this); _season0.Episodes.Add(this);
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); this.Releases = new HashSet<Release>();
this.EpisodeMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.EpisodeMetadata>(); this.EpisodeMetadata = new HashSet<EpisodeMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <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> /// <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); return new Episode(urlid, dateadded, _season0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for EpisodeNumber /// Backing field for EpisodeNumber
/// </summary> /// </summary>
protected int? _EpisodeNumber; protected int? _EpisodeNumber;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of EpisodeNumber to be changed before setting. /// When provided in a partial class, allows value of EpisodeNumber to be changed before setting.
/// </summary> /// </summary>
partial void SetEpisodeNumber(int? oldValue, ref int? newValue); partial void SetEpisodeNumber(int? oldValue, ref int? newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of EpisodeNumber to be changed before returning. /// When provided in a partial class, allows value of EpisodeNumber to be changed before returning.
/// </summary> /// </summary>
partial void GetEpisodeNumber(ref int? result); partial void GetEpisodeNumber(ref int? result);
public int? EpisodeNumber public int? EpisodeNumber
{ {
get get
{
int? value = _EpisodeNumber;
GetEpisodeNumber(ref value);
return (_EpisodeNumber = value);
}
set
{
int? oldValue = _EpisodeNumber;
SetEpisodeNumber(oldValue, ref value);
if (oldValue != value)
{ {
_EpisodeNumber = value; int? value = _EpisodeNumber;
GetEpisodeNumber(ref value);
return (_EpisodeNumber = value);
} }
} set
} {
int? oldValue = _EpisodeNumber;
SetEpisodeNumber(oldValue, ref value);
if (oldValue != value)
{
_EpisodeNumber = value;
}
}
}
/************************************************************************* /*************************************************************************
* Navigation properties * Navigation properties
*************************************************************************/ *************************************************************************/
[ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
[ForeignKey("EpisodeMetadata_EpisodeMetadata_Id")]
public virtual ICollection<EpisodeMetadata> EpisodeMetadata { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; } }
public virtual ICollection<global::Jellyfin.Data.Entities.EpisodeMetadata> EpisodeMetadata { get; protected set; }
}
} }

View File

@ -1,197 +1,179 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class EpisodeMetadata: global::Jellyfin.Data.Entities.Metadata public partial class EpisodeMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected EpisodeMetadata(): base() protected EpisodeMetadata()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static EpisodeMetadata CreateEpisodeMetadataUnsafe() public static EpisodeMetadata CreateEpisodeMetadataUnsafe()
{ {
return new EpisodeMetadata(); return new EpisodeMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_episode0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_episode0 == null) throw new ArgumentNullException(nameof(_episode0)); if (_episode0 == null) throw new ArgumentNullException(nameof(_episode0));
_episode0.EpisodeMetadata.Add(this); _episode0.EpisodeMetadata.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_episode0"></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); return new EpisodeMetadata(title, language, dateadded, datemodified, _episode0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Outline /// Backing field for Outline
/// </summary> /// </summary>
protected string _Outline; protected string _Outline;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before setting. /// When provided in a partial class, allows value of Outline to be changed before setting.
/// </summary> /// </summary>
partial void SetOutline(string oldValue, ref string newValue); partial void SetOutline(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before returning. /// When provided in a partial class, allows value of Outline to be changed before returning.
/// </summary> /// </summary>
partial void GetOutline(ref string result); partial void GetOutline(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 1024
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(1024)]
[StringLength(1024)] [StringLength(1024)]
public string Outline public string Outline
{ {
get get
{
string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
}
set
{
string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{ {
_Outline = value; string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
} }
} set
}
/// <summary>
/// Backing field for Plot
/// </summary>
protected string _Plot;
/// <summary>
/// When provided in a partial class, allows value of Plot to be changed before setting.
/// </summary>
partial void SetPlot(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Plot to be changed before returning.
/// </summary>
partial void GetPlot(ref string result);
/// <summary>
/// Max length = 65535
/// </summary>
[MaxLength(65535)]
[StringLength(65535)]
public string Plot
{
get
{
string value = _Plot;
GetPlot(ref value);
return (_Plot = value);
}
set
{
string oldValue = _Plot;
SetPlot(oldValue, ref value);
if (oldValue != value)
{ {
_Plot = value; string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{
_Outline = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Tagline /// Backing field for Plot
/// </summary> /// </summary>
protected string _Tagline; protected string _Plot;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before setting. /// When provided in a partial class, allows value of Plot to be changed before setting.
/// </summary> /// </summary>
partial void SetTagline(string oldValue, ref string newValue); partial void SetPlot(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before returning. /// When provided in a partial class, allows value of Plot to be changed before returning.
/// </summary> /// </summary>
partial void GetTagline(ref string result); partial void GetPlot(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 65535
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(65535)]
[StringLength(1024)] [StringLength(65535)]
public string Tagline public string Plot
{ {
get get
{
string value = _Tagline;
GetTagline(ref value);
return (_Tagline = value);
}
set
{
string oldValue = _Tagline;
SetTagline(oldValue, ref value);
if (oldValue != value)
{ {
_Tagline = value; string value = _Plot;
GetPlot(ref value);
return (_Plot = value);
} }
} set
} {
string oldValue = _Plot;
SetPlot(oldValue, ref value);
if (oldValue != value)
{
_Plot = value;
}
}
}
/************************************************************************* /// <summary>
* Navigation properties /// Backing field for Tagline
*************************************************************************/ /// </summary>
protected string _Tagline;
/// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before setting.
/// </summary>
partial void SetTagline(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before returning.
/// </summary>
partial void GetTagline(ref string result);
} /// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Tagline
{
get
{
string value = _Tagline;
GetTagline(ref value);
return (_Tagline = value);
}
set
{
string oldValue = _Tagline;
SetTagline(oldValue, ref value);
if (oldValue != value)
{
_Tagline = value;
}
}
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,163 +1,152 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Genre public partial class Genre
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Genre() protected Genre()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Genre CreateGenreUnsafe() public static Genre CreateGenreUnsafe()
{ {
return new Genre(); return new Genre();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="_metadata0"></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)); if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name; this.Name = name;
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0)); if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
_metadata0.Genres.Add(this); _metadata0.Genres.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="_metadata0"></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); return new Genre(name, _metadata0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
internal string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Indexed, Required, Max length = 255
/// </summary>
[Required]
[MaxLength(255)]
[StringLength(255)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for Name
/// </summary> /// </summary>
[ConcurrencyCheck] internal string _Name;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Indexed, Required, Max length = 255
*************************************************************************/ /// </summary>
[Required]
[MaxLength(255)]
[StringLength(255)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
}
}
} /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,115 +1,109 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Group public partial class Group
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Group() protected Group()
{ {
GroupPermissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>(); GroupPermissions = new HashSet<Permission>();
ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>(); ProviderMappings = new HashSet<ProviderMapping>();
Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>(); Preferences = new HashSet<Preference>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Group CreateGroupUnsafe() public static Group CreateGroupUnsafe()
{ {
return new Group(); return new Group();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="_user0"></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)); if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name; this.Name = name;
if (_user0 == null) throw new ArgumentNullException(nameof(_user0)); if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
_user0.Groups.Add(this); _user0.Groups.Add(this);
this.GroupPermissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>(); this.GroupPermissions = new HashSet<Permission>();
this.ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>(); this.ProviderMappings = new HashSet<ProviderMapping>();
this.Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>(); this.Preferences = new HashSet<Preference>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="_user0"></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); return new Group(name, _user0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id { get; protected set; } [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary> /// <summary>
/// Required, Max length = 255 /// Required, Max length = 255
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(255)] [MaxLength(255)]
[StringLength(255)] [StringLength(255)]
public string Name { get; set; } public string Name { get; set; }
/// <summary> /// <summary>
/// Concurrency token /// Required, ConcurrenyToken
/// </summary> /// </summary>
[Timestamp] [ConcurrencyCheck]
public Byte[] Timestamp { get; set; } [Required]
public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ RowVersion++;
}
public virtual ICollection<global::Jellyfin.Data.Entities.Permission> GroupPermissions { get; protected set; } /*************************************************************************
* Navigation properties
*************************************************************************/
public virtual ICollection<global::Jellyfin.Data.Entities.ProviderMapping> ProviderMappings { get; protected set; } [ForeignKey("Permission_GroupPermissions_Id")]
public virtual ICollection<Permission> GroupPermissions { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Preference> Preferences { get; protected set; } [ForeignKey("ProviderMapping_ProviderMappings_Id")]
public virtual ICollection<ProviderMapping> ProviderMappings { get; protected set; }
} [ForeignKey("Preference_Preferences_Id")]
public virtual ICollection<Preference> Preferences { get; protected set; }
}
} }

View File

@ -1,158 +1,147 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Library public partial class Library
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Library() protected Library()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Library CreateLibraryUnsafe() public static Library CreateLibraryUnsafe()
{ {
return new Library(); return new Library();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public Library(string name) public Library(string name)
{ {
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name; this.Name = name;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public static Library Create(string name) public static Library Create(string name)
{ {
return new Library(name); return new Library(name);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
protected string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Required, Max length = 1024
/// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for Name
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _Name;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Required, Max length = 1024
*************************************************************************/ /// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
}
}
} /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,180 +1,170 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public abstract partial class LibraryItem public abstract partial class LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to being abstract. /// Default constructor. Protected due to being abstract.
/// </summary> /// </summary>
protected LibraryItem() protected LibraryItem()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
protected LibraryItem(Guid urlid, DateTime dateadded) protected LibraryItem(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
Init(); Init();
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for UrlId
/// </summary>
internal Guid _UrlId;
/// <summary>
/// When provided in a partial class, allows value of UrlId to be changed before setting.
/// </summary>
partial void SetUrlId(Guid oldValue, ref Guid newValue);
/// <summary>
/// When provided in a partial class, allows value of UrlId to be changed before returning.
/// </summary>
partial void GetUrlId(ref Guid result);
/// <summary>
/// Indexed, Required
/// This is whats gets displayed in the Urls and API requests. This could also be a string.
/// </summary>
[Required]
public Guid UrlId
{
get
{
Guid value = _UrlId;
GetUrlId(ref value);
return (_UrlId = value);
}
set
{
Guid oldValue = _UrlId;
SetUrlId(oldValue, ref value);
if (oldValue != value)
{ {
_UrlId = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for DateAdded /// Backing field for UrlId
/// </summary> /// </summary>
protected DateTime _DateAdded; internal Guid _UrlId;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before setting. /// When provided in a partial class, allows value of UrlId to be changed before setting.
/// </summary> /// </summary>
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue); partial void SetUrlId(Guid oldValue, ref Guid newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before returning. /// When provided in a partial class, allows value of UrlId to be changed before returning.
/// </summary> /// </summary>
partial void GetDateAdded(ref DateTime result); partial void GetUrlId(ref Guid result);
/// <summary> /// <summary>
/// Required /// Indexed, Required
/// </summary> /// This is whats gets displayed in the Urls and API requests. This could also be a string.
[Required] /// </summary>
public DateTime DateAdded [Required]
{ public Guid UrlId
get {
{ get
DateTime value = _DateAdded;
GetDateAdded(ref value);
return (_DateAdded = value);
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{ {
_DateAdded = value; Guid value = _UrlId;
GetUrlId(ref value);
return (_UrlId = value);
} }
} set
} {
Guid oldValue = _UrlId;
SetUrlId(oldValue, ref value);
if (oldValue != value)
{
_UrlId = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for DateAdded
/// </summary> /// </summary>
[ConcurrencyCheck] protected DateTime _DateAdded;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of DateAdded to be changed before setting.
/// </summary>
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
/// </summary>
partial void GetDateAdded(ref DateTime result);
/************************************************************************* /// <summary>
* Navigation properties /// Required
*************************************************************************/ /// </summary>
[Required]
public DateTime DateAdded
{
get
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
return (_DateAdded = value);
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{
_DateAdded = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Required, ConcurrenyToken
/// </summary> /// </summary>
public virtual global::Jellyfin.Data.Entities.LibraryRoot LibraryRoot { get; set; } [ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
} public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
/// <summary>
/// Required
/// </summary>
[ForeignKey("LibraryRoot_Id")]
public virtual LibraryRoot LibraryRoot { get; set; }
}
} }

View File

@ -1,202 +1,192 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class LibraryRoot public partial class LibraryRoot
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected LibraryRoot() protected LibraryRoot()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static LibraryRoot CreateLibraryRootUnsafe() public static LibraryRoot CreateLibraryRootUnsafe()
{ {
return new LibraryRoot(); return new LibraryRoot();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="path">Absolute Path</param> /// <param name="path">Absolute Path</param>
public LibraryRoot(string path) public LibraryRoot(string path)
{ {
if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path)); if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
this.Path = path; this.Path = path;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="path">Absolute Path</param> /// <param name="path">Absolute Path</param>
public static LibraryRoot Create(string path) public static LibraryRoot Create(string path)
{ {
return new LibraryRoot(path); return new LibraryRoot(path);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Path
/// </summary>
protected string _Path;
/// <summary>
/// When provided in a partial class, allows value of Path to be changed before setting.
/// </summary>
partial void SetPath(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Path to be changed before returning.
/// </summary>
partial void GetPath(ref string result);
/// <summary>
/// Required, Max length = 65535
/// Absolute Path
/// </summary>
[Required]
[MaxLength(65535)]
[StringLength(65535)]
public string Path
{
get
{
string value = _Path;
GetPath(ref value);
return (_Path = value);
}
set
{
string oldValue = _Path;
SetPath(oldValue, ref value);
if (oldValue != value)
{ {
_Path = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for NetworkPath /// Backing field for Path
/// </summary> /// </summary>
protected string _NetworkPath; protected string _Path;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of NetworkPath to be changed before setting. /// When provided in a partial class, allows value of Path to be changed before setting.
/// </summary> /// </summary>
partial void SetNetworkPath(string oldValue, ref string newValue); partial void SetPath(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of NetworkPath to be changed before returning. /// When provided in a partial class, allows value of Path to be changed before returning.
/// </summary> /// </summary>
partial void GetNetworkPath(ref string result); partial void GetPath(ref string result);
/// <summary> /// <summary>
/// Max length = 65535 /// Required, Max length = 65535
/// Absolute network path, for example for transcoding sattelites. /// Absolute Path
/// </summary> /// </summary>
[MaxLength(65535)] [Required]
[StringLength(65535)] [MaxLength(65535)]
public string NetworkPath [StringLength(65535)]
{ public string Path
get {
{ get
string value = _NetworkPath;
GetNetworkPath(ref value);
return (_NetworkPath = value);
}
set
{
string oldValue = _NetworkPath;
SetNetworkPath(oldValue, ref value);
if (oldValue != value)
{ {
_NetworkPath = value; string value = _Path;
GetPath(ref value);
return (_Path = value);
} }
} set
} {
string oldValue = _Path;
SetPath(oldValue, ref value);
if (oldValue != value)
{
_Path = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for NetworkPath
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _NetworkPath;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of NetworkPath to be changed before setting.
/// </summary>
partial void SetNetworkPath(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of NetworkPath to be changed before returning.
/// </summary>
partial void GetNetworkPath(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Max length = 65535
*************************************************************************/ /// Absolute network path, for example for transcoding sattelites.
/// </summary>
[MaxLength(65535)]
[StringLength(65535)]
public string NetworkPath
{
get
{
string value = _NetworkPath;
GetNetworkPath(ref value);
return (_NetworkPath = value);
}
set
{
string oldValue = _NetworkPath;
SetNetworkPath(oldValue, ref value);
if (oldValue != value)
{
_NetworkPath = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Required, ConcurrenyToken
/// </summary> /// </summary>
public virtual global::Jellyfin.Data.Entities.Library Library { get; set; } [ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
} public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
/// <summary>
/// Required
/// </summary>
[ForeignKey("Library_Id")]
public virtual Library Library { get; set; }
}
} }

View File

@ -1,209 +1,200 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MediaFile public partial class MediaFile
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MediaFile() protected MediaFile()
{ {
MediaFileStreams = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFileStream>(); MediaFileStreams = new HashSet<MediaFileStream>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MediaFile CreateMediaFileUnsafe() public static MediaFile CreateMediaFileUnsafe()
{ {
return new MediaFile(); return new MediaFile();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="path">Relative to the LibraryRoot</param> /// <param name="path">Relative to the LibraryRoot</param>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="_release0"></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)); if (string.IsNullOrEmpty(path)) throw new ArgumentNullException(nameof(path));
this.Path = path; this.Path = path;
this.Kind = kind; this.Kind = kind;
if (_release0 == null) throw new ArgumentNullException(nameof(_release0)); if (_release0 == null) throw new ArgumentNullException(nameof(_release0));
_release0.MediaFiles.Add(this); _release0.MediaFiles.Add(this);
this.MediaFileStreams = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFileStream>(); this.MediaFileStreams = new HashSet<MediaFileStream>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="path">Relative to the LibraryRoot</param> /// <param name="path">Relative to the LibraryRoot</param>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="_release0"></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); return new MediaFile(path, kind, _release0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Path
/// </summary>
protected string _Path;
/// <summary>
/// When provided in a partial class, allows value of Path to be changed before setting.
/// </summary>
partial void SetPath(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Path to be changed before returning.
/// </summary>
partial void GetPath(ref string result);
/// <summary>
/// Required, Max length = 65535
/// Relative to the LibraryRoot
/// </summary>
[Required]
[MaxLength(65535)]
[StringLength(65535)]
public string Path
{
get
{
string value = _Path;
GetPath(ref value);
return (_Path = value);
}
set
{
string oldValue = _Path;
SetPath(oldValue, ref value);
if (oldValue != value)
{ {
_Path = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Kind /// Backing field for Path
/// </summary> /// </summary>
protected global::Jellyfin.Data.Enums.MediaFileKind _Kind; protected string _Path;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Kind to be changed before setting. /// When provided in a partial class, allows value of Path to be changed before setting.
/// </summary> /// </summary>
partial void SetKind(global::Jellyfin.Data.Enums.MediaFileKind oldValue, ref global::Jellyfin.Data.Enums.MediaFileKind newValue); partial void SetPath(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Kind to be changed before returning. /// When provided in a partial class, allows value of Path to be changed before returning.
/// </summary> /// </summary>
partial void GetKind(ref global::Jellyfin.Data.Enums.MediaFileKind result); partial void GetPath(ref string result);
/// <summary> /// <summary>
/// Required /// Required, Max length = 65535
/// </summary> /// Relative to the LibraryRoot
[Required] /// </summary>
public global::Jellyfin.Data.Enums.MediaFileKind Kind [Required]
{ [MaxLength(65535)]
get [StringLength(65535)]
{ public string Path
global::Jellyfin.Data.Enums.MediaFileKind value = _Kind; {
GetKind(ref value); get
return (_Kind = value);
}
set
{
global::Jellyfin.Data.Enums.MediaFileKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{ {
_Kind = value; string value = _Path;
GetPath(ref value);
return (_Path = value);
} }
} set
} {
string oldValue = _Path;
SetPath(oldValue, ref value);
if (oldValue != value)
{
_Path = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for Kind
/// </summary> /// </summary>
[ConcurrencyCheck] protected Enums.MediaFileKind _Kind;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Kind to be changed before setting.
/// </summary>
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 Enums.MediaFileKind result);
/************************************************************************* /// <summary>
* Navigation properties /// Required
*************************************************************************/ /// </summary>
[Required]
public Enums.MediaFileKind Kind
{
get
{
Enums.MediaFileKind value = _Kind;
GetKind(ref value);
return (_Kind = value);
}
set
{
Enums.MediaFileKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{
_Kind = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.MediaFileStream> MediaFileStreams { get; protected set; } /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
} public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("MediaFileStream_MediaFileStreams_Id")]
public virtual ICollection<MediaFileStream> MediaFileStreams { get; protected set; }
}
} }

View File

@ -1,160 +1,149 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MediaFileStream public partial class MediaFileStream
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MediaFileStream() protected MediaFileStream()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MediaFileStream CreateMediaFileStreamUnsafe() public static MediaFileStream CreateMediaFileStreamUnsafe()
{ {
return new MediaFileStream(); return new MediaFileStream();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="streamnumber"></param> /// <param name="streamnumber"></param>
/// <param name="_mediafile0"></param> /// <param name="_mediafile0"></param>
public MediaFileStream(int streamnumber, global::Jellyfin.Data.Entities.MediaFile _mediafile0) public MediaFileStream(int streamnumber, MediaFile _mediafile0)
{ {
this.StreamNumber = streamnumber; this.StreamNumber = streamnumber;
if (_mediafile0 == null) throw new ArgumentNullException(nameof(_mediafile0)); if (_mediafile0 == null) throw new ArgumentNullException(nameof(_mediafile0));
_mediafile0.MediaFileStreams.Add(this); _mediafile0.MediaFileStreams.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="streamnumber"></param> /// <param name="streamnumber"></param>
/// <param name="_mediafile0"></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); return new MediaFileStream(streamnumber, _mediafile0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for StreamNumber
/// </summary>
protected int _StreamNumber;
/// <summary>
/// When provided in a partial class, allows value of StreamNumber to be changed before setting.
/// </summary>
partial void SetStreamNumber(int oldValue, ref int newValue);
/// <summary>
/// When provided in a partial class, allows value of StreamNumber to be changed before returning.
/// </summary>
partial void GetStreamNumber(ref int result);
/// <summary>
/// Required
/// </summary>
[Required]
public int StreamNumber
{
get
{
int value = _StreamNumber;
GetStreamNumber(ref value);
return (_StreamNumber = value);
}
set
{
int oldValue = _StreamNumber;
SetStreamNumber(oldValue, ref value);
if (oldValue != value)
{ {
_StreamNumber = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for StreamNumber
/// </summary> /// </summary>
[ConcurrencyCheck] protected int _StreamNumber;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of StreamNumber to be changed before setting.
/// </summary>
partial void SetStreamNumber(int oldValue, ref int newValue);
/// <summary>
/// When provided in a partial class, allows value of StreamNumber to be changed before returning.
/// </summary>
partial void GetStreamNumber(ref int result);
/************************************************************************* /// <summary>
* Navigation properties /// Required
*************************************************************************/ /// </summary>
[Required]
public int StreamNumber
{
get
{
int value = _StreamNumber;
GetStreamNumber(ref value);
return (_StreamNumber = value);
}
set
{
int oldValue = _StreamNumber;
SetStreamNumber(oldValue, ref value);
if (oldValue != value)
{
_StreamNumber = value;
}
}
}
} /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,385 +1,380 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public abstract partial class Metadata public abstract partial class Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to being abstract. /// Default constructor. Protected due to being abstract.
/// </summary> /// </summary>
protected Metadata() protected Metadata()
{ {
PersonRoles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PersonRole>(); PersonRoles = new HashSet<PersonRole>();
Genres = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Genre>(); Genres = new HashSet<Genre>();
Artwork = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Artwork>(); Artwork = new HashSet<Artwork>();
Ratings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Rating>(); Ratings = new HashSet<Rating>();
Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>(); Sources = new HashSet<MetadataProviderId>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
protected Metadata(string title, string language, DateTime dateadded, DateTime datemodified) protected Metadata(string title, string language, DateTime dateadded, DateTime datemodified)
{ {
if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
this.PersonRoles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PersonRole>(); this.PersonRoles = new HashSet<PersonRole>();
this.Genres = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Genre>(); this.Genres = new HashSet<Genre>();
this.Artwork = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Artwork>(); this.Artwork = new HashSet<Artwork>();
this.Ratings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Rating>(); this.Ratings = new HashSet<Rating>();
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>(); this.Sources = new HashSet<MetadataProviderId>();
Init(); Init();
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Title
/// </summary>
protected string _Title;
/// <summary>
/// When provided in a partial class, allows value of Title to be changed before setting.
/// </summary>
partial void SetTitle(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Title to be changed before returning.
/// </summary>
partial void GetTitle(ref string result);
/// <summary>
/// Required, Max length = 1024
/// The title or name of the object
/// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Title
{
get
{
string value = _Title;
GetTitle(ref value);
return (_Title = value);
}
set
{
string oldValue = _Title;
SetTitle(oldValue, ref value);
if (oldValue != value)
{ {
_Title = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for OriginalTitle /// Backing field for Title
/// </summary> /// </summary>
protected string _OriginalTitle; protected string _Title;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of OriginalTitle to be changed before setting. /// When provided in a partial class, allows value of Title to be changed before setting.
/// </summary> /// </summary>
partial void SetOriginalTitle(string oldValue, ref string newValue); partial void SetTitle(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of OriginalTitle to be changed before returning. /// When provided in a partial class, allows value of Title to be changed before returning.
/// </summary> /// </summary>
partial void GetOriginalTitle(ref string result); partial void GetTitle(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Required, Max length = 1024
/// </summary> /// The title or name of the object
[MaxLength(1024)] /// </summary>
[StringLength(1024)] [Required]
public string OriginalTitle [MaxLength(1024)]
{ [StringLength(1024)]
get public string Title
{ {
string value = _OriginalTitle; get
GetOriginalTitle(ref value);
return (_OriginalTitle = value);
}
set
{
string oldValue = _OriginalTitle;
SetOriginalTitle(oldValue, ref value);
if (oldValue != value)
{ {
_OriginalTitle = value; string value = _Title;
GetTitle(ref value);
return (_Title = value);
} }
} set
}
/// <summary>
/// Backing field for SortTitle
/// </summary>
protected string _SortTitle;
/// <summary>
/// When provided in a partial class, allows value of SortTitle to be changed before setting.
/// </summary>
partial void SetSortTitle(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of SortTitle to be changed before returning.
/// </summary>
partial void GetSortTitle(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string SortTitle
{
get
{
string value = _SortTitle;
GetSortTitle(ref value);
return (_SortTitle = value);
}
set
{
string oldValue = _SortTitle;
SetSortTitle(oldValue, ref value);
if (oldValue != value)
{ {
_SortTitle = value; string oldValue = _Title;
SetTitle(oldValue, ref value);
if (oldValue != value)
{
_Title = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Language /// Backing field for OriginalTitle
/// </summary> /// </summary>
protected string _Language; protected string _OriginalTitle;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Language to be changed before setting. /// When provided in a partial class, allows value of OriginalTitle to be changed before setting.
/// </summary> /// </summary>
partial void SetLanguage(string oldValue, ref string newValue); partial void SetOriginalTitle(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Language to be changed before returning. /// When provided in a partial class, allows value of OriginalTitle to be changed before returning.
/// </summary> /// </summary>
partial void GetLanguage(ref string result); partial void GetOriginalTitle(ref string result);
/// <summary> /// <summary>
/// Required, Min length = 3, Max length = 3 /// Max length = 1024
/// ISO-639-3 3-character language codes /// </summary>
/// </summary> [MaxLength(1024)]
[Required] [StringLength(1024)]
[MinLength(3)] public string OriginalTitle
[MaxLength(3)] {
[StringLength(3)] get
public string Language
{
get
{
string value = _Language;
GetLanguage(ref value);
return (_Language = value);
}
set
{
string oldValue = _Language;
SetLanguage(oldValue, ref value);
if (oldValue != value)
{ {
_Language = value; string value = _OriginalTitle;
GetOriginalTitle(ref value);
return (_OriginalTitle = value);
} }
} set
}
/// <summary>
/// Backing field for ReleaseDate
/// </summary>
protected DateTimeOffset? _ReleaseDate;
/// <summary>
/// When provided in a partial class, allows value of ReleaseDate to be changed before setting.
/// </summary>
partial void SetReleaseDate(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
/// <summary>
/// When provided in a partial class, allows value of ReleaseDate to be changed before returning.
/// </summary>
partial void GetReleaseDate(ref DateTimeOffset? result);
public DateTimeOffset? ReleaseDate
{
get
{
DateTimeOffset? value = _ReleaseDate;
GetReleaseDate(ref value);
return (_ReleaseDate = value);
}
set
{
DateTimeOffset? oldValue = _ReleaseDate;
SetReleaseDate(oldValue, ref value);
if (oldValue != value)
{ {
_ReleaseDate = value; string oldValue = _OriginalTitle;
SetOriginalTitle(oldValue, ref value);
if (oldValue != value)
{
_OriginalTitle = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for DateAdded /// Backing field for SortTitle
/// </summary> /// </summary>
protected DateTime _DateAdded; protected string _SortTitle;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before setting. /// When provided in a partial class, allows value of SortTitle to be changed before setting.
/// </summary> /// </summary>
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue); partial void SetSortTitle(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before returning. /// When provided in a partial class, allows value of SortTitle to be changed before returning.
/// </summary> /// </summary>
partial void GetDateAdded(ref DateTime result); partial void GetSortTitle(ref string result);
/// <summary> /// <summary>
/// Required /// Max length = 1024
/// </summary> /// </summary>
[Required] [MaxLength(1024)]
public DateTime DateAdded [StringLength(1024)]
{ public string SortTitle
get {
{ get
DateTime value = _DateAdded;
GetDateAdded(ref value);
return (_DateAdded = value);
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{ {
_DateAdded = value; string value = _SortTitle;
GetSortTitle(ref value);
return (_SortTitle = value);
} }
} set
}
/// <summary>
/// Backing field for DateModified
/// </summary>
protected DateTime _DateModified;
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before setting.
/// </summary>
partial void SetDateModified(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before returning.
/// </summary>
partial void GetDateModified(ref DateTime result);
/// <summary>
/// Required
/// </summary>
[Required]
public DateTime DateModified
{
get
{
DateTime value = _DateModified;
GetDateModified(ref value);
return (_DateModified = value);
}
internal set
{
DateTime oldValue = _DateModified;
SetDateModified(oldValue, ref value);
if (oldValue != value)
{ {
_DateModified = value; string oldValue = _SortTitle;
SetSortTitle(oldValue, ref value);
if (oldValue != value)
{
_SortTitle = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for Language
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _Language;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Language to be changed before setting.
/// </summary>
partial void SetLanguage(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Language to be changed before returning.
/// </summary>
partial void GetLanguage(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Required, Min length = 3, Max length = 3
*************************************************************************/ /// ISO-639-3 3-character language codes
/// </summary>
[Required]
[MinLength(3)]
[MaxLength(3)]
[StringLength(3)]
public string Language
{
get
{
string value = _Language;
GetLanguage(ref value);
return (_Language = value);
}
set
{
string oldValue = _Language;
SetLanguage(oldValue, ref value);
if (oldValue != value)
{
_Language = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.PersonRole> PersonRoles { get; protected set; } /// <summary>
/// Backing field for ReleaseDate
/// </summary>
protected DateTimeOffset? _ReleaseDate;
/// <summary>
/// When provided in a partial class, allows value of ReleaseDate to be changed before setting.
/// </summary>
partial void SetReleaseDate(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
/// <summary>
/// When provided in a partial class, allows value of ReleaseDate to be changed before returning.
/// </summary>
partial void GetReleaseDate(ref DateTimeOffset? result);
public virtual ICollection<global::Jellyfin.Data.Entities.Genre> Genres { get; protected set; } public DateTimeOffset? ReleaseDate
{
get
{
DateTimeOffset? value = _ReleaseDate;
GetReleaseDate(ref value);
return (_ReleaseDate = value);
}
set
{
DateTimeOffset? oldValue = _ReleaseDate;
SetReleaseDate(oldValue, ref value);
if (oldValue != value)
{
_ReleaseDate = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.Artwork> Artwork { get; protected set; } /// <summary>
/// Backing field for DateAdded
/// </summary>
protected DateTime _DateAdded;
/// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
/// </summary>
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
/// </summary>
partial void GetDateAdded(ref DateTime result);
public virtual ICollection<global::Jellyfin.Data.Entities.Rating> Ratings { get; protected set; } /// <summary>
/// Required
/// </summary>
[Required]
public DateTime DateAdded
{
get
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
return (_DateAdded = value);
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{
_DateAdded = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; } /// <summary>
/// Backing field for DateModified
/// </summary>
protected DateTime _DateModified;
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before setting.
/// </summary>
partial void SetDateModified(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before returning.
/// </summary>
partial void GetDateModified(ref DateTime result);
} /// <summary>
/// Required
/// </summary>
[Required]
public DateTime DateModified
{
get
{
DateTime value = _DateModified;
GetDateModified(ref value);
return (_DateModified = value);
}
internal set
{
DateTime oldValue = _DateModified;
SetDateModified(oldValue, ref value);
if (oldValue != value)
{
_DateModified = value;
}
}
}
/// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<PersonRole> PersonRoles { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<Genre> Genres { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<Artwork> Artwork { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<Rating> Ratings { get; protected set; }
[ForeignKey("PersonRole_PersonRoles_Id")]
public virtual ICollection<MetadataProviderId> Sources { get; protected set; }
}
} }

View File

@ -1,158 +1,147 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MetadataProvider public partial class MetadataProvider
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MetadataProvider() protected MetadataProvider()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MetadataProvider CreateMetadataProviderUnsafe() public static MetadataProvider CreateMetadataProviderUnsafe()
{ {
return new MetadataProvider(); return new MetadataProvider();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public MetadataProvider(string name) public MetadataProvider(string name)
{ {
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name; this.Name = name;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
public static MetadataProvider Create(string name) public static MetadataProvider Create(string name)
{ {
return new MetadataProvider(name); return new MetadataProvider(name);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
protected string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Required, Max length = 1024
/// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for Name
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _Name;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Required, Max length = 1024
*************************************************************************/ /// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
}
}
} /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,189 +1,179 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MetadataProviderId public partial class MetadataProviderId
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MetadataProviderId() protected MetadataProviderId()
{ {
// NOTE: This class has one-to-one associations with MetadataProviderId. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MetadataProviderId CreateMetadataProviderIdUnsafe() public static MetadataProviderId CreateMetadataProviderIdUnsafe()
{ {
return new MetadataProviderId(); return new MetadataProviderId();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="providerid"></param> /// <param name="providerid"></param>
/// <param name="_metadata0"></param> /// <param name="_metadata0"></param>
/// <param name="_person1"></param> /// <param name="_person1"></param>
/// <param name="_personrole2"></param> /// <param name="_personrole2"></param>
/// <param name="_ratingsource3"></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. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
if (string.IsNullOrEmpty(providerid)) throw new ArgumentNullException(nameof(providerid)); if (string.IsNullOrEmpty(providerid)) throw new ArgumentNullException(nameof(providerid));
this.ProviderId = providerid; this.ProviderId = providerid;
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0)); if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
_metadata0.Sources.Add(this); _metadata0.Sources.Add(this);
if (_person1 == null) throw new ArgumentNullException(nameof(_person1)); if (_person1 == null) throw new ArgumentNullException(nameof(_person1));
_person1.Sources.Add(this); _person1.Sources.Add(this);
if (_personrole2 == null) throw new ArgumentNullException(nameof(_personrole2)); if (_personrole2 == null) throw new ArgumentNullException(nameof(_personrole2));
_personrole2.Sources.Add(this); _personrole2.Sources.Add(this);
if (_ratingsource3 == null) throw new ArgumentNullException(nameof(_ratingsource3)); if (_ratingsource3 == null) throw new ArgumentNullException(nameof(_ratingsource3));
_ratingsource3.Source = this; _ratingsource3.Source = this;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="providerid"></param> /// <param name="providerid"></param>
/// <param name="_metadata0"></param> /// <param name="_metadata0"></param>
/// <param name="_person1"></param> /// <param name="_person1"></param>
/// <param name="_personrole2"></param> /// <param name="_personrole2"></param>
/// <param name="_ratingsource3"></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); return new MetadataProviderId(providerid, _metadata0, _person1, _personrole2, _ratingsource3);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for ProviderId
/// </summary>
protected string _ProviderId;
/// <summary>
/// When provided in a partial class, allows value of ProviderId to be changed before setting.
/// </summary>
partial void SetProviderId(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of ProviderId to be changed before returning.
/// </summary>
partial void GetProviderId(ref string result);
/// <summary>
/// Required, Max length = 255
/// </summary>
[Required]
[MaxLength(255)]
[StringLength(255)]
public string ProviderId
{
get
{
string value = _ProviderId;
GetProviderId(ref value);
return (_ProviderId = value);
}
set
{
string oldValue = _ProviderId;
SetProviderId(oldValue, ref value);
if (oldValue != value)
{ {
_ProviderId = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for ProviderId
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _ProviderId;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of ProviderId to be changed before setting.
/// </summary>
partial void SetProviderId(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of ProviderId to be changed before returning.
/// </summary>
partial void GetProviderId(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Required, Max length = 255
*************************************************************************/ /// </summary>
[Required]
[MaxLength(255)]
[StringLength(255)]
public string ProviderId
{
get
{
string value = _ProviderId;
GetProviderId(ref value);
return (_ProviderId = value);
}
set
{
string oldValue = _ProviderId;
SetProviderId(oldValue, ref value);
if (oldValue != value)
{
_ProviderId = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Required, ConcurrenyToken
/// </summary> /// </summary>
public virtual global::Jellyfin.Data.Entities.MetadataProvider MetadataProvider { get; set; } [ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
} public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
/// <summary>
/// Required
/// </summary>
[ForeignKey("MetadataProvider_Id")]
public virtual MetadataProvider MetadataProvider { get; set; }
}
} }

View File

@ -1,84 +1,69 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Movie: global::Jellyfin.Data.Entities.LibraryItem public partial class Movie : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Movie(): base() protected Movie()
{ {
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); Releases = new HashSet<Release>();
MovieMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MovieMetadata>(); MovieMetadata = new HashSet<MovieMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Movie CreateMovieUnsafe() public static Movie CreateMovieUnsafe()
{ {
return new Movie(); return new Movie();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public Movie(Guid urlid, DateTime dateadded) public Movie(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); this.Releases = new HashSet<Release>();
this.MovieMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MovieMetadata>(); this.MovieMetadata = new HashSet<MovieMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public static Movie Create(Guid urlid, DateTime dateadded) public static Movie Create(Guid urlid, DateTime dateadded)
{ {
return new Movie(urlid, dateadded); return new Movie(urlid, dateadded);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * 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,239 +1,223 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MovieMetadata: global::Jellyfin.Data.Entities.Metadata public partial class MovieMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MovieMetadata(): base() protected MovieMetadata()
{ {
Studios = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); Studios = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MovieMetadata CreateMovieMetadataUnsafe() public static MovieMetadata CreateMovieMetadataUnsafe()
{ {
return new MovieMetadata(); return new MovieMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_movie0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0)); if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
_movie0.MovieMetadata.Add(this); _movie0.MovieMetadata.Add(this);
this.Studios = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); this.Studios = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_movie0"></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); return new MovieMetadata(title, language, dateadded, datemodified, _movie0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Outline /// Backing field for Outline
/// </summary> /// </summary>
protected string _Outline; protected string _Outline;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before setting. /// When provided in a partial class, allows value of Outline to be changed before setting.
/// </summary> /// </summary>
partial void SetOutline(string oldValue, ref string newValue); partial void SetOutline(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before returning. /// When provided in a partial class, allows value of Outline to be changed before returning.
/// </summary> /// </summary>
partial void GetOutline(ref string result); partial void GetOutline(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 1024
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(1024)]
[StringLength(1024)] [StringLength(1024)]
public string Outline public string Outline
{ {
get get
{
string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
}
set
{
string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{ {
_Outline = value; string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
} }
} set
}
/// <summary>
/// Backing field for Plot
/// </summary>
protected string _Plot;
/// <summary>
/// When provided in a partial class, allows value of Plot to be changed before setting.
/// </summary>
partial void SetPlot(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Plot to be changed before returning.
/// </summary>
partial void GetPlot(ref string result);
/// <summary>
/// Max length = 65535
/// </summary>
[MaxLength(65535)]
[StringLength(65535)]
public string Plot
{
get
{
string value = _Plot;
GetPlot(ref value);
return (_Plot = value);
}
set
{
string oldValue = _Plot;
SetPlot(oldValue, ref value);
if (oldValue != value)
{ {
_Plot = value; string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{
_Outline = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Tagline /// Backing field for Plot
/// </summary> /// </summary>
protected string _Tagline; protected string _Plot;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before setting. /// When provided in a partial class, allows value of Plot to be changed before setting.
/// </summary> /// </summary>
partial void SetTagline(string oldValue, ref string newValue); partial void SetPlot(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before returning. /// When provided in a partial class, allows value of Plot to be changed before returning.
/// </summary> /// </summary>
partial void GetTagline(ref string result); partial void GetPlot(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 65535
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(65535)]
[StringLength(1024)] [StringLength(65535)]
public string Tagline public string Plot
{ {
get get
{
string value = _Tagline;
GetTagline(ref value);
return (_Tagline = value);
}
set
{
string oldValue = _Tagline;
SetTagline(oldValue, ref value);
if (oldValue != value)
{ {
_Tagline = value; string value = _Plot;
GetPlot(ref value);
return (_Plot = value);
} }
} set
}
/// <summary>
/// Backing field for Country
/// </summary>
protected string _Country;
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting.
/// </summary>
partial void SetCountry(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning.
/// </summary>
partial void GetCountry(ref string result);
/// <summary>
/// Max length = 2
/// </summary>
[MaxLength(2)]
[StringLength(2)]
public string Country
{
get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{ {
_Country = value; string oldValue = _Plot;
SetPlot(oldValue, ref value);
if (oldValue != value)
{
_Plot = value;
}
} }
} }
}
/************************************************************************* /// <summary>
* Navigation properties /// Backing field for Tagline
*************************************************************************/ /// </summary>
protected string _Tagline;
/// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before setting.
/// </summary>
partial void SetTagline(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before returning.
/// </summary>
partial void GetTagline(ref string result);
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Studios { get; protected set; } /// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Tagline
{
get
{
string value = _Tagline;
GetTagline(ref value);
return (_Tagline = value);
}
set
{
string oldValue = _Tagline;
SetTagline(oldValue, ref value);
if (oldValue != value)
{
_Tagline = value;
}
}
}
} /// <summary>
/// Backing field for Country
/// </summary>
protected string _Country;
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting.
/// </summary>
partial void SetCountry(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning.
/// </summary>
partial void GetCountry(ref string result);
/// <summary>
/// Max length = 2
/// </summary>
[MaxLength(2)]
[StringLength(2)]
public string Country
{
get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{
_Country = value;
}
}
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("Company_Studios_Id")]
public virtual ICollection<Company> Studios { get; protected set; }
}
} }

View File

@ -1,84 +1,68 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MusicAlbum: global::Jellyfin.Data.Entities.LibraryItem public partial class MusicAlbum : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MusicAlbum(): base() protected MusicAlbum()
{ {
MusicAlbumMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MusicAlbumMetadata>(); MusicAlbumMetadata = new HashSet<MusicAlbumMetadata>();
Tracks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Track>(); Tracks = new HashSet<Track>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MusicAlbum CreateMusicAlbumUnsafe() public static MusicAlbum CreateMusicAlbumUnsafe()
{ {
return new MusicAlbum(); return new MusicAlbum();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public MusicAlbum(Guid urlid, DateTime dateadded) public MusicAlbum(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
this.MusicAlbumMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MusicAlbumMetadata>(); this.MusicAlbumMetadata = new HashSet<MusicAlbumMetadata>();
this.Tracks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Track>(); this.Tracks = new HashSet<Track>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public static MusicAlbum Create(Guid urlid, DateTime dateadded) public static MusicAlbum Create(Guid urlid, DateTime dateadded)
{ {
return new MusicAlbum(urlid, dateadded); return new MusicAlbum(urlid, dateadded);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * 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; } [ForeignKey("Track_Tracks_Id")]
public virtual ICollection<Track> Tracks { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Track> Tracks { get; protected set; } }
}
} }

View File

@ -1,202 +1,187 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class MusicAlbumMetadata: global::Jellyfin.Data.Entities.Metadata public partial class MusicAlbumMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected MusicAlbumMetadata(): base() protected MusicAlbumMetadata()
{ {
Labels = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); Labels = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static MusicAlbumMetadata CreateMusicAlbumMetadataUnsafe() public static MusicAlbumMetadata CreateMusicAlbumMetadataUnsafe()
{ {
return new MusicAlbumMetadata(); return new MusicAlbumMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_musicalbum0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0)); if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
_musicalbum0.MusicAlbumMetadata.Add(this); _musicalbum0.MusicAlbumMetadata.Add(this);
this.Labels = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); this.Labels = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_musicalbum0"></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); return new MusicAlbumMetadata(title, language, dateadded, datemodified, _musicalbum0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Barcode /// Backing field for Barcode
/// </summary> /// </summary>
protected string _Barcode; protected string _Barcode;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Barcode to be changed before setting. /// When provided in a partial class, allows value of Barcode to be changed before setting.
/// </summary> /// </summary>
partial void SetBarcode(string oldValue, ref string newValue); partial void SetBarcode(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Barcode to be changed before returning. /// When provided in a partial class, allows value of Barcode to be changed before returning.
/// </summary> /// </summary>
partial void GetBarcode(ref string result); partial void GetBarcode(ref string result);
/// <summary> /// <summary>
/// Max length = 255 /// Max length = 255
/// </summary> /// </summary>
[MaxLength(255)] [MaxLength(255)]
[StringLength(255)] [StringLength(255)]
public string Barcode public string Barcode
{ {
get get
{
string value = _Barcode;
GetBarcode(ref value);
return (_Barcode = value);
}
set
{
string oldValue = _Barcode;
SetBarcode(oldValue, ref value);
if (oldValue != value)
{ {
_Barcode = value; string value = _Barcode;
GetBarcode(ref value);
return (_Barcode = value);
} }
} set
}
/// <summary>
/// Backing field for LabelNumber
/// </summary>
protected string _LabelNumber;
/// <summary>
/// When provided in a partial class, allows value of LabelNumber to be changed before setting.
/// </summary>
partial void SetLabelNumber(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of LabelNumber to be changed before returning.
/// </summary>
partial void GetLabelNumber(ref string result);
/// <summary>
/// Max length = 255
/// </summary>
[MaxLength(255)]
[StringLength(255)]
public string LabelNumber
{
get
{
string value = _LabelNumber;
GetLabelNumber(ref value);
return (_LabelNumber = value);
}
set
{
string oldValue = _LabelNumber;
SetLabelNumber(oldValue, ref value);
if (oldValue != value)
{ {
_LabelNumber = value; string oldValue = _Barcode;
SetBarcode(oldValue, ref value);
if (oldValue != value)
{
_Barcode = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Country /// Backing field for LabelNumber
/// </summary> /// </summary>
protected string _Country; protected string _LabelNumber;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting. /// When provided in a partial class, allows value of LabelNumber to be changed before setting.
/// </summary> /// </summary>
partial void SetCountry(string oldValue, ref string newValue); partial void SetLabelNumber(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning. /// When provided in a partial class, allows value of LabelNumber to be changed before returning.
/// </summary> /// </summary>
partial void GetCountry(ref string result); partial void GetLabelNumber(ref string result);
/// <summary> /// <summary>
/// Max length = 2 /// Max length = 255
/// </summary> /// </summary>
[MaxLength(2)] [MaxLength(255)]
[StringLength(2)] [StringLength(255)]
public string Country public string LabelNumber
{ {
get get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{ {
_Country = value; string value = _LabelNumber;
GetLabelNumber(ref value);
return (_LabelNumber = value);
} }
} set
} {
string oldValue = _LabelNumber;
SetLabelNumber(oldValue, ref value);
if (oldValue != value)
{
_LabelNumber = value;
}
}
}
/************************************************************************* /// <summary>
* Navigation properties /// Backing field for Country
*************************************************************************/ /// </summary>
protected string _Country;
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting.
/// </summary>
partial void SetCountry(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning.
/// </summary>
partial void GetCountry(ref string result);
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Labels { get; protected set; } /// <summary>
/// Max length = 2
/// </summary>
[MaxLength(2)]
[StringLength(2)]
public string Country
{
get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{
_Country = value;
}
}
}
} /*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("Company_Labels_Id")]
public virtual ICollection<Company> Labels { get; protected set; }
}
} }

View File

@ -1,152 +1,144 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel; using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Permission public partial class Permission
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Permission() protected Permission()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Permission CreatePermissionUnsafe() public static Permission CreatePermissionUnsafe()
{ {
return new Permission(); return new Permission();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="value"></param> /// <param name="value"></param>
/// <param name="_user0"></param> /// <param name="_user0"></param>
/// <param name="_group1"></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; this.Kind = kind;
this.Value = value; this.Value = value;
if (_user0 == null) throw new ArgumentNullException(nameof(_user0)); if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
_user0.Permissions.Add(this); _user0.Permissions.Add(this);
if (_group1 == null) throw new ArgumentNullException(nameof(_group1)); if (_group1 == null) throw new ArgumentNullException(nameof(_group1));
_group1.GroupPermissions.Add(this); _group1.GroupPermissions.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="value"></param> /// <param name="value"></param>
/// <param name="_user0"></param> /// <param name="_user0"></param>
/// <param name="_group1"></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); return new Permission(kind, value, _user0, _group1);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id { get; protected set; } [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary> /// <summary>
/// Backing field for Kind /// Backing field for Kind
/// </summary> /// </summary>
protected global::Jellyfin.Data.Enums.PermissionKind _Kind; protected Enums.PermissionKind _Kind;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Kind to be changed before setting. /// When provided in a partial class, allows value of Kind to be changed before setting.
/// </summary> /// </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> /// <summary>
/// When provided in a partial class, allows value of Kind to be changed before returning. /// When provided in a partial class, allows value of Kind to be changed before returning.
/// </summary> /// </summary>
partial void GetKind(ref global::Jellyfin.Data.Enums.PermissionKind result); partial void GetKind(ref Enums.PermissionKind result);
/// <summary> /// <summary>
/// Required /// Required
/// </summary> /// </summary>
[Required] [Required]
public global::Jellyfin.Data.Enums.PermissionKind Kind public Enums.PermissionKind Kind
{ {
get get
{
global::Jellyfin.Data.Enums.PermissionKind value = _Kind;
GetKind(ref value);
return (_Kind = value);
}
set
{
global::Jellyfin.Data.Enums.PermissionKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{ {
_Kind = value; Enums.PermissionKind value = _Kind;
OnPropertyChanged(); GetKind(ref value);
return (_Kind = value);
} }
} set
} {
Enums.PermissionKind oldValue = _Kind;
SetKind(oldValue, ref value);
if (oldValue != value)
{
_Kind = value;
OnPropertyChanged();
}
}
}
/// <summary> /// <summary>
/// Required /// Required
/// </summary> /// </summary>
[Required] [Required]
public bool Value { get; set; } public bool Value { get; set; }
/// <summary> /// <summary>
/// Concurrency token /// Required, ConcurrenyToken
/// </summary> /// </summary>
[Timestamp] [ConcurrencyCheck]
public Byte[] Timestamp { get; set; } [Required]
public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ RowVersion++;
}
public virtual event PropertyChangedEventHandler PropertyChanged; /*************************************************************************
* Navigation properties
*************************************************************************/
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) public virtual event PropertyChangedEventHandler PropertyChanged;
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
} protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
} }

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,312 +1,302 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Person public partial class Person
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Person() protected Person()
{ {
Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>(); Sources = new HashSet<MetadataProviderId>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Person CreatePersonUnsafe() public static Person CreatePersonUnsafe()
{ {
return new Person(); return new Person();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid"></param> /// <param name="urlid"></param>
/// <param name="name"></param> /// <param name="name"></param>
public Person(Guid urlid, string name, DateTime dateadded, DateTime datemodified) public Person(Guid urlid, string name, DateTime dateadded, DateTime datemodified)
{ {
this.UrlId = urlid; this.UrlId = urlid;
if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name)); if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name; this.Name = name;
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>(); this.Sources = new HashSet<MetadataProviderId>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid"></param> /// <param name="urlid"></param>
/// <param name="name"></param> /// <param name="name"></param>
public static Person Create(Guid urlid, string name, DateTime dateadded, DateTime datemodified) public static Person Create(Guid urlid, string name, DateTime dateadded, DateTime datemodified)
{ {
return new Person(urlid, name, dateadded, datemodified); return new Person(urlid, name, dateadded, datemodified);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for UrlId
/// </summary>
protected Guid _UrlId;
/// <summary>
/// When provided in a partial class, allows value of UrlId to be changed before setting.
/// </summary>
partial void SetUrlId(Guid oldValue, ref Guid newValue);
/// <summary>
/// When provided in a partial class, allows value of UrlId to be changed before returning.
/// </summary>
partial void GetUrlId(ref Guid result);
/// <summary>
/// Required
/// </summary>
[Required]
public Guid UrlId
{
get
{
Guid value = _UrlId;
GetUrlId(ref value);
return (_UrlId = value);
}
set
{
Guid oldValue = _UrlId;
SetUrlId(oldValue, ref value);
if (oldValue != value)
{ {
_UrlId = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Name /// Backing field for UrlId
/// </summary> /// </summary>
protected string _Name; protected Guid _UrlId;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting. /// When provided in a partial class, allows value of UrlId to be changed before setting.
/// </summary> /// </summary>
partial void SetName(string oldValue, ref string newValue); partial void SetUrlId(Guid oldValue, ref Guid newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning. /// When provided in a partial class, allows value of UrlId to be changed before returning.
/// </summary> /// </summary>
partial void GetName(ref string result); partial void GetUrlId(ref Guid result);
/// <summary> /// <summary>
/// Required, Max length = 1024 /// Required
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(1024)] public Guid UrlId
[StringLength(1024)] {
public string Name get
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; Guid value = _UrlId;
GetUrlId(ref value);
return (_UrlId = value);
} }
} set
}
/// <summary>
/// Backing field for SourceId
/// </summary>
protected string _SourceId;
/// <summary>
/// When provided in a partial class, allows value of SourceId to be changed before setting.
/// </summary>
partial void SetSourceId(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of SourceId to be changed before returning.
/// </summary>
partial void GetSourceId(ref string result);
/// <summary>
/// Max length = 255
/// </summary>
[MaxLength(255)]
[StringLength(255)]
public string SourceId
{
get
{
string value = _SourceId;
GetSourceId(ref value);
return (_SourceId = value);
}
set
{
string oldValue = _SourceId;
SetSourceId(oldValue, ref value);
if (oldValue != value)
{ {
_SourceId = value; Guid oldValue = _UrlId;
SetUrlId(oldValue, ref value);
if (oldValue != value)
{
_UrlId = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for DateAdded /// Backing field for Name
/// </summary> /// </summary>
protected DateTime _DateAdded; protected string _Name;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before setting. /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary> /// </summary>
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue); partial void SetName(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before returning. /// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary> /// </summary>
partial void GetDateAdded(ref DateTime result); partial void GetName(ref string result);
/// <summary> /// <summary>
/// Required /// Required, Max length = 1024
/// </summary> /// </summary>
[Required] [Required]
public DateTime DateAdded [MaxLength(1024)]
{ [StringLength(1024)]
get public string Name
{ {
DateTime value = _DateAdded; get
GetDateAdded(ref value);
return (_DateAdded = value);
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{ {
_DateAdded = value; string value = _Name;
GetName(ref value);
return (_Name = value);
} }
} set
}
/// <summary>
/// Backing field for DateModified
/// </summary>
protected DateTime _DateModified;
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before setting.
/// </summary>
partial void SetDateModified(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before returning.
/// </summary>
partial void GetDateModified(ref DateTime result);
/// <summary>
/// Required
/// </summary>
[Required]
public DateTime DateModified
{
get
{
DateTime value = _DateModified;
GetDateModified(ref value);
return (_DateModified = value);
}
internal set
{
DateTime oldValue = _DateModified;
SetDateModified(oldValue, ref value);
if (oldValue != value)
{ {
_DateModified = value; string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for SourceId
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _SourceId;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of SourceId to be changed before setting.
/// </summary>
partial void SetSourceId(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of SourceId to be changed before returning.
/// </summary>
partial void GetSourceId(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Max length = 255
*************************************************************************/ /// </summary>
[MaxLength(255)]
[StringLength(255)]
public string SourceId
{
get
{
string value = _SourceId;
GetSourceId(ref value);
return (_SourceId = value);
}
set
{
string oldValue = _SourceId;
SetSourceId(oldValue, ref value);
if (oldValue != value)
{
_SourceId = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; } /// <summary>
/// Backing field for DateAdded
/// </summary>
protected DateTime _DateAdded;
/// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before setting.
/// </summary>
partial void SetDateAdded(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateAdded to be changed before returning.
/// </summary>
partial void GetDateAdded(ref DateTime result);
} /// <summary>
/// Required
/// </summary>
[Required]
public DateTime DateAdded
{
get
{
DateTime value = _DateAdded;
GetDateAdded(ref value);
return (_DateAdded = value);
}
internal set
{
DateTime oldValue = _DateAdded;
SetDateAdded(oldValue, ref value);
if (oldValue != value)
{
_DateAdded = value;
}
}
}
/// <summary>
/// Backing field for DateModified
/// </summary>
protected DateTime _DateModified;
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before setting.
/// </summary>
partial void SetDateModified(DateTime oldValue, ref DateTime newValue);
/// <summary>
/// When provided in a partial class, allows value of DateModified to be changed before returning.
/// </summary>
partial void GetDateModified(ref DateTime result);
/// <summary>
/// Required
/// </summary>
[Required]
public DateTime DateModified
{
get
{
DateTime value = _DateModified;
GetDateModified(ref value);
return (_DateModified = value);
}
internal set
{
DateTime oldValue = _DateModified;
SetDateModified(oldValue, ref value);
if (oldValue != value)
{
_DateModified = value;
}
}
}
/// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("MetadataProviderId_Sources_Id")]
public virtual ICollection<MetadataProviderId> Sources { get; protected set; }
}
} }

View File

@ -1,215 +1,209 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class PersonRole public partial class PersonRole
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected PersonRole() protected PersonRole()
{ {
// NOTE: This class has one-to-one associations with PersonRole. // 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. // 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(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static PersonRole CreatePersonRoleUnsafe() public static PersonRole CreatePersonRoleUnsafe()
{ {
return new PersonRole(); return new PersonRole();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="type"></param> /// <param name="type"></param>
/// <param name="_metadata0"></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. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
this.Type = type; this.Type = type;
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0)); if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
_metadata0.PersonRoles.Add(this); _metadata0.PersonRoles.Add(this);
this.Sources = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MetadataProviderId>(); this.Sources = new HashSet<MetadataProviderId>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="type"></param> /// <param name="type"></param>
/// <param name="_metadata0"></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); return new PersonRole(type, _metadata0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Role
/// </summary>
protected string _Role;
/// <summary>
/// When provided in a partial class, allows value of Role to be changed before setting.
/// </summary>
partial void SetRole(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Role to be changed before returning.
/// </summary>
partial void GetRole(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Role
{
get
{
string value = _Role;
GetRole(ref value);
return (_Role = value);
}
set
{
string oldValue = _Role;
SetRole(oldValue, ref value);
if (oldValue != value)
{ {
_Role = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Type /// Backing field for Role
/// </summary> /// </summary>
protected global::Jellyfin.Data.Enums.PersonRoleType _Type; protected string _Role;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Type to be changed before setting. /// When provided in a partial class, allows value of Role to be changed before setting.
/// </summary> /// </summary>
partial void SetType(global::Jellyfin.Data.Enums.PersonRoleType oldValue, ref global::Jellyfin.Data.Enums.PersonRoleType newValue); partial void SetRole(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Type to be changed before returning. /// When provided in a partial class, allows value of Role to be changed before returning.
/// </summary> /// </summary>
partial void GetType(ref global::Jellyfin.Data.Enums.PersonRoleType result); partial void GetRole(ref string result);
/// <summary> /// <summary>
/// Required /// Max length = 1024
/// </summary> /// </summary>
[Required] [MaxLength(1024)]
public global::Jellyfin.Data.Enums.PersonRoleType Type [StringLength(1024)]
{ public string Role
get {
{ get
global::Jellyfin.Data.Enums.PersonRoleType value = _Type;
GetType(ref value);
return (_Type = value);
}
set
{
global::Jellyfin.Data.Enums.PersonRoleType oldValue = _Type;
SetType(oldValue, ref value);
if (oldValue != value)
{ {
_Type = value; string value = _Role;
GetRole(ref value);
return (_Role = value);
} }
} set
} {
string oldValue = _Role;
SetRole(oldValue, ref value);
if (oldValue != value)
{
_Role = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for Type
/// </summary> /// </summary>
[ConcurrencyCheck] protected Enums.PersonRoleType _Type;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Type to be changed before setting.
/// </summary>
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 Enums.PersonRoleType result);
/************************************************************************* /// <summary>
* Navigation properties /// Required
*************************************************************************/ /// </summary>
[Required]
public Enums.PersonRoleType Type
{
get
{
Enums.PersonRoleType value = _Type;
GetType(ref value);
return (_Type = value);
}
set
{
Enums.PersonRoleType oldValue = _Type;
SetType(oldValue, ref value);
if (oldValue != value)
{
_Type = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Required, ConcurrenyToken
/// </summary> /// </summary>
public virtual global::Jellyfin.Data.Entities.Person Person { get; set; } [ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public virtual global::Jellyfin.Data.Entities.Artwork Artwork { get; set; } public void OnSavingChanges()
{
RowVersion++;
}
public virtual ICollection<global::Jellyfin.Data.Entities.MetadataProviderId> Sources { get; protected set; } /*************************************************************************
* Navigation properties
*************************************************************************/
} /// <summary>
/// Required
/// </summary>
[ForeignKey("Person_Id")]
public virtual Person Person { get; 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,84 +1,68 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Photo: global::Jellyfin.Data.Entities.LibraryItem public partial class Photo : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Photo(): base() protected Photo()
{ {
PhotoMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PhotoMetadata>(); PhotoMetadata = new HashSet<PhotoMetadata>();
Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); Releases = new HashSet<Release>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Photo CreatePhotoUnsafe() public static Photo CreatePhotoUnsafe()
{ {
return new Photo(); return new Photo();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public Photo(Guid urlid, DateTime dateadded) public Photo(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
this.PhotoMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.PhotoMetadata>(); this.PhotoMetadata = new HashSet<PhotoMetadata>();
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); this.Releases = new HashSet<Release>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public static Photo Create(Guid urlid, DateTime dateadded) public static Photo Create(Guid urlid, DateTime dateadded)
{ {
return new Photo(urlid, dateadded); return new Photo(urlid, dateadded);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * 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; } [ForeignKey("Release_Releases_Id")]
public virtual ICollection<Release> Releases { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Release> Releases { get; protected set; } }
}
} }

View File

@ -1,86 +1,68 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class PhotoMetadata: global::Jellyfin.Data.Entities.Metadata public partial class PhotoMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected PhotoMetadata(): base() protected PhotoMetadata()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static PhotoMetadata CreatePhotoMetadataUnsafe() public static PhotoMetadata CreatePhotoMetadataUnsafe()
{ {
return new PhotoMetadata(); return new PhotoMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_photo0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_photo0 == null) throw new ArgumentNullException(nameof(_photo0)); if (_photo0 == null) throw new ArgumentNullException(nameof(_photo0));
_photo0.PhotoMetadata.Add(this); _photo0.PhotoMetadata.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_photo0"></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); return new PhotoMetadata(title, language, dateadded, datemodified, _photo0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * Navigation properties
*************************************************************************/ *************************************************************************/
} }
} }

View File

@ -1,117 +1,107 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Preference public partial class Preference
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Preference() protected Preference()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Preference CreatePreferenceUnsafe() public static Preference CreatePreferenceUnsafe()
{ {
return new Preference(); return new Preference();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="value"></param> /// <param name="value"></param>
/// <param name="_user0"></param> /// <param name="_user0"></param>
/// <param name="_group1"></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; this.Kind = kind;
if (string.IsNullOrEmpty(value)) throw new ArgumentNullException(nameof(value)); if (string.IsNullOrEmpty(value)) throw new ArgumentNullException(nameof(value));
this.Value = value; this.Value = value;
if (_user0 == null) throw new ArgumentNullException(nameof(_user0)); if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
_user0.Preferences.Add(this); _user0.Preferences.Add(this);
if (_group1 == null) throw new ArgumentNullException(nameof(_group1)); if (_group1 == null) throw new ArgumentNullException(nameof(_group1));
_group1.Preferences.Add(this); _group1.Preferences.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="kind"></param> /// <param name="kind"></param>
/// <param name="value"></param> /// <param name="value"></param>
/// <param name="_user0"></param> /// <param name="_user0"></param>
/// <param name="_group1"></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); return new Preference(kind, value, _user0, _group1);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id { get; protected set; } [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary> /// <summary>
/// Required /// Required
/// </summary> /// </summary>
[Required] [Required]
public global::Jellyfin.Data.Enums.PreferenceKind Kind { get; set; } public Enums.PreferenceKind Kind { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 65535 /// Required, Max length = 65535
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(65535)] [MaxLength(65535)]
[StringLength(65535)] [StringLength(65535)]
public string Value { get; set; } public string Value { get; set; }
/// <summary> /// <summary>
/// Concurrency token /// Required, ConcurrenyToken
/// </summary> /// </summary>
[Timestamp] [ConcurrencyCheck]
public Byte[] Timestamp { get; set; } [Required]
public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ 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,133 +1,123 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class ProviderMapping public partial class ProviderMapping
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected ProviderMapping() protected ProviderMapping()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static ProviderMapping CreateProviderMappingUnsafe() public static ProviderMapping CreateProviderMappingUnsafe()
{ {
return new ProviderMapping(); return new ProviderMapping();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="providername"></param> /// <param name="providername"></param>
/// <param name="providersecrets"></param> /// <param name="providersecrets"></param>
/// <param name="providerdata"></param> /// <param name="providerdata"></param>
/// <param name="_user0"></param> /// <param name="_user0"></param>
/// <param name="_group1"></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)); if (string.IsNullOrEmpty(providername)) throw new ArgumentNullException(nameof(providername));
this.ProviderName = providername; this.ProviderName = providername;
if (string.IsNullOrEmpty(providersecrets)) throw new ArgumentNullException(nameof(providersecrets)); if (string.IsNullOrEmpty(providersecrets)) throw new ArgumentNullException(nameof(providersecrets));
this.ProviderSecrets = providersecrets; this.ProviderSecrets = providersecrets;
if (string.IsNullOrEmpty(providerdata)) throw new ArgumentNullException(nameof(providerdata)); if (string.IsNullOrEmpty(providerdata)) throw new ArgumentNullException(nameof(providerdata));
this.ProviderData = providerdata; this.ProviderData = providerdata;
if (_user0 == null) throw new ArgumentNullException(nameof(_user0)); if (_user0 == null) throw new ArgumentNullException(nameof(_user0));
_user0.ProviderMappings.Add(this); _user0.ProviderMappings.Add(this);
if (_group1 == null) throw new ArgumentNullException(nameof(_group1)); if (_group1 == null) throw new ArgumentNullException(nameof(_group1));
_group1.ProviderMappings.Add(this); _group1.ProviderMappings.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="providername"></param> /// <param name="providername"></param>
/// <param name="providersecrets"></param> /// <param name="providersecrets"></param>
/// <param name="providerdata"></param> /// <param name="providerdata"></param>
/// <param name="_user0"></param> /// <param name="_user0"></param>
/// <param name="_group1"></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); return new ProviderMapping(providername, providersecrets, providerdata, _user0, _group1);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id { get; protected set; } [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary> /// <summary>
/// Required, Max length = 255 /// Required, Max length = 255
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(255)] [MaxLength(255)]
[StringLength(255)] [StringLength(255)]
public string ProviderName { get; set; } public string ProviderName { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 65535 /// Required, Max length = 65535
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(65535)] [MaxLength(65535)]
[StringLength(65535)] [StringLength(65535)]
public string ProviderSecrets { get; set; } public string ProviderSecrets { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 65535 /// Required, Max length = 65535
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(65535)] [MaxLength(65535)]
[StringLength(65535)] [StringLength(65535)]
public string ProviderData { get; set; } public string ProviderData { get; set; }
/// <summary> /// <summary>
/// Concurrency token /// Required, ConcurrenyToken
/// </summary> /// </summary>
[Timestamp] [ConcurrencyCheck]
public Byte[] Timestamp { get; set; } [Required]
public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ RowVersion++;
}
} /*************************************************************************
* Navigation properties
*************************************************************************/
}
} }

View File

@ -1,197 +1,187 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Rating public partial class Rating
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Rating() protected Rating()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Rating CreateRatingUnsafe() public static Rating CreateRatingUnsafe()
{ {
return new Rating(); return new Rating();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="value"></param> /// <param name="value"></param>
/// <param name="_metadata0"></param> /// <param name="_metadata0"></param>
public Rating(double value, global::Jellyfin.Data.Entities.Metadata _metadata0) public Rating(double value, Metadata _metadata0)
{ {
this.Value = value; this.Value = value;
if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0)); if (_metadata0 == null) throw new ArgumentNullException(nameof(_metadata0));
_metadata0.Ratings.Add(this); _metadata0.Ratings.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="value"></param> /// <param name="value"></param>
/// <param name="_metadata0"></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); return new Rating(value, _metadata0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Value
/// </summary>
protected double _Value;
/// <summary>
/// When provided in a partial class, allows value of Value to be changed before setting.
/// </summary>
partial void SetValue(double oldValue, ref double newValue);
/// <summary>
/// When provided in a partial class, allows value of Value to be changed before returning.
/// </summary>
partial void GetValue(ref double result);
/// <summary>
/// Required
/// </summary>
[Required]
public double Value
{
get
{
double value = _Value;
GetValue(ref value);
return (_Value = value);
}
set
{
double oldValue = _Value;
SetValue(oldValue, ref value);
if (oldValue != value)
{ {
_Value = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Votes /// Backing field for Value
/// </summary> /// </summary>
protected int? _Votes; protected double _Value;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Votes to be changed before setting. /// When provided in a partial class, allows value of Value to be changed before setting.
/// </summary> /// </summary>
partial void SetVotes(int? oldValue, ref int? newValue); partial void SetValue(double oldValue, ref double newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Votes to be changed before returning. /// When provided in a partial class, allows value of Value to be changed before returning.
/// </summary> /// </summary>
partial void GetVotes(ref int? result); partial void GetValue(ref double result);
public int? Votes /// <summary>
{ /// Required
get /// </summary>
{ [Required]
int? value = _Votes; public double Value
GetVotes(ref value); {
return (_Votes = value); get
}
set
{
int? oldValue = _Votes;
SetVotes(oldValue, ref value);
if (oldValue != value)
{ {
_Votes = value; double value = _Value;
GetValue(ref value);
return (_Value = value);
} }
} set
} {
double oldValue = _Value;
SetValue(oldValue, ref value);
if (oldValue != value)
{
_Value = value;
}
}
}
/// <summary> /// <summary>
/// Required /// Backing field for Votes
/// </summary> /// </summary>
[ConcurrencyCheck] protected int? _Votes;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Votes to be changed before setting.
/// </summary>
partial void SetVotes(int? oldValue, ref int? newValue);
/// <summary>
/// When provided in a partial class, allows value of Votes to be changed before returning.
/// </summary>
partial void GetVotes(ref int? result);
/************************************************************************* public int? Votes
* Navigation properties {
*************************************************************************/ get
{
int? value = _Votes;
GetVotes(ref value);
return (_Votes = value);
}
set
{
int? oldValue = _Votes;
SetVotes(oldValue, ref value);
if (oldValue != value)
{
_Votes = value;
}
}
}
/// <summary> /// <summary>
/// If this is NULL it&apos;s the internal user rating. /// Required, ConcurrenyToken
/// </summary> /// </summary>
public virtual global::Jellyfin.Data.Entities.RatingSource RatingType { get; set; } [ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
} public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
/// <summary>
/// If this is NULL it&apos;s the internal user rating.
/// </summary>
[ForeignKey("RatingSource_RatingType_Id")]
public virtual RatingSource RatingType { get; set; }
}
} }

View File

@ -1,242 +1,231 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
/// <summary> /// <summary>
/// This is the entity to store review ratings, not age ratings /// This is the entity to store review ratings, not age ratings
/// </summary> /// </summary>
public partial class RatingSource public partial class RatingSource
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected RatingSource() protected RatingSource()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static RatingSource CreateRatingSourceUnsafe() public static RatingSource CreateRatingSourceUnsafe()
{ {
return new RatingSource(); return new RatingSource();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="maximumvalue"></param> /// <param name="maximumvalue"></param>
/// <param name="minimumvalue"></param> /// <param name="minimumvalue"></param>
/// <param name="_rating0"></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; this.MaximumValue = maximumvalue;
this.MinimumValue = minimumvalue; this.MinimumValue = minimumvalue;
if (_rating0 == null) throw new ArgumentNullException(nameof(_rating0)); if (_rating0 == null) throw new ArgumentNullException(nameof(_rating0));
_rating0.RatingType = this; _rating0.RatingType = this;
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="maximumvalue"></param> /// <param name="maximumvalue"></param>
/// <param name="minimumvalue"></param> /// <param name="minimumvalue"></param>
/// <param name="_rating0"></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); return new RatingSource(maximumvalue, minimumvalue, _rating0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
protected string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for MaximumValue /// Backing field for Name
/// </summary> /// </summary>
protected double _MaximumValue; protected string _Name;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of MaximumValue to be changed before setting. /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary> /// </summary>
partial void SetMaximumValue(double oldValue, ref double newValue); partial void SetName(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of MaximumValue to be changed before returning. /// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary> /// </summary>
partial void GetMaximumValue(ref double result); partial void GetName(ref string result);
/// <summary> /// <summary>
/// Required /// Max length = 1024
/// </summary> /// </summary>
[Required] [MaxLength(1024)]
public double MaximumValue [StringLength(1024)]
{ public string Name
get {
{ get
double value = _MaximumValue;
GetMaximumValue(ref value);
return (_MaximumValue = value);
}
set
{
double oldValue = _MaximumValue;
SetMaximumValue(oldValue, ref value);
if (oldValue != value)
{ {
_MaximumValue = value; string value = _Name;
GetName(ref value);
return (_Name = value);
} }
} set
}
/// <summary>
/// Backing field for MinimumValue
/// </summary>
protected double _MinimumValue;
/// <summary>
/// When provided in a partial class, allows value of MinimumValue to be changed before setting.
/// </summary>
partial void SetMinimumValue(double oldValue, ref double newValue);
/// <summary>
/// When provided in a partial class, allows value of MinimumValue to be changed before returning.
/// </summary>
partial void GetMinimumValue(ref double result);
/// <summary>
/// Required
/// </summary>
[Required]
public double MinimumValue
{
get
{
double value = _MinimumValue;
GetMinimumValue(ref value);
return (_MinimumValue = value);
}
set
{
double oldValue = _MinimumValue;
SetMinimumValue(oldValue, ref value);
if (oldValue != value)
{ {
_MinimumValue = value; string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for MaximumValue
/// </summary> /// </summary>
[ConcurrencyCheck] protected double _MaximumValue;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of MaximumValue to be changed before setting.
/// </summary>
partial void SetMaximumValue(double oldValue, ref double newValue);
/// <summary>
/// When provided in a partial class, allows value of MaximumValue to be changed before returning.
/// </summary>
partial void GetMaximumValue(ref double result);
/************************************************************************* /// <summary>
* Navigation properties /// Required
*************************************************************************/ /// </summary>
[Required]
public double MaximumValue
{
get
{
double value = _MaximumValue;
GetMaximumValue(ref value);
return (_MaximumValue = value);
}
set
{
double oldValue = _MaximumValue;
SetMaximumValue(oldValue, ref value);
if (oldValue != value)
{
_MaximumValue = value;
}
}
}
public virtual global::Jellyfin.Data.Entities.MetadataProviderId Source { get; set; } /// <summary>
/// Backing field for MinimumValue
/// </summary>
protected double _MinimumValue;
/// <summary>
/// When provided in a partial class, allows value of MinimumValue to be changed before setting.
/// </summary>
partial void SetMinimumValue(double oldValue, ref double newValue);
/// <summary>
/// When provided in a partial class, allows value of MinimumValue to be changed before returning.
/// </summary>
partial void GetMinimumValue(ref double result);
} /// <summary>
/// Required
/// </summary>
[Required]
public double MinimumValue
{
get
{
double value = _MinimumValue;
GetMinimumValue(ref value);
return (_MinimumValue = value);
}
set
{
double oldValue = _MinimumValue;
SetMinimumValue(oldValue, ref value);
if (oldValue != value)
{
_MinimumValue = value;
}
}
}
/// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public void OnSavingChanges()
{
RowVersion++;
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("MetadataProviderId_Source_Id")]
public virtual MetadataProviderId Source { get; set; }
}
} }

View File

@ -1,197 +1,188 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Release public partial class Release
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Release() protected Release()
{ {
MediaFiles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFile>(); MediaFiles = new HashSet<MediaFile>();
Chapters = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Chapter>(); Chapters = new HashSet<Chapter>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Release CreateReleaseUnsafe() public static Release CreateReleaseUnsafe()
{ {
return new Release(); return new Release();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="_movie0"></param> /// <param name="_movie0"></param>
/// <param name="_episode1"></param> /// <param name="_episode1"></param>
/// <param name="_track2"></param> /// <param name="_track2"></param>
/// <param name="_customitem3"></param> /// <param name="_customitem3"></param>
/// <param name="_book4"></param> /// <param name="_book4"></param>
/// <param name="_photo5"></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)); if (string.IsNullOrEmpty(name)) throw new ArgumentNullException(nameof(name));
this.Name = name; this.Name = name;
if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0)); if (_movie0 == null) throw new ArgumentNullException(nameof(_movie0));
_movie0.Releases.Add(this); _movie0.Releases.Add(this);
if (_episode1 == null) throw new ArgumentNullException(nameof(_episode1)); if (_episode1 == null) throw new ArgumentNullException(nameof(_episode1));
_episode1.Releases.Add(this); _episode1.Releases.Add(this);
if (_track2 == null) throw new ArgumentNullException(nameof(_track2)); if (_track2 == null) throw new ArgumentNullException(nameof(_track2));
_track2.Releases.Add(this); _track2.Releases.Add(this);
if (_customitem3 == null) throw new ArgumentNullException(nameof(_customitem3)); if (_customitem3 == null) throw new ArgumentNullException(nameof(_customitem3));
_customitem3.Releases.Add(this); _customitem3.Releases.Add(this);
if (_book4 == null) throw new ArgumentNullException(nameof(_book4)); if (_book4 == null) throw new ArgumentNullException(nameof(_book4));
_book4.Releases.Add(this); _book4.Releases.Add(this);
if (_photo5 == null) throw new ArgumentNullException(nameof(_photo5)); if (_photo5 == null) throw new ArgumentNullException(nameof(_photo5));
_photo5.Releases.Add(this); _photo5.Releases.Add(this);
this.MediaFiles = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.MediaFile>(); this.MediaFiles = new HashSet<MediaFile>();
this.Chapters = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Chapter>(); this.Chapters = new HashSet<Chapter>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="name"></param> /// <param name="name"></param>
/// <param name="_movie0"></param> /// <param name="_movie0"></param>
/// <param name="_episode1"></param> /// <param name="_episode1"></param>
/// <param name="_track2"></param> /// <param name="_track2"></param>
/// <param name="_customitem3"></param> /// <param name="_customitem3"></param>
/// <param name="_book4"></param> /// <param name="_book4"></param>
/// <param name="_photo5"></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); return new Release(name, _movie0, _episode1, _track2, _customitem3, _book4, _photo5);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Id /// Backing field for Id
/// </summary> /// </summary>
internal int _Id; internal int _Id;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before setting. /// When provided in a partial class, allows value of Id to be changed before setting.
/// </summary> /// </summary>
partial void SetId(int oldValue, ref int newValue); partial void SetId(int oldValue, ref int newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Id to be changed before returning. /// When provided in a partial class, allows value of Id to be changed before returning.
/// </summary> /// </summary>
partial void GetId(ref int result); partial void GetId(ref int result);
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public int Id [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ public int Id
get {
{ get
int value = _Id;
GetId(ref value);
return (_Id = value);
}
protected set
{
int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{ {
_Id = value; int value = _Id;
GetId(ref value);
return (_Id = value);
} }
} protected set
}
/// <summary>
/// Backing field for Name
/// </summary>
protected string _Name;
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/// <summary>
/// Required, Max length = 1024
/// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{ {
_Name = value; int oldValue = _Id;
SetId(oldValue, ref value);
if (oldValue != value)
{
_Id = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Required /// Backing field for Name
/// </summary> /// </summary>
[ConcurrencyCheck] protected string _Name;
[Required] /// <summary>
public byte[] Timestamp { get; set; } /// When provided in a partial class, allows value of Name to be changed before setting.
/// </summary>
partial void SetName(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Name to be changed before returning.
/// </summary>
partial void GetName(ref string result);
/************************************************************************* /// <summary>
* Navigation properties /// Required, Max length = 1024
*************************************************************************/ /// </summary>
[Required]
[MaxLength(1024)]
[StringLength(1024)]
public string Name
{
get
{
string value = _Name;
GetName(ref value);
return (_Name = value);
}
set
{
string oldValue = _Name;
SetName(oldValue, ref value);
if (oldValue != value)
{
_Name = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.MediaFile> MediaFiles { get; protected set; } /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Chapter> Chapters { get; protected set; } public void OnSavingChanges()
{
RowVersion++;
}
} /*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("MediaFile_MediaFiles_Id")]
public virtual ICollection<MediaFile> MediaFiles { get; protected set; }
[ForeignKey("Chapter_Chapters_Id")]
public virtual ICollection<Chapter> Chapters { get; protected set; }
}
} }

View File

@ -1,127 +1,111 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Season: global::Jellyfin.Data.Entities.LibraryItem public partial class Season : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Season(): base() protected Season()
{ {
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem. // 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. // 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>(); SeasonMetadata = new HashSet<SeasonMetadata>();
Episodes = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Episode>(); Episodes = new HashSet<Episode>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Season CreateSeasonUnsafe() public static Season CreateSeasonUnsafe()
{ {
return new Season(); return new Season();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <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> /// <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. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
this.UrlId = urlid; this.UrlId = urlid;
if (_series0 == null) throw new ArgumentNullException(nameof(_series0)); if (_series0 == null) throw new ArgumentNullException(nameof(_series0));
_series0.Seasons.Add(this); _series0.Seasons.Add(this);
this.SeasonMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeasonMetadata>(); this.SeasonMetadata = new HashSet<SeasonMetadata>();
this.Episodes = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Episode>(); this.Episodes = new HashSet<Episode>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <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> /// <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); return new Season(urlid, dateadded, _series0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for SeasonNumber /// Backing field for SeasonNumber
/// </summary> /// </summary>
protected int? _SeasonNumber; protected int? _SeasonNumber;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of SeasonNumber to be changed before setting. /// When provided in a partial class, allows value of SeasonNumber to be changed before setting.
/// </summary> /// </summary>
partial void SetSeasonNumber(int? oldValue, ref int? newValue); partial void SetSeasonNumber(int? oldValue, ref int? newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of SeasonNumber to be changed before returning. /// When provided in a partial class, allows value of SeasonNumber to be changed before returning.
/// </summary> /// </summary>
partial void GetSeasonNumber(ref int? result); partial void GetSeasonNumber(ref int? result);
public int? SeasonNumber public int? SeasonNumber
{ {
get get
{
int? value = _SeasonNumber;
GetSeasonNumber(ref value);
return (_SeasonNumber = value);
}
set
{
int? oldValue = _SeasonNumber;
SetSeasonNumber(oldValue, ref value);
if (oldValue != value)
{ {
_SeasonNumber = value; int? value = _SeasonNumber;
GetSeasonNumber(ref value);
return (_SeasonNumber = value);
} }
} set
} {
int? oldValue = _SeasonNumber;
SetSeasonNumber(oldValue, ref value);
if (oldValue != value)
{
_SeasonNumber = value;
}
}
}
/************************************************************************* /*************************************************************************
* Navigation properties * 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; } [ForeignKey("Episode_Episodes_Id")]
public virtual ICollection<Episode> Episodes { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Episode> Episodes { get; protected set; } }
}
} }

View File

@ -1,123 +1,106 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class SeasonMetadata: global::Jellyfin.Data.Entities.Metadata public partial class SeasonMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected SeasonMetadata(): base() protected SeasonMetadata()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static SeasonMetadata CreateSeasonMetadataUnsafe() public static SeasonMetadata CreateSeasonMetadataUnsafe()
{ {
return new SeasonMetadata(); return new SeasonMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_season0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_season0 == null) throw new ArgumentNullException(nameof(_season0)); if (_season0 == null) throw new ArgumentNullException(nameof(_season0));
_season0.SeasonMetadata.Add(this); _season0.SeasonMetadata.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_season0"></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); return new SeasonMetadata(title, language, dateadded, datemodified, _season0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Outline /// Backing field for Outline
/// </summary> /// </summary>
protected string _Outline; protected string _Outline;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before setting. /// When provided in a partial class, allows value of Outline to be changed before setting.
/// </summary> /// </summary>
partial void SetOutline(string oldValue, ref string newValue); partial void SetOutline(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before returning. /// When provided in a partial class, allows value of Outline to be changed before returning.
/// </summary> /// </summary>
partial void GetOutline(ref string result); partial void GetOutline(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 1024
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(1024)]
[StringLength(1024)] [StringLength(1024)]
public string Outline public string Outline
{ {
get get
{
string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
}
set
{
string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{ {
_Outline = value; string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
} }
} set
} {
string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{
_Outline = value;
}
}
}
/************************************************************************* /*************************************************************************
* Navigation properties * Navigation properties
*************************************************************************/ *************************************************************************/
} }
} }

View File

@ -1,183 +1,167 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Series: global::Jellyfin.Data.Entities.LibraryItem public partial class Series : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Series(): base() protected Series()
{ {
SeriesMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeriesMetadata>(); SeriesMetadata = new HashSet<SeriesMetadata>();
Seasons = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Season>(); Seasons = new HashSet<Season>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Series CreateSeriesUnsafe() public static Series CreateSeriesUnsafe()
{ {
return new Series(); return new Series();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public Series(Guid urlid, DateTime dateadded) public Series(Guid urlid, DateTime dateadded)
{ {
this.UrlId = urlid; this.UrlId = urlid;
this.SeriesMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.SeriesMetadata>(); this.SeriesMetadata = new HashSet<SeriesMetadata>();
this.Seasons = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Season>(); this.Seasons = new HashSet<Season>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param>
public static Series Create(Guid urlid, DateTime dateadded) public static Series Create(Guid urlid, DateTime dateadded)
{ {
return new Series(urlid, dateadded); return new Series(urlid, dateadded);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for AirsDayOfWeek /// Backing field for AirsDayOfWeek
/// </summary> /// </summary>
protected global::Jellyfin.Data.Enums.Weekday? _AirsDayOfWeek; protected Enums.Weekday? _AirsDayOfWeek;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of AirsDayOfWeek to be changed before setting. /// When provided in a partial class, allows value of AirsDayOfWeek to be changed before setting.
/// </summary> /// </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> /// <summary>
/// When provided in a partial class, allows value of AirsDayOfWeek to be changed before returning. /// When provided in a partial class, allows value of AirsDayOfWeek to be changed before returning.
/// </summary> /// </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 get
{
global::Jellyfin.Data.Enums.Weekday? value = _AirsDayOfWeek;
GetAirsDayOfWeek(ref value);
return (_AirsDayOfWeek = value);
}
set
{
global::Jellyfin.Data.Enums.Weekday? oldValue = _AirsDayOfWeek;
SetAirsDayOfWeek(oldValue, ref value);
if (oldValue != value)
{ {
_AirsDayOfWeek = value; Enums.Weekday? value = _AirsDayOfWeek;
GetAirsDayOfWeek(ref value);
return (_AirsDayOfWeek = value);
} }
} set
}
/// <summary>
/// Backing field for AirsTime
/// </summary>
protected DateTimeOffset? _AirsTime;
/// <summary>
/// When provided in a partial class, allows value of AirsTime to be changed before setting.
/// </summary>
partial void SetAirsTime(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
/// <summary>
/// When provided in a partial class, allows value of AirsTime to be changed before returning.
/// </summary>
partial void GetAirsTime(ref DateTimeOffset? result);
/// <summary>
/// The time the show airs, ignore the date portion
/// </summary>
public DateTimeOffset? AirsTime
{
get
{
DateTimeOffset? value = _AirsTime;
GetAirsTime(ref value);
return (_AirsTime = value);
}
set
{
DateTimeOffset? oldValue = _AirsTime;
SetAirsTime(oldValue, ref value);
if (oldValue != value)
{ {
_AirsTime = value; Enums.Weekday? oldValue = _AirsDayOfWeek;
SetAirsDayOfWeek(oldValue, ref value);
if (oldValue != value)
{
_AirsDayOfWeek = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for FirstAired /// Backing field for AirsTime
/// </summary> /// </summary>
protected DateTimeOffset? _FirstAired; protected DateTimeOffset? _AirsTime;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of FirstAired to be changed before setting. /// When provided in a partial class, allows value of AirsTime to be changed before setting.
/// </summary> /// </summary>
partial void SetFirstAired(DateTimeOffset? oldValue, ref DateTimeOffset? newValue); partial void SetAirsTime(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of FirstAired to be changed before returning. /// When provided in a partial class, allows value of AirsTime to be changed before returning.
/// </summary> /// </summary>
partial void GetFirstAired(ref DateTimeOffset? result); partial void GetAirsTime(ref DateTimeOffset? result);
public DateTimeOffset? FirstAired /// <summary>
{ /// The time the show airs, ignore the date portion
get /// </summary>
{ public DateTimeOffset? AirsTime
DateTimeOffset? value = _FirstAired; {
GetFirstAired(ref value); get
return (_FirstAired = value);
}
set
{
DateTimeOffset? oldValue = _FirstAired;
SetFirstAired(oldValue, ref value);
if (oldValue != value)
{ {
_FirstAired = value; DateTimeOffset? value = _AirsTime;
GetAirsTime(ref value);
return (_AirsTime = value);
} }
} set
} {
DateTimeOffset? oldValue = _AirsTime;
SetAirsTime(oldValue, ref value);
if (oldValue != value)
{
_AirsTime = value;
}
}
}
/************************************************************************* /// <summary>
* Navigation properties /// Backing field for FirstAired
*************************************************************************/ /// </summary>
protected DateTimeOffset? _FirstAired;
/// <summary>
/// When provided in a partial class, allows value of FirstAired to be changed before setting.
/// </summary>
partial void SetFirstAired(DateTimeOffset? oldValue, ref DateTimeOffset? newValue);
/// <summary>
/// When provided in a partial class, allows value of FirstAired to be changed before returning.
/// </summary>
partial void GetFirstAired(ref DateTimeOffset? result);
public virtual ICollection<global::Jellyfin.Data.Entities.SeriesMetadata> SeriesMetadata { get; protected set; } public DateTimeOffset? FirstAired
{
get
{
DateTimeOffset? value = _FirstAired;
GetFirstAired(ref value);
return (_FirstAired = value);
}
set
{
DateTimeOffset? oldValue = _FirstAired;
SetFirstAired(oldValue, ref value);
if (oldValue != value)
{
_FirstAired = value;
}
}
}
public virtual ICollection<global::Jellyfin.Data.Entities.Season> Seasons { get; protected set; } /*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("SeriesMetadata_SeriesMetadata_Id")]
public virtual ICollection<SeriesMetadata> SeriesMetadata { get; protected set; }
} [ForeignKey("Season_Seasons_Id")]
public virtual ICollection<Season> Seasons { get; protected set; }
}
} }

View File

@ -1,239 +1,223 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class SeriesMetadata: global::Jellyfin.Data.Entities.Metadata public partial class SeriesMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected SeriesMetadata(): base() protected SeriesMetadata()
{ {
Networks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); Networks = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static SeriesMetadata CreateSeriesMetadataUnsafe() public static SeriesMetadata CreateSeriesMetadataUnsafe()
{ {
return new SeriesMetadata(); return new SeriesMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_series0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_series0 == null) throw new ArgumentNullException(nameof(_series0)); if (_series0 == null) throw new ArgumentNullException(nameof(_series0));
_series0.SeriesMetadata.Add(this); _series0.SeriesMetadata.Add(this);
this.Networks = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Company>(); this.Networks = new HashSet<Company>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_series0"></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); return new SeriesMetadata(title, language, dateadded, datemodified, _series0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for Outline /// Backing field for Outline
/// </summary> /// </summary>
protected string _Outline; protected string _Outline;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before setting. /// When provided in a partial class, allows value of Outline to be changed before setting.
/// </summary> /// </summary>
partial void SetOutline(string oldValue, ref string newValue); partial void SetOutline(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Outline to be changed before returning. /// When provided in a partial class, allows value of Outline to be changed before returning.
/// </summary> /// </summary>
partial void GetOutline(ref string result); partial void GetOutline(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 1024
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(1024)]
[StringLength(1024)] [StringLength(1024)]
public string Outline public string Outline
{ {
get get
{
string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
}
set
{
string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{ {
_Outline = value; string value = _Outline;
GetOutline(ref value);
return (_Outline = value);
} }
} set
}
/// <summary>
/// Backing field for Plot
/// </summary>
protected string _Plot;
/// <summary>
/// When provided in a partial class, allows value of Plot to be changed before setting.
/// </summary>
partial void SetPlot(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Plot to be changed before returning.
/// </summary>
partial void GetPlot(ref string result);
/// <summary>
/// Max length = 65535
/// </summary>
[MaxLength(65535)]
[StringLength(65535)]
public string Plot
{
get
{
string value = _Plot;
GetPlot(ref value);
return (_Plot = value);
}
set
{
string oldValue = _Plot;
SetPlot(oldValue, ref value);
if (oldValue != value)
{ {
_Plot = value; string oldValue = _Outline;
SetOutline(oldValue, ref value);
if (oldValue != value)
{
_Outline = value;
}
} }
} }
}
/// <summary> /// <summary>
/// Backing field for Tagline /// Backing field for Plot
/// </summary> /// </summary>
protected string _Tagline; protected string _Plot;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before setting. /// When provided in a partial class, allows value of Plot to be changed before setting.
/// </summary> /// </summary>
partial void SetTagline(string oldValue, ref string newValue); partial void SetPlot(string oldValue, ref string newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before returning. /// When provided in a partial class, allows value of Plot to be changed before returning.
/// </summary> /// </summary>
partial void GetTagline(ref string result); partial void GetPlot(ref string result);
/// <summary> /// <summary>
/// Max length = 1024 /// Max length = 65535
/// </summary> /// </summary>
[MaxLength(1024)] [MaxLength(65535)]
[StringLength(1024)] [StringLength(65535)]
public string Tagline public string Plot
{ {
get get
{
string value = _Tagline;
GetTagline(ref value);
return (_Tagline = value);
}
set
{
string oldValue = _Tagline;
SetTagline(oldValue, ref value);
if (oldValue != value)
{ {
_Tagline = value; string value = _Plot;
GetPlot(ref value);
return (_Plot = value);
} }
} set
}
/// <summary>
/// Backing field for Country
/// </summary>
protected string _Country;
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting.
/// </summary>
partial void SetCountry(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning.
/// </summary>
partial void GetCountry(ref string result);
/// <summary>
/// Max length = 2
/// </summary>
[MaxLength(2)]
[StringLength(2)]
public string Country
{
get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{ {
_Country = value; string oldValue = _Plot;
SetPlot(oldValue, ref value);
if (oldValue != value)
{
_Plot = value;
}
} }
} }
}
/************************************************************************* /// <summary>
* Navigation properties /// Backing field for Tagline
*************************************************************************/ /// </summary>
protected string _Tagline;
/// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before setting.
/// </summary>
partial void SetTagline(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Tagline to be changed before returning.
/// </summary>
partial void GetTagline(ref string result);
public virtual ICollection<global::Jellyfin.Data.Entities.Company> Networks { get; protected set; } /// <summary>
/// Max length = 1024
/// </summary>
[MaxLength(1024)]
[StringLength(1024)]
public string Tagline
{
get
{
string value = _Tagline;
GetTagline(ref value);
return (_Tagline = value);
}
set
{
string oldValue = _Tagline;
SetTagline(oldValue, ref value);
if (oldValue != value)
{
_Tagline = value;
}
}
}
} /// <summary>
/// Backing field for Country
/// </summary>
protected string _Country;
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before setting.
/// </summary>
partial void SetCountry(string oldValue, ref string newValue);
/// <summary>
/// When provided in a partial class, allows value of Country to be changed before returning.
/// </summary>
partial void GetCountry(ref string result);
/// <summary>
/// Max length = 2
/// </summary>
[MaxLength(2)]
[StringLength(2)]
public string Country
{
get
{
string value = _Country;
GetCountry(ref value);
return (_Country = value);
}
set
{
string oldValue = _Country;
SetCountry(oldValue, ref value);
if (oldValue != value)
{
_Country = value;
}
}
}
/*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("Company_Networks_Id")]
public virtual ICollection<Company> Networks { get; protected set; }
}
} }

View File

@ -1,127 +1,112 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class Track: global::Jellyfin.Data.Entities.LibraryItem public partial class Track : LibraryItem
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected Track(): base() protected Track()
{ {
// NOTE: This class has one-to-one associations with LibraryRoot, LibraryItem and CollectionItem. // 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. // 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>(); Releases = new HashSet<Release>();
TrackMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.TrackMetadata>(); TrackMetadata = new HashSet<TrackMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static Track CreateTrackUnsafe() public static Track CreateTrackUnsafe()
{ {
return new Track(); return new Track();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <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> /// <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. // 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. // One-to-one associations are not validated in constructors since this causes a scenario where each one must be constructed before the other.
this.UrlId = urlid; this.UrlId = urlid;
if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0)); if (_musicalbum0 == null) throw new ArgumentNullException(nameof(_musicalbum0));
_musicalbum0.Tracks.Add(this); _musicalbum0.Tracks.Add(this);
this.Releases = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Release>(); this.Releases = new HashSet<Release>();
this.TrackMetadata = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.TrackMetadata>(); this.TrackMetadata = new HashSet<TrackMetadata>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="urlid">This is whats gets displayed in the Urls and API requests. This could also be a string.</param> /// <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> /// <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); return new Track(urlid, dateadded, _musicalbum0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Backing field for TrackNumber /// Backing field for TrackNumber
/// </summary> /// </summary>
protected int? _TrackNumber; protected int? _TrackNumber;
/// <summary> /// <summary>
/// When provided in a partial class, allows value of TrackNumber to be changed before setting. /// When provided in a partial class, allows value of TrackNumber to be changed before setting.
/// </summary> /// </summary>
partial void SetTrackNumber(int? oldValue, ref int? newValue); partial void SetTrackNumber(int? oldValue, ref int? newValue);
/// <summary> /// <summary>
/// When provided in a partial class, allows value of TrackNumber to be changed before returning. /// When provided in a partial class, allows value of TrackNumber to be changed before returning.
/// </summary> /// </summary>
partial void GetTrackNumber(ref int? result); partial void GetTrackNumber(ref int? result);
public int? TrackNumber public int? TrackNumber
{ {
get get
{
int? value = _TrackNumber;
GetTrackNumber(ref value);
return (_TrackNumber = value);
}
set
{
int? oldValue = _TrackNumber;
SetTrackNumber(oldValue, ref value);
if (oldValue != value)
{ {
_TrackNumber = value; int? value = _TrackNumber;
GetTrackNumber(ref value);
return (_TrackNumber = value);
} }
} set
} {
int? oldValue = _TrackNumber;
SetTrackNumber(oldValue, ref value);
if (oldValue != value)
{
_TrackNumber = value;
}
}
}
/************************************************************************* /*************************************************************************
* Navigation properties * 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,86 +1,68 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class TrackMetadata: global::Jellyfin.Data.Entities.Metadata public partial class TrackMetadata : Metadata
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected TrackMetadata(): base() protected TrackMetadata()
{ {
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static TrackMetadata CreateTrackMetadataUnsafe() public static TrackMetadata CreateTrackMetadataUnsafe()
{ {
return new TrackMetadata(); return new TrackMetadata();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_track0"></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)); if (string.IsNullOrEmpty(title)) throw new ArgumentNullException(nameof(title));
this.Title = title; this.Title = title;
if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language)); if (string.IsNullOrEmpty(language)) throw new ArgumentNullException(nameof(language));
this.Language = language; this.Language = language;
if (_track0 == null) throw new ArgumentNullException(nameof(_track0)); if (_track0 == null) throw new ArgumentNullException(nameof(_track0));
_track0.TrackMetadata.Add(this); _track0.TrackMetadata.Add(this);
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="title">The title or name of the object</param> /// <param name="title">The title or name of the object</param>
/// <param name="language">ISO-639-3 3-character language codes</param> /// <param name="language">ISO-639-3 3-character language codes</param>
/// <param name="_track0"></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); return new TrackMetadata(title, language, dateadded, datemodified, _track0);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/************************************************************************* /*************************************************************************
* Navigation properties * Navigation properties
*************************************************************************/ *************************************************************************/
} }
} }

View File

@ -1,242 +1,235 @@
//------------------------------------------------------------------------------
// <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;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;
namespace Jellyfin.Data.Entities namespace Jellyfin.Data.Entities
{ {
public partial class User public partial class User
{ {
partial void Init(); partial void Init();
/// <summary> /// <summary>
/// Default constructor. Protected due to required properties, but present because EF needs it. /// Default constructor. Protected due to required properties, but present because EF needs it.
/// </summary> /// </summary>
protected User() protected User()
{ {
Groups = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Group>(); Groups = new HashSet<Group>();
Permissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>(); Permissions = new HashSet<Permission>();
ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>(); ProviderMappings = new HashSet<ProviderMapping>();
Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>(); Preferences = new HashSet<Preference>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving. /// Replaces default constructor, since it's protected. Caller assumes responsibility for setting all required values before saving.
/// </summary> /// </summary>
public static User CreateUserUnsafe() public static User CreateUserUnsafe()
{ {
return new User(); return new User();
} }
/// <summary> /// <summary>
/// Public constructor with required data /// Public constructor with required data
/// </summary> /// </summary>
/// <param name="username"></param> /// <param name="username"></param>
/// <param name="mustupdatepassword"></param> /// <param name="mustupdatepassword"></param>
/// <param name="audiolanguagepreference"></param> /// <param name="audiolanguagepreference"></param>
/// <param name="authenticationproviderid"></param> /// <param name="authenticationproviderid"></param>
/// <param name="invalidloginattemptcount"></param> /// <param name="invalidloginattemptcount"></param>
/// <param name="subtitlemode"></param> /// <param name="subtitlemode"></param>
/// <param name="playdefaultaudiotrack"></param> /// <param name="playdefaultaudiotrack"></param>
public User(string username, bool mustupdatepassword, string audiolanguagepreference, string authenticationproviderid, int invalidloginattemptcount, string subtitlemode, bool playdefaultaudiotrack) public User(string username, bool mustupdatepassword, string audiolanguagepreference, string authenticationproviderid, int invalidloginattemptcount, string subtitlemode, bool playdefaultaudiotrack)
{ {
if (string.IsNullOrEmpty(username)) throw new ArgumentNullException(nameof(username)); if (string.IsNullOrEmpty(username)) throw new ArgumentNullException(nameof(username));
this.Username = username; this.Username = username;
this.MustUpdatePassword = mustupdatepassword; this.MustUpdatePassword = mustupdatepassword;
if (string.IsNullOrEmpty(audiolanguagepreference)) throw new ArgumentNullException(nameof(audiolanguagepreference)); if (string.IsNullOrEmpty(audiolanguagepreference)) throw new ArgumentNullException(nameof(audiolanguagepreference));
this.AudioLanguagePreference = audiolanguagepreference; this.AudioLanguagePreference = audiolanguagepreference;
if (string.IsNullOrEmpty(authenticationproviderid)) throw new ArgumentNullException(nameof(authenticationproviderid)); if (string.IsNullOrEmpty(authenticationproviderid)) throw new ArgumentNullException(nameof(authenticationproviderid));
this.AuthenticationProviderId = authenticationproviderid; this.AuthenticationProviderId = authenticationproviderid;
this.InvalidLoginAttemptCount = invalidloginattemptcount; this.InvalidLoginAttemptCount = invalidloginattemptcount;
if (string.IsNullOrEmpty(subtitlemode)) throw new ArgumentNullException(nameof(subtitlemode)); if (string.IsNullOrEmpty(subtitlemode)) throw new ArgumentNullException(nameof(subtitlemode));
this.SubtitleMode = subtitlemode; this.SubtitleMode = subtitlemode;
this.PlayDefaultAudioTrack = playdefaultaudiotrack; this.PlayDefaultAudioTrack = playdefaultaudiotrack;
this.Groups = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Group>(); this.Groups = new HashSet<Group>();
this.Permissions = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Permission>(); this.Permissions = new HashSet<Permission>();
this.ProviderMappings = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.ProviderMapping>(); this.ProviderMappings = new HashSet<ProviderMapping>();
this.Preferences = new System.Collections.Generic.HashSet<global::Jellyfin.Data.Entities.Preference>(); this.Preferences = new HashSet<Preference>();
Init(); Init();
} }
/// <summary> /// <summary>
/// Static create function (for use in LINQ queries, etc.) /// Static create function (for use in LINQ queries, etc.)
/// </summary> /// </summary>
/// <param name="username"></param> /// <param name="username"></param>
/// <param name="mustupdatepassword"></param> /// <param name="mustupdatepassword"></param>
/// <param name="audiolanguagepreference"></param> /// <param name="audiolanguagepreference"></param>
/// <param name="authenticationproviderid"></param> /// <param name="authenticationproviderid"></param>
/// <param name="invalidloginattemptcount"></param> /// <param name="invalidloginattemptcount"></param>
/// <param name="subtitlemode"></param> /// <param name="subtitlemode"></param>
/// <param name="playdefaultaudiotrack"></param> /// <param name="playdefaultaudiotrack"></param>
public static User Create(string username, bool mustupdatepassword, string audiolanguagepreference, string authenticationproviderid, int invalidloginattemptcount, string subtitlemode, bool playdefaultaudiotrack) public static User Create(string username, bool mustupdatepassword, string audiolanguagepreference, string authenticationproviderid, int invalidloginattemptcount, string subtitlemode, bool playdefaultaudiotrack)
{ {
return new User(username, mustupdatepassword, audiolanguagepreference, authenticationproviderid, invalidloginattemptcount, subtitlemode, playdefaultaudiotrack); return new User(username, mustupdatepassword, audiolanguagepreference, authenticationproviderid, invalidloginattemptcount, subtitlemode, playdefaultaudiotrack);
} }
/************************************************************************* /*************************************************************************
* Properties * Properties
*************************************************************************/ *************************************************************************/
/// <summary> /// <summary>
/// Identity, Indexed, Required /// Identity, Indexed, Required
/// </summary> /// </summary>
[Key] [Key]
[Required] [Required]
public Guid Id { get; protected set; } [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public int Id { get; protected set; }
/// <summary> /// <summary>
/// Required /// Required, Max length = 255
/// </summary> /// </summary>
[ConcurrencyCheck] [Required]
[Required] [MaxLength(255)]
public byte[] LastLoginTimestamp { get; set; } [StringLength(255)]
public string Username { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 255 /// Max length = 65535
/// </summary> /// </summary>
[Required] [MaxLength(65535)]
[MaxLength(255)] [StringLength(65535)]
[StringLength(255)] public string Password { get; set; }
public string Username { get; set; }
/// <summary> /// <summary>
/// Max length = 65535 /// Required
/// </summary> /// </summary>
[MaxLength(65535)] [Required]
[StringLength(65535)] public bool MustUpdatePassword { get; set; }
public string Password { get; set; }
/// <summary> /// <summary>
/// Required /// Required, Max length = 255
/// </summary> /// </summary>
[Required] [Required]
public bool MustUpdatePassword { get; set; } [MaxLength(255)]
[StringLength(255)]
public string AudioLanguagePreference { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 255 /// Required, Max length = 255
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(255)] [MaxLength(255)]
[StringLength(255)] [StringLength(255)]
public string AudioLanguagePreference { get; set; } public string AuthenticationProviderId { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 255 /// Max length = 65535
/// </summary> /// </summary>
[Required] [MaxLength(65535)]
[MaxLength(255)] [StringLength(65535)]
[StringLength(255)] public string GroupedFolders { get; set; }
public string AuthenticationProviderId { get; set; }
/// <summary> /// <summary>
/// Max length = 65535 /// Required
/// </summary> /// </summary>
[MaxLength(65535)] [Required]
[StringLength(65535)] public int InvalidLoginAttemptCount { get; set; }
public string GroupedFolders { get; set; }
/// <summary> /// <summary>
/// Required /// Max length = 65535
/// </summary> /// </summary>
[Required] [MaxLength(65535)]
public int InvalidLoginAttemptCount { get; set; } [StringLength(65535)]
public string LatestItemExcludes { get; set; }
/// <summary> public int? LoginAttemptsBeforeLockout { get; set; }
/// Max length = 65535
/// </summary>
[MaxLength(65535)]
[StringLength(65535)]
public string LatestItemExcludes { get; set; }
public int? LoginAttemptsBeforeLockout { get; set; } /// <summary>
/// Max length = 65535
/// </summary>
[MaxLength(65535)]
[StringLength(65535)]
public string MyMediaExcludes { get; set; }
/// <summary> /// <summary>
/// Max length = 65535 /// Max length = 65535
/// </summary> /// </summary>
[MaxLength(65535)] [MaxLength(65535)]
[StringLength(65535)] [StringLength(65535)]
public string MyMediaExcludes { get; set; } public string OrderedViews { get; set; }
/// <summary> /// <summary>
/// Max length = 65535 /// Required, Max length = 255
/// </summary> /// </summary>
[MaxLength(65535)] [Required]
[StringLength(65535)] [MaxLength(255)]
public string OrderedViews { get; set; } [StringLength(255)]
public string SubtitleMode { get; set; }
/// <summary> /// <summary>
/// Required, Max length = 255 /// Required
/// </summary> /// </summary>
[Required] [Required]
[MaxLength(255)] public bool PlayDefaultAudioTrack { get; set; }
[StringLength(255)]
public string SubtitleMode { get; set; }
/// <summary> /// <summary>
/// Required /// Max length = 255
/// </summary> /// </summary>
[Required] [MaxLength(255)]
public bool PlayDefaultAudioTrack { get; set; } [StringLength(255)]
public string SubtitleLanguagePrefernce { get; set; }
/// <summary> public bool? DisplayMissingEpisodes { get; set; }
/// Max length = 255
/// </summary>
[MaxLength(255)]
[StringLength(255)]
public string SubtitleLanguagePrefernce { get; set; }
public bool? DisplayMissingEpisodes { get; set; } public bool? DisplayCollectionsView { get; set; }
public bool? DisplayCollectionsView { get; set; } public bool? HidePlayedInLatest { get; set; }
public bool? HidePlayedInLatest { get; set; } public bool? RememberAudioSelections { get; set; }
public bool? RememberAudioSelections { get; set; } public bool? RememberSubtitleSelections { get; set; }
public bool? RememberSubtitleSelections { get; set; } public bool? EnableNextEpisodeAutoPlay { get; set; }
public bool? EnableNextEpisodeAutoPlay { get; set; } public bool? EnableUserPreferenceAccess { get; set; }
public bool? EnableUserPreferenceAccess { get; set; } /// <summary>
/// Required, ConcurrenyToken
/// </summary>
[ConcurrencyCheck]
[Required]
public uint RowVersion { get; set; }
/************************************************************************* public void OnSavingChanges()
* Navigation properties {
*************************************************************************/ RowVersion++;
}
public virtual ICollection<global::Jellyfin.Data.Entities.Group> Groups { get; protected set; } /*************************************************************************
* Navigation properties
*************************************************************************/
[ForeignKey("Group_Groups_Id")]
public virtual ICollection<Group> Groups { get; protected set; }
public virtual ICollection<global::Jellyfin.Data.Entities.Permission> Permissions { get; protected set; } [ForeignKey("Permission_Permissions_Id")]
public virtual ICollection<Permission> Permissions { 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,25 +1,11 @@
//------------------------------------------------------------------------------
// <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 namespace Jellyfin.Data.Enums
{ {
public enum ArtKind : Int32 public enum ArtKind
{ {
Other, Other,
Poster, Poster,
Banner, Banner,
Thumbnail, Thumbnail,
Logo Logo
} }
} }

View File

@ -1,25 +1,11 @@
//------------------------------------------------------------------------------
// <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 namespace Jellyfin.Data.Enums
{ {
public enum MediaFileKind : Int32 public enum MediaFileKind
{ {
Main, Main,
Sidecar, Sidecar,
AdditionalPart, AdditionalPart,
AlternativeFormat, AlternativeFormat,
AdditionalStream AdditionalStream
} }
} }

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,32 +1,18 @@
//------------------------------------------------------------------------------
// <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 namespace Jellyfin.Data.Enums
{ {
public enum PersonRoleType : Int32 public enum PersonRoleType
{ {
Other, Other,
Director, Director,
Artist, Artist,
OriginalArtist, OriginalArtist,
Actor, Actor,
VoiceActor, VoiceActor,
Producer, Producer,
Remixer, Remixer,
Conductor, Conductor,
Composer, Composer,
Author, Author,
Editor Editor
} }
} }

View File

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

View File

@ -1,27 +1,13 @@
//------------------------------------------------------------------------------
// <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 namespace Jellyfin.Data.Enums
{ {
public enum Weekday : Int32 public enum Weekday
{ {
Sunday, Sunday,
Monday, Monday,
Tuesday, Tuesday,
Wednesday, Wednesday,
Thursday, Thursday,
Friday, Friday,
Saturday Saturday
} }
} }

View File

@ -1,4 +1,4 @@
#pragma warning disable CS1591 #pragma warning disable CS1591
namespace Jellyfin.Data namespace Jellyfin.Data
{ {

View File

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

View File

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

View File

@ -36,6 +36,13 @@ namespace Jellyfin.Server.Migrations.Routines
@"{""Serilog"":{""MinimumLevel"":""Information"",""WriteTo"":[{""Name"":""Console"",""Args"":{""outputTemplate"":""[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}""}},{""Name"":""Async"",""Args"":{""configure"":[{""Name"":""File"",""Args"":{""path"":""%JELLYFIN_LOG_DIR%//log_.log"",""rollingInterval"":""Day"",""retainedFileCountLimit"":3,""rollOnFileSizeLimit"":true,""fileSizeLimitBytes"":100000000,""outputTemplate"":""[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}""}}]}}],""Enrich"":[""FromLogContext"",""WithThreadId""]}}", @"{""Serilog"":{""MinimumLevel"":""Information"",""WriteTo"":[{""Name"":""Console"",""Args"":{""outputTemplate"":""[{Timestamp:HH:mm:ss}] [{Level:u3}] [{ThreadId}] {SourceContext}: {Message:lj}{NewLine}{Exception}""}},{""Name"":""Async"",""Args"":{""configure"":[{""Name"":""File"",""Args"":{""path"":""%JELLYFIN_LOG_DIR%//log_.log"",""rollingInterval"":""Day"",""retainedFileCountLimit"":3,""rollOnFileSizeLimit"":true,""fileSizeLimitBytes"":100000000,""outputTemplate"":""[{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz}] [{Level:u3}] [{ThreadId}] {SourceContext}:{Message}{NewLine}{Exception}""}}]}}],""Enrich"":[""FromLogContext"",""WithThreadId""]}}",
}; };
private readonly IApplicationPaths _appPaths;
public CreateUserLoggingConfigFile(IApplicationPaths appPaths)
{
_appPaths = appPaths;
}
/// <inheritdoc/> /// <inheritdoc/>
public Guid Id => Guid.Parse("{EF103419-8451-40D8-9F34-D1A8E93A1679}"); public Guid Id => Guid.Parse("{EF103419-8451-40D8-9F34-D1A8E93A1679}");
@ -43,9 +50,9 @@ namespace Jellyfin.Server.Migrations.Routines
public string Name => "CreateLoggingConfigHeirarchy"; public string Name => "CreateLoggingConfigHeirarchy";
/// <inheritdoc/> /// <inheritdoc/>
public void Perform(CoreAppHost host, ILogger logger) public void Perform()
{ {
var logDirectory = host.Resolve<IApplicationPaths>().ConfigurationDirectoryPath; var logDirectory = _appPaths.ConfigurationDirectoryPath;
var existingConfigPath = Path.Combine(logDirectory, "logging.json"); var existingConfigPath = Path.Combine(logDirectory, "logging.json");
// If the existing logging.json config file is unmodified, then 'reset' it by moving it to 'logging.old.json' // If the existing logging.json config file is unmodified, then 'reset' it by moving it to 'logging.old.json'

View File

@ -10,6 +10,15 @@ namespace Jellyfin.Server.Migrations.Routines
/// </summary> /// </summary>
internal class DisableTranscodingThrottling : IMigrationRoutine internal class DisableTranscodingThrottling : IMigrationRoutine
{ {
private readonly ILogger _logger;
private readonly IConfigurationManager _configManager;
public DisableTranscodingThrottling(ILogger<DisableTranscodingThrottling> logger, IConfigurationManager configManager)
{
_logger = logger;
_configManager = configManager;
}
/// <inheritdoc/> /// <inheritdoc/>
public Guid Id => Guid.Parse("{4124C2CD-E939-4FFB-9BE9-9B311C413638}"); public Guid Id => Guid.Parse("{4124C2CD-E939-4FFB-9BE9-9B311C413638}");
@ -17,16 +26,16 @@ namespace Jellyfin.Server.Migrations.Routines
public string Name => "DisableTranscodingThrottling"; public string Name => "DisableTranscodingThrottling";
/// <inheritdoc/> /// <inheritdoc/>
public void Perform(CoreAppHost host, ILogger logger) public void Perform()
{ {
// Set EnableThrottling to false since it wasn't used before and may introduce issues // Set EnableThrottling to false since it wasn't used before and may introduce issues
var encoding = ((IConfigurationManager)host.ServerConfigurationManager).GetConfiguration<EncodingOptions>("encoding"); var encoding = _configManager.GetConfiguration<EncodingOptions>("encoding");
if (encoding.EnableThrottling) if (encoding.EnableThrottling)
{ {
logger.LogInformation("Disabling transcoding throttling during migration"); _logger.LogInformation("Disabling transcoding throttling during migration");
encoding.EnableThrottling = false; encoding.EnableThrottling = false;
host.ServerConfigurationManager.SaveConfiguration("encoding", encoding); _configManager.SaveConfiguration("encoding", encoding);
} }
} }
} }

View File

@ -161,23 +161,7 @@ namespace Jellyfin.Server
ApplicationHost.LogEnvironmentInfo(_logger, appPaths); ApplicationHost.LogEnvironmentInfo(_logger, appPaths);
// Make sure we have all the code pages we can get PerformStaticInitialization();
// Ref: https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider.instance?view=netcore-3.0#remarks
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
// Increase the max http request limit
// The default connection limit is 10 for ASP.NET hosted applications and 2 for all others.
ServicePointManager.DefaultConnectionLimit = Math.Max(96, ServicePointManager.DefaultConnectionLimit);
// Disable the "Expect: 100-Continue" header by default
// http://stackoverflow.com/questions/566437/http-post-returns-the-error-417-expectation-failed-c
ServicePointManager.Expect100Continue = false;
Batteries_V2.Init();
if (raw.sqlite3_enable_shared_cache(1) != raw.SQLITE_OK)
{
_logger.LogWarning("Failed to enable shared cache for SQLite");
}
var appHost = new CoreAppHost( var appHost = new CoreAppHost(
appPaths, appPaths,
@ -205,7 +189,7 @@ namespace Jellyfin.Server
ServiceCollection serviceCollection = new ServiceCollection(); ServiceCollection serviceCollection = new ServiceCollection();
appHost.Init(serviceCollection); appHost.Init(serviceCollection);
var webHost = CreateWebHostBuilder(appHost, serviceCollection, options, startupConfig, appPaths).Build(); var webHost = new WebHostBuilder().ConfigureWebHostBuilder(appHost, serviceCollection, options, startupConfig, appPaths).Build();
// Re-use the web host service provider in the app host since ASP.NET doesn't allow a custom service collection. // Re-use the web host service provider in the app host since ASP.NET doesn't allow a custom service collection.
appHost.ServiceProvider = webHost.Services; appHost.ServiceProvider = webHost.Services;
@ -250,14 +234,49 @@ namespace Jellyfin.Server
} }
} }
private static IWebHostBuilder CreateWebHostBuilder( /// <summary>
/// Call static initialization methods for the application.
/// </summary>
public static void PerformStaticInitialization()
{
// Make sure we have all the code pages we can get
// Ref: https://docs.microsoft.com/en-us/dotnet/api/system.text.codepagesencodingprovider.instance?view=netcore-3.0#remarks
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
// Increase the max http request limit
// The default connection limit is 10 for ASP.NET hosted applications and 2 for all others.
ServicePointManager.DefaultConnectionLimit = Math.Max(96, ServicePointManager.DefaultConnectionLimit);
// Disable the "Expect: 100-Continue" header by default
// http://stackoverflow.com/questions/566437/http-post-returns-the-error-417-expectation-failed-c
ServicePointManager.Expect100Continue = false;
Batteries_V2.Init();
if (raw.sqlite3_enable_shared_cache(1) != raw.SQLITE_OK)
{
_logger.LogWarning("Failed to enable shared cache for SQLite");
}
}
/// <summary>
/// Configure the web host builder.
/// </summary>
/// <param name="builder">The builder to configure.</param>
/// <param name="appHost">The application host.</param>
/// <param name="serviceCollection">The application service collection.</param>
/// <param name="commandLineOpts">The command line options passed to the application.</param>
/// <param name="startupConfig">The application configuration.</param>
/// <param name="appPaths">The application paths.</param>
/// <returns>The configured web host builder.</returns>
public static IWebHostBuilder ConfigureWebHostBuilder(
this IWebHostBuilder builder,
ApplicationHost appHost, ApplicationHost appHost,
IServiceCollection serviceCollection, IServiceCollection serviceCollection,
StartupOptions commandLineOpts, StartupOptions commandLineOpts,
IConfiguration startupConfig, IConfiguration startupConfig,
IApplicationPaths appPaths) IApplicationPaths appPaths)
{ {
return new WebHostBuilder() return builder
.UseKestrel((builderContext, options) => .UseKestrel((builderContext, options) =>
{ {
var addresses = appHost.ServerConfigurationManager var addresses = appHost.ServerConfigurationManager
@ -278,7 +297,6 @@ namespace Jellyfin.Server
{ {
_logger.LogInformation("Kestrel listening on {IpAddress}", address); _logger.LogInformation("Kestrel listening on {IpAddress}", address);
options.Listen(address, appHost.HttpPort); options.Listen(address, appHost.HttpPort);
if (appHost.EnableHttps && appHost.Certificate != null) if (appHost.EnableHttps && appHost.Certificate != null)
{ {
options.Listen(address, appHost.HttpsPort, listenOptions => options.Listen(address, appHost.HttpsPort, listenOptions =>
@ -289,11 +307,18 @@ namespace Jellyfin.Server
} }
else if (builderContext.HostingEnvironment.IsDevelopment()) else if (builderContext.HostingEnvironment.IsDevelopment())
{ {
options.Listen(address, appHost.HttpsPort, listenOptions => try
{ {
listenOptions.UseHttps(); options.Listen(address, appHost.HttpsPort, listenOptions =>
listenOptions.Protocols = HttpProtocols.Http1AndHttp2; {
}); listenOptions.UseHttps();
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
});
}
catch (InvalidOperationException ex)
{
_logger.LogError(ex, "Failed to listen to HTTPS using the ASP.NET Core HTTPS development certificate. Please ensure it has been installed and set as trusted.");
}
} }
} }
} }
@ -312,11 +337,18 @@ namespace Jellyfin.Server
} }
else if (builderContext.HostingEnvironment.IsDevelopment()) else if (builderContext.HostingEnvironment.IsDevelopment())
{ {
options.ListenAnyIP(appHost.HttpsPort, listenOptions => try
{ {
listenOptions.UseHttps(); options.ListenAnyIP(appHost.HttpsPort, listenOptions =>
listenOptions.Protocols = HttpProtocols.Http1AndHttp2; {
}); listenOptions.UseHttps();
listenOptions.Protocols = HttpProtocols.Http1AndHttp2;
});
}
catch (InvalidOperationException ex)
{
_logger.LogError(ex, "Failed to listen to HTTPS using the ASP.NET Core HTTPS development certificate. Please ensure it has been installed and set as trusted.");
}
} }
} }
}) })
@ -496,7 +528,9 @@ namespace Jellyfin.Server
/// Initialize the logging configuration file using the bundled resource file as a default if it doesn't exist /// Initialize the logging configuration file using the bundled resource file as a default if it doesn't exist
/// already. /// already.
/// </summary> /// </summary>
private static async Task InitLoggingConfigFile(IApplicationPaths appPaths) /// <param name="appPaths">The application paths.</param>
/// <returns>A task representing the creation of the configuration file, or a completed task if the file already exists.</returns>
public static async Task InitLoggingConfigFile(IApplicationPaths appPaths)
{ {
// Do nothing if the config file already exists // Do nothing if the config file already exists
string configPath = Path.Combine(appPaths.ConfigurationDirectoryPath, LoggingConfigFileDefault); string configPath = Path.Combine(appPaths.ConfigurationDirectoryPath, LoggingConfigFileDefault);
@ -516,7 +550,13 @@ namespace Jellyfin.Server
await resource.CopyToAsync(dst).ConfigureAwait(false); await resource.CopyToAsync(dst).ConfigureAwait(false);
} }
private static IConfiguration CreateAppConfiguration(StartupOptions commandLineOpts, IApplicationPaths appPaths) /// <summary>
/// Create the application configuration.
/// </summary>
/// <param name="commandLineOpts">The command line options passed to the program.</param>
/// <param name="appPaths">The application paths.</param>
/// <returns>The application configuration.</returns>
public static IConfiguration CreateAppConfiguration(StartupOptions commandLineOpts, IApplicationPaths appPaths)
{ {
return new ConfigurationBuilder() return new ConfigurationBuilder()
.ConfigureAppConfiguration(commandLineOpts, appPaths) .ConfigureAppConfiguration(commandLineOpts, appPaths)

View File

@ -265,17 +265,20 @@ namespace MediaBrowser.Api.Images
{ {
Url = url, Url = url,
BufferContent = false BufferContent = false
}).ConfigureAwait(false); }).ConfigureAwait(false);
var ext = result.ContentType.Split('/').Last(); var ext = result.ContentType.Split('/')[^1];
var fullCachePath = GetFullCachePath(urlHash + "." + ext); var fullCachePath = GetFullCachePath(urlHash + "." + ext);
Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath)); Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath));
using (var stream = result.Content) var stream = result.Content;
await using (stream.ConfigureAwait(false))
{ {
using var filestream = new FileStream(fullCachePath, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, true); var filestream = new FileStream(fullCachePath, FileMode.Create, FileAccess.Write, FileShare.Read, IODefaults.FileStreamBufferSize, true);
await stream.CopyToAsync(filestream).ConfigureAwait(false); await using (filestream.ConfigureAwait(false))
{
await stream.CopyToAsync(filestream).ConfigureAwait(false);
}
} }
Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath)); Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath));

View File

@ -299,22 +299,26 @@ namespace MediaBrowser.Api
{ {
var result = await _providerManager.GetSearchImage(providerName, url, CancellationToken.None).ConfigureAwait(false); var result = await _providerManager.GetSearchImage(providerName, url, CancellationToken.None).ConfigureAwait(false);
var ext = result.ContentType.Split('/').Last(); var ext = result.ContentType.Split('/')[^1];
var fullCachePath = GetFullCachePath(urlHash + "." + ext); var fullCachePath = GetFullCachePath(urlHash + "." + ext);
Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath)); Directory.CreateDirectory(Path.GetDirectoryName(fullCachePath));
using (var stream = result.Content) var stream = result.Content;
await using (stream.ConfigureAwait(false))
{ {
using var fileStream = new FileStream( var fileStream = new FileStream(
fullCachePath, fullCachePath,
FileMode.Create, FileMode.Create,
FileAccess.Write, FileAccess.Write,
FileShare.Read, FileShare.Read,
IODefaults.FileStreamBufferSize, IODefaults.FileStreamBufferSize,
true); true);
await using (fileStream.ConfigureAwait(false))
await stream.CopyToAsync(fileStream).ConfigureAwait(false); {
await stream.CopyToAsync(fileStream).ConfigureAwait(false);
}
} }
Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath)); Directory.CreateDirectory(Path.GetDirectoryName(pointerCachePath));

View File

@ -209,24 +209,28 @@ namespace MediaBrowser.Api.Playback.Hls
try try
{ {
// Need to use FileShare.ReadWrite because we're reading the file at the same time it's being written // Need to use FileShare.ReadWrite because we're reading the file at the same time it's being written
using var fileStream = GetPlaylistFileStream(playlist); var fileStream = GetPlaylistFileStream(playlist);
using var reader = new StreamReader(fileStream); await using (fileStream.ConfigureAwait(false))
var count = 0;
while (!reader.EndOfStream)
{ {
var line = reader.ReadLine(); using var reader = new StreamReader(fileStream);
var count = 0;
if (line.IndexOf("#EXTINF:", StringComparison.OrdinalIgnoreCase) != -1) while (!reader.EndOfStream)
{ {
count++; var line = await reader.ReadLineAsync().ConfigureAwait(false);
if (count >= segmentCount)
if (line.IndexOf("#EXTINF:", StringComparison.OrdinalIgnoreCase) != -1)
{ {
Logger.LogDebug("Finished waiting for {0} segments in {1}", segmentCount, playlist); count++;
return; if (count >= segmentCount)
{
Logger.LogDebug("Finished waiting for {0} segments in {1}", segmentCount, playlist);
return;
}
} }
} }
} }
await Task.Delay(100, cancellationToken).ConfigureAwait(false); await Task.Delay(100, cancellationToken).ConfigureAwait(false);
} }
catch (IOException) catch (IOException)

View File

@ -720,22 +720,203 @@ namespace MediaBrowser.Api.Playback.Hls
//return state.VideoRequest.VideoBitRate.HasValue; //return state.VideoRequest.VideoBitRate.HasValue;
} }
/// <summary>
/// Get the H.26X level of the output video stream.
/// </summary>
/// <param name="state">StreamState of the current stream.</param>
/// <returns>H.26X level of the output video stream.</returns>
private int? GetOutputVideoCodecLevel(StreamState state)
{
string levelString;
if (string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)
&& state.VideoStream.Level.HasValue)
{
levelString = state.VideoStream?.Level.ToString();
}
else
{
levelString = state.GetRequestedLevel(state.ActualOutputVideoCodec);
}
if (int.TryParse(levelString, NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedLevel))
{
return parsedLevel;
}
return null;
}
/// <summary>
/// Gets a formatted string of the output audio codec, for use in the CODECS field.
/// </summary>
/// <seealso cref="AppendPlaylistCodecsField(StringBuilder, StreamState)"/>
/// <seealso cref="GetPlaylistVideoCodecs(StreamState, string, int)"/>
/// <param name="state">StreamState of the current stream.</param>
/// <returns>Formatted audio codec string.</returns>
private string GetPlaylistAudioCodecs(StreamState state)
{
if (string.Equals(state.ActualOutputAudioCodec, "aac", StringComparison.OrdinalIgnoreCase))
{
string profile = state.GetRequestedProfiles("aac").FirstOrDefault();
return HlsCodecStringFactory.GetAACString(profile);
}
else if (string.Equals(state.ActualOutputAudioCodec, "mp3", StringComparison.OrdinalIgnoreCase))
{
return HlsCodecStringFactory.GetMP3String();
}
else if (string.Equals(state.ActualOutputAudioCodec, "ac3", StringComparison.OrdinalIgnoreCase))
{
return HlsCodecStringFactory.GetAC3String();
}
else if (string.Equals(state.ActualOutputAudioCodec, "eac3", StringComparison.OrdinalIgnoreCase))
{
return HlsCodecStringFactory.GetEAC3String();
}
return string.Empty;
}
/// <summary>
/// Gets a formatted string of the output video codec, for use in the CODECS field.
/// </summary>
/// <seealso cref="AppendPlaylistCodecsField(StringBuilder, StreamState)"/>
/// <seealso cref="GetPlaylistAudioCodecs(StreamState)"/>
/// <param name="state">StreamState of the current stream.</param>
/// <returns>Formatted video codec string.</returns>
private string GetPlaylistVideoCodecs(StreamState state, string codec, int level)
{
if (level == 0)
{
// This is 0 when there's no requested H.26X level in the device profile
// and the source is not encoded in H.26X
Logger.LogError("Got invalid H.26X level when building CODECS field for HLS master playlist");
return string.Empty;
}
if (string.Equals(codec, "h264", StringComparison.OrdinalIgnoreCase))
{
string profile = state.GetRequestedProfiles("h264").FirstOrDefault();
return HlsCodecStringFactory.GetH264String(profile, level);
}
else if (string.Equals(codec, "h265", StringComparison.OrdinalIgnoreCase)
|| string.Equals(codec, "hevc", StringComparison.OrdinalIgnoreCase))
{
string profile = state.GetRequestedProfiles("h265").FirstOrDefault();
return HlsCodecStringFactory.GetH265String(profile, level);
}
return string.Empty;
}
/// <summary>
/// Appends a CODECS field containing formatted strings of
/// the active streams output video and audio codecs.
/// </summary>
/// <seealso cref="AppendPlaylist(StringBuilder, StreamState, string, int, string)"/>
/// <seealso cref="GetPlaylistVideoCodecs(StreamState, string, int)"/>
/// <seealso cref="GetPlaylistAudioCodecs(StreamState)"/>
/// <param name="builder">StringBuilder to append the field to.</param>
/// <param name="state">StreamState of the current stream.</param>
private void AppendPlaylistCodecsField(StringBuilder builder, StreamState state)
{
// Video
string videoCodecs = string.Empty;
int? videoCodecLevel = GetOutputVideoCodecLevel(state);
if (!string.IsNullOrEmpty(state.ActualOutputVideoCodec) && videoCodecLevel.HasValue)
{
videoCodecs = GetPlaylistVideoCodecs(state, state.ActualOutputVideoCodec, videoCodecLevel.Value);
}
// Audio
string audioCodecs = string.Empty;
if (!string.IsNullOrEmpty(state.ActualOutputAudioCodec))
{
audioCodecs = GetPlaylistAudioCodecs(state);
}
StringBuilder codecs = new StringBuilder();
codecs.Append(videoCodecs)
.Append(',')
.Append(audioCodecs);
if (codecs.Length > 1)
{
builder.Append(",CODECS=\"")
.Append(codecs)
.Append('"');
}
}
/// <summary>
/// Appends a FRAME-RATE field containing the framerate of the output stream.
/// </summary>
/// <seealso cref="AppendPlaylist(StringBuilder, StreamState, string, int, string)"/>
/// <param name="builder">StringBuilder to append the field to.</param>
/// <param name="state">StreamState of the current stream.</param>
private void AppendPlaylistFramerateField(StringBuilder builder, StreamState state)
{
double? framerate = null;
if (state.TargetFramerate.HasValue)
{
framerate = Math.Round(state.TargetFramerate.GetValueOrDefault(), 3);
}
else if (state.VideoStream.RealFrameRate.HasValue)
{
framerate = Math.Round(state.VideoStream.RealFrameRate.GetValueOrDefault(), 3);
}
if (framerate.HasValue)
{
builder.Append(",FRAME-RATE=\"")
.Append(framerate.Value)
.Append('"');
}
}
/// <summary>
/// Appends a RESOLUTION field containing the resolution of the output stream.
/// </summary>
/// <seealso cref="AppendPlaylist(StringBuilder, StreamState, string, int, string)"/>
/// <param name="builder">StringBuilder to append the field to.</param>
/// <param name="state">StreamState of the current stream.</param>
private void AppendPlaylistResolutionField(StringBuilder builder, StreamState state)
{
if (state.OutputWidth.HasValue && state.OutputHeight.HasValue)
{
builder.Append(",RESOLUTION=\"")
.Append(state.OutputWidth.GetValueOrDefault())
.Append('x')
.Append(state.OutputHeight.GetValueOrDefault())
.Append('"');
}
}
private void AppendPlaylist(StringBuilder builder, StreamState state, string url, int bitrate, string subtitleGroup) private void AppendPlaylist(StringBuilder builder, StreamState state, string url, int bitrate, string subtitleGroup)
{ {
var header = "#EXT-X-STREAM-INF:BANDWIDTH=" + bitrate.ToString(CultureInfo.InvariantCulture) + ",AVERAGE-BANDWIDTH=" + bitrate.ToString(CultureInfo.InvariantCulture); builder.Append("#EXT-X-STREAM-INF:BANDWIDTH=")
.Append(bitrate.ToString(CultureInfo.InvariantCulture))
.Append(",AVERAGE-BANDWIDTH=")
.Append(bitrate.ToString(CultureInfo.InvariantCulture));
// tvos wants resolution, codecs, framerate AppendPlaylistCodecsField(builder, state);
//if (state.TargetFramerate.HasValue)
//{ AppendPlaylistResolutionField(builder, state);
// header += string.Format(",FRAME-RATE=\"{0}\"", state.TargetFramerate.Value.ToString(CultureInfo.InvariantCulture));
//} AppendPlaylistFramerateField(builder, state);
if (!string.IsNullOrWhiteSpace(subtitleGroup)) if (!string.IsNullOrWhiteSpace(subtitleGroup))
{ {
header += string.Format(",SUBTITLES=\"{0}\"", subtitleGroup); builder.Append(",SUBTITLES=\"")
.Append(subtitleGroup)
.Append('"');
} }
builder.AppendLine(header); builder.Append(Environment.NewLine);
builder.AppendLine(url); builder.AppendLine(url);
} }

View File

@ -0,0 +1,126 @@
using System;
using System.Text;
namespace MediaBrowser.Api.Playback
{
/// <summary>
/// Get various codec strings for use in HLS playlists.
/// </summary>
static class HlsCodecStringFactory
{
/// <summary>
/// Gets a MP3 codec string.
/// </summary>
/// <returns>MP3 codec string.</returns>
public static string GetMP3String()
{
return "mp4a.40.34";
}
/// <summary>
/// Gets an AAC codec string.
/// </summary>
/// <param name="profile">AAC profile.</param>
/// <returns>AAC codec string.</returns>
public static string GetAACString(string profile)
{
StringBuilder result = new StringBuilder("mp4a", 9);
if (string.Equals(profile, "HE", StringComparison.OrdinalIgnoreCase))
{
result.Append(".40.5");
}
else
{
// Default to LC if profile is invalid
result.Append(".40.2");
}
return result.ToString();
}
/// <summary>
/// Gets a H.264 codec string.
/// </summary>
/// <param name="profile">H.264 profile.</param>
/// <param name="level">H.264 level.</param>
/// <returns>H.264 string.</returns>
public static string GetH264String(string profile, int level)
{
StringBuilder result = new StringBuilder("avc1", 11);
if (string.Equals(profile, "high", StringComparison.OrdinalIgnoreCase))
{
result.Append(".6400");
}
else if (string.Equals(profile, "main", StringComparison.OrdinalIgnoreCase))
{
result.Append(".4D40");
}
else if (string.Equals(profile, "baseline", StringComparison.OrdinalIgnoreCase))
{
result.Append(".42E0");
}
else
{
// Default to constrained baseline if profile is invalid
result.Append(".4240");
}
string levelHex = level.ToString("X2");
result.Append(levelHex);
return result.ToString();
}
/// <summary>
/// Gets a H.265 codec string.
/// </summary>
/// <param name="profile">H.265 profile.</param>
/// <param name="level">H.265 level.</param>
/// <returns>H.265 string.</returns>
public static string GetH265String(string profile, int level)
{
// The h265 syntax is a bit of a mystery at the time this comment was written.
// This is what I've found through various sources:
// FORMAT: [codecTag].[profile].[constraint?].L[level * 30].[UNKNOWN]
StringBuilder result = new StringBuilder("hev1", 16);
if (string.Equals(profile, "main10", StringComparison.OrdinalIgnoreCase))
{
result.Append(".2.6");
}
else
{
// Default to main if profile is invalid
result.Append(".1.6");
}
result.Append(".L")
.Append(level * 3)
.Append(".B0");
return result.ToString();
}
/// <summary>
/// Gets an AC-3 codec string.
/// </summary>
/// <returns>AC-3 codec string.</returns>
public static string GetAC3String()
{
return "mp4a.a5";
}
/// <summary>
/// Gets an E-AC-3 codec string.
/// </summary>
/// <returns>E-AC-3 codec string.</returns>
public static string GetEAC3String()
{
return "mp4a.a6";
}
}
}

View File

@ -35,7 +35,7 @@ namespace MediaBrowser.Api
} }
[Route("/Users/Public", "GET", Summary = "Gets a list of publicly visible users for display on a login screen.")] [Route("/Users/Public", "GET", Summary = "Gets a list of publicly visible users for display on a login screen.")]
public class GetPublicUsers : IReturn<UserDto[]> public class GetPublicUsers : IReturn<PublicUserDto[]>
{ {
} }
@ -266,22 +266,38 @@ namespace MediaBrowser.Api
_authContext = authContext; _authContext = authContext;
} }
/// <summary>
/// Gets the public available Users information
/// </summary>
/// <param name="request">The request.</param>
/// <returns>System.Object.</returns>
public object Get(GetPublicUsers request) public object Get(GetPublicUsers request)
{ {
// If the startup wizard hasn't been completed then just return all users var result = _userManager
if (!ServerConfigurationManager.Configuration.IsStartupWizardCompleted) .Users
.Where(item => !item.Policy.IsDisabled);
if (ServerConfigurationManager.Configuration.IsStartupWizardCompleted)
{ {
return Get(new GetUsers var deviceId = _authContext.GetAuthorizationInfo(Request).DeviceId;
result = result.Where(item => !item.Policy.IsHidden);
if (!string.IsNullOrWhiteSpace(deviceId))
{ {
IsDisabled = false result = result.Where(i => _deviceManager.CanAccessDevice(i, deviceId));
}); }
if (!_networkManager.IsInLocalNetwork(Request.RemoteIp))
{
result = result.Where(i => i.Policy.EnableRemoteAccess);
}
} }
return Get(new GetUsers return ToOptimizedResult(result
{ .OrderBy(u => u.Name)
IsHidden = false, .Select(i => _userManager.GetPublicUserDto(i, Request.RemoteIp))
IsDisabled = false .ToArray()
}, true, true); );
} }
/// <summary> /// <summary>

View File

@ -143,6 +143,14 @@ namespace MediaBrowser.Controller.Library
/// <returns>UserDto.</returns> /// <returns>UserDto.</returns>
UserDto GetUserDto(User user, string remoteEndPoint = null); UserDto GetUserDto(User user, string remoteEndPoint = null);
/// <summary>
/// Gets the user public dto.
/// </summary>
/// <param name="user">Ther user.</param>\
/// <param name="remoteEndPoint">The remote end point.</param>
/// <returns>A public UserDto, aka a UserDto stripped of personal data.</returns>
PublicUserDto GetPublicUserDto(User user, string remoteEndPoint = null);
/// <summary> /// <summary>
/// Authenticates the user. /// Authenticates the user.
/// </summary> /// </summary>

View File

@ -1,8 +1,8 @@
#pragma warning disable CS1591 #pragma warning disable CS1591
using System; using System;
using System.Linq;
using System.Xml.Serialization; using System.Xml.Serialization;
using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Dlna namespace MediaBrowser.Model.Dlna
{ {
@ -57,7 +57,7 @@ namespace MediaBrowser.Model.Dlna
foreach (var val in codec) foreach (var val in codec)
{ {
if (ListHelper.ContainsIgnoreCase(codecs, val)) if (codecs.Contains(val, StringComparer.OrdinalIgnoreCase))
{ {
return true; return true;
} }

View File

@ -1,8 +1,8 @@
#pragma warning disable CS1591 #pragma warning disable CS1591
using System; using System;
using System.Linq;
using System.Globalization; using System.Globalization;
using MediaBrowser.Model.Extensions;
using MediaBrowser.Model.MediaInfo; using MediaBrowser.Model.MediaInfo;
namespace MediaBrowser.Model.Dlna namespace MediaBrowser.Model.Dlna
@ -167,9 +167,7 @@ namespace MediaBrowser.Model.Dlna
switch (condition.Condition) switch (condition.Condition)
{ {
case ProfileConditionType.EqualsAny: case ProfileConditionType.EqualsAny:
{ return expected.Split('|').Contains(currentValue, StringComparer.OrdinalIgnoreCase);
return ListHelper.ContainsIgnoreCase(expected.Split('|'), currentValue);
}
case ProfileConditionType.Equals: case ProfileConditionType.Equals:
return string.Equals(currentValue, expected, StringComparison.OrdinalIgnoreCase); return string.Equals(currentValue, expected, StringComparison.OrdinalIgnoreCase);
case ProfileConditionType.NotEquals: case ProfileConditionType.NotEquals:

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