mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-01 07:51:54 +01:00
Compare commits
14 Commits
v10.11.0-r
...
v10.11.0-r
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6cd73df03 | ||
|
|
71ebb1f456 | ||
|
|
9c298c52f5 | ||
|
|
3e8db40901 | ||
|
|
f9ead9615c | ||
|
|
93af2d6f67 | ||
|
|
027c91949d | ||
|
|
526ec83305 | ||
|
|
dfcacce1b0 | ||
|
|
2a54669a8a | ||
|
|
54d48fa446 | ||
|
|
1736a566cc | ||
|
|
04ab362e59 | ||
|
|
e282b05b8f |
6
.github/workflows/ci-codeql-analysis.yml
vendored
6
.github/workflows/ci-codeql-analysis.yml
vendored
@@ -27,11 +27,11 @@ jobs:
|
||||
dotnet-version: '9.0.x'
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
queries: +security-extended
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.30.3
|
||||
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
|
||||
|
||||
2
.github/workflows/ci-compat.yml
vendored
2
.github/workflows/ci-compat.yml
vendored
@@ -105,7 +105,7 @@ jobs:
|
||||
run: |
|
||||
{
|
||||
echo 'body<<EOF'
|
||||
for file in Jellyfin.Data.dll MediaBrowser.Common.dll MediaBrowser.Controller.dll MediaBrowser.Model.dll Emby.Naming.dll Jellyfin.Extensions.dll Jellyfin.MediaEncoding.Keyframes.dll Jellyfin.Database.Implementations.dll; do
|
||||
for file in Jellyfin.Data.dll MediaBrowser.Common.dll MediaBrowser.Controller.dll MediaBrowser.Model.dll Emby.Naming.dll Jellyfin.Extensions.dll Jellyfin.MediaEncoding.Keyframes.dll Jellyfin.Database.Implementations.dll Jellyfin.CodeAnalysis.dll; do
|
||||
COMPAT_OUTPUT="$( { apicompat --left ./abi-base/${file} --right ./abi-head/${file}; } 2>&1 )"
|
||||
if [ "APICompat ran successfully without finding any breaking changes." != "${COMPAT_OUTPUT}" ]; then
|
||||
printf "\n${file}\n${COMPAT_OUTPUT}\n"
|
||||
|
||||
2
.github/workflows/ci-tests.yml
vendored
2
.github/workflows/ci-tests.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
--verbosity minimal
|
||||
|
||||
- name: Merge code coverage results
|
||||
uses: danielpalme/ReportGenerator-GitHub-Action@18e0cd4c1bebd0c8b3978b380a6a4ea61c51178e # v5.4.15
|
||||
uses: danielpalme/ReportGenerator-GitHub-Action@1978db745da4a573ca4baa2d0f67175df51a148c # v5.4.16
|
||||
with:
|
||||
reports: "**/coverage.cobertura.xml"
|
||||
targetdir: "merged/"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<PackageVersion Include="DiscUtils.Udf" Version="0.16.13" />
|
||||
<PackageVersion Include="DotNet.Glob" Version="3.1.3" />
|
||||
<PackageVersion Include="FsCheck.Xunit" Version="3.3.1" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="8.3.1.2" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="8.3.1.1" />
|
||||
<PackageVersion Include="ICU4N.Transliterator" Version="60.1.0-alpha.356" />
|
||||
<PackageVersion Include="IDisposableAnalyzers" Version="4.0.8" />
|
||||
<PackageVersion Include="Ignore" Version="0.2.1" />
|
||||
@@ -62,7 +62,7 @@
|
||||
<PackageVersion Include="prometheus-net.AspNetCore" Version="8.2.1" />
|
||||
<PackageVersion Include="prometheus-net.DotNetRuntime" Version="4.4.1" />
|
||||
<PackageVersion Include="prometheus-net" Version="8.2.1" />
|
||||
<PackageVersion Include="Polly" Version="8.6.3" />
|
||||
<PackageVersion Include="Polly" Version="8.6.4" />
|
||||
<PackageVersion Include="Serilog.AspNetCore" Version="9.0.0" />
|
||||
<PackageVersion Include="Serilog.Enrichers.Thread" Version="4.0.0" />
|
||||
<PackageVersion Include="Serilog.Expressions" Version="5.0.0" />
|
||||
@@ -74,9 +74,9 @@
|
||||
<PackageVersion Include="SerilogAnalyzer" Version="0.15.0" />
|
||||
<PackageVersion Include="SharpFuzz" Version="2.2.0" />
|
||||
<!-- Pinned to 3.116.1 because https://github.com/jellyfin/jellyfin/pull/14255 -->
|
||||
<PackageVersion Include="SkiaSharp" Version="3.119.1" />
|
||||
<PackageVersion Include="SkiaSharp.HarfBuzz" Version="3.119.1" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="3.119.1" />
|
||||
<PackageVersion Include="SkiaSharp" Version="3.116.1" />
|
||||
<PackageVersion Include="SkiaSharp.HarfBuzz" Version="3.116.1" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="3.116.1" />
|
||||
<PackageVersion Include="SmartAnalyzers.MultithreadingAnalyzer" Version="1.1.31" />
|
||||
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
|
||||
<PackageVersion Include="Svg.Skia" Version="3.2.1" />
|
||||
|
||||
@@ -43,5 +43,75 @@
|
||||
"NameInstallFailed": "Ye couldn't bring {0} aboard yer ship",
|
||||
"MessageApplicationUpdatedTo": "Yer Map of the Seas has been scribbled with {0}",
|
||||
"MessageNamedServerConfigurationUpdatedWithValue": "Yer Map Drawer has been rescribbled to {0}",
|
||||
"MessageServerConfigurationUpdated": "Yer Map drawer has been rescribbled"
|
||||
"MessageServerConfigurationUpdated": "Yer Map drawer has been rescribbled",
|
||||
"Inherit": "Carry on what be passed along",
|
||||
"Latest": "Newfangled",
|
||||
"Movies": "Moving pictures",
|
||||
"NewVersionIsAvailable": "A fresh build o’ Jellyfin Server be waitin’ fer ye to fetch.",
|
||||
"NotificationOptionPluginInstalled": "Plugin nailed down",
|
||||
"NotificationOptionVideoPlayback": "Video playback be underway",
|
||||
"ScheduledTaskFailedWithName": "{0} ran aground",
|
||||
"StartupEmbyServerIsLoading": "Jellyfin Server be preparin’ the ship. Try yer luck again soon.",
|
||||
"UserOfflineFromDevice": "{0} severed ties with {1}",
|
||||
"UserDownloadingItemWithValues": "{0} be haulin’ in {1}",
|
||||
"UserStartedPlayingItemWithValues": "{0} be playin’ {1} aboard {2}",
|
||||
"ValueHasBeenAddedToLibrary": "{0} be stashed in yer treasure trove",
|
||||
"TaskCleanCacheDescription": "Wipes away cache cargo no longer called fer.",
|
||||
"TaskCleanLogsDescription": "Clears the logbook o’ entries older than {0} days.",
|
||||
"TaskRefreshPeopleDescription": "Refreshes the charts fer actors an’ directors in yer Treasure Trove.",
|
||||
"UserLockedOutWithName": "Matey {0} be denied boarding",
|
||||
"TaskAudioNormalization": "Steadyin’ the shanties",
|
||||
"TaskAudioNormalizationDescription": "Scans files fer shanty steadiyin’ data.",
|
||||
"HeaderRecordingGroups": "Loggin' Groups",
|
||||
"MusicVideos": "Shanty films",
|
||||
"Playlists": "Lists o’ plunder",
|
||||
"Plugin": "Extra sail",
|
||||
"NotificationOptionVideoPlaybackStopped": "Video playback dropped anchor",
|
||||
"NameSeasonNumber": "Saga {0}",
|
||||
"NameSeasonUnknown": "Saga be Lost",
|
||||
"NotificationOptionApplicationUpdateAvailable": "A fresh build awaits",
|
||||
"NotificationOptionApplicationUpdateInstalled": "App upgrade be aboard",
|
||||
"NotificationOptionAudioPlayback": "Audio playback be rollin",
|
||||
"NotificationOptionAudioPlaybackStopped": "Audio playback dropped anchor",
|
||||
"NotificationOptionCameraImageUploaded": "Spyglass shot be hoisted",
|
||||
"NotificationOptionInstallationFailed": "Install be wrecked",
|
||||
"NotificationOptionNewLibraryContent": "Fresh plunder ready to claim",
|
||||
"NotificationOptionPluginError": "Plugin ran aground",
|
||||
"NotificationOptionPluginUninstalled": "Plugin cast overboard",
|
||||
"NotificationOptionPluginUpdateInstalled": "Plugin patched ‘n ready",
|
||||
"NotificationOptionServerRestartRequired": "Server be due fer a restart",
|
||||
"NotificationOptionTaskFailed": "Set chore went overboard",
|
||||
"TaskRefreshLibraryDescription": "Searches the Treasure Trove fer new plunder ‘n updates the charts.",
|
||||
"PluginInstalledWithName": "{0} nailed down",
|
||||
"TaskCleanLogs": "Swab the Log Hold",
|
||||
"TaskRefreshPeople": "Freshen the Mateys",
|
||||
"PluginUninstalledWithName": "{0} sent t’ Davy Jones",
|
||||
"PluginUpdatedWithName": "{0} patched ‘n ready",
|
||||
"ProviderValue": "Supplier o’ goods: {0}",
|
||||
"ScheduledTaskStartedWithName": "{0} set sail",
|
||||
"ServerNameNeedsToBeRestarted": "{0} be cravin’ a restart",
|
||||
"Shows": "Sagas",
|
||||
"SubtitleDownloadFailureFromForItem": "Subtitles be sunk fetchin’ from {0} fer {1}",
|
||||
"Sync": "Match the tides",
|
||||
"System": "The ship’s works",
|
||||
"TvShows": "TV Sagas",
|
||||
"Undefined": "Uncharted",
|
||||
"User": "Matey",
|
||||
"UserCreatedWithName": "Matey {0} joined the crew",
|
||||
"UserDeletedWithName": "Matey {0} cast overboard",
|
||||
"UserOnlineFromDevice": "{0} be aboard ship from {1}",
|
||||
"UserPasswordChangedWithName": "New passphrase set fer Matey {0}",
|
||||
"UserPolicyUpdatedWithName": "Ship rules be changed fer {0}",
|
||||
"UserStoppedPlayingItemWithValues": "{0} be done playin’ {1} on {2",
|
||||
"ValueSpecialEpisodeName": "Special Tale – {0}",
|
||||
"VersionNumber": "Edition {0}",
|
||||
"TasksMaintenanceCategory": "Hull patchin’",
|
||||
"TasksLibraryCategory": "Treasure Trove",
|
||||
"TasksApplicationCategory": "Ship",
|
||||
"TaskCleanActivityLog": "Clear the Ship’s Log",
|
||||
"TaskCleanActivityLogDescription": "Purges ship’s logs older than the chosen time.",
|
||||
"TaskCleanCache": "Sweep the Cache Chest",
|
||||
"TaskRefreshChapterImages": "Claim chapter portraits",
|
||||
"TaskRefreshChapterImagesDescription": "Paints wee portraits fer videos that own chapters.",
|
||||
"TaskRefreshLibrary": "Scan the Treasure Trove"
|
||||
}
|
||||
|
||||
@@ -74,6 +74,11 @@ public class PeopleRepository(IDbContextFactory<JellyfinDbContext> dbProvider, I
|
||||
/// <inheritdoc />
|
||||
public void UpdatePeople(Guid itemId, IReadOnlyList<PersonInfo> people)
|
||||
{
|
||||
foreach (var item in people.Where(e => e.Role is null))
|
||||
{
|
||||
item.Role = string.Empty;
|
||||
}
|
||||
|
||||
// multiple metadata providers can provide the _same_ person
|
||||
people = people.DistinctBy(e => e.Name + "-" + e.Type).ToArray();
|
||||
var personKeys = people.Select(e => e.Name + "-" + e.Type).ToArray();
|
||||
@@ -99,33 +104,35 @@ public class PeopleRepository(IDbContextFactory<JellyfinDbContext> dbProvider, I
|
||||
|
||||
var existingMaps = context.PeopleBaseItemMap.Include(e => e.People).Where(e => e.ItemId == itemId).ToList();
|
||||
|
||||
var maxSortOrder = Math.Max(
|
||||
context.PeopleBaseItemMap.Include(e => e.People).Where(e => e.ItemId == itemId && e.People.PersonType == PersonKind.Actor.ToString()).Max(e => (int?)e.SortOrder) ?? 0,
|
||||
people.Where(p => p.Type == PersonKind.Actor && p.SortOrder.HasValue).Max(p => (int?)p.SortOrder) ?? 0);
|
||||
var listOrder = 0;
|
||||
|
||||
foreach (var person in people)
|
||||
{
|
||||
var entityPerson = personsEntities.First(e => e.Name == person.Name && e.PersonType == person.Type.ToString());
|
||||
var existingMap = existingMaps.FirstOrDefault(e => e.People.Name == person.Name && e.Role == person.Role);
|
||||
var existingMap = existingMaps.FirstOrDefault(e => e.People.Name == person.Name && e.People.PersonType == person.Type.ToString() && e.Role == person.Role);
|
||||
if (existingMap is null)
|
||||
{
|
||||
var sortOrder = person.Type == PersonKind.Actor ? (person.SortOrder ?? ++maxSortOrder) : person.SortOrder;
|
||||
context.PeopleBaseItemMap.Add(new PeopleBaseItemMap()
|
||||
{
|
||||
Item = null!,
|
||||
ItemId = itemId,
|
||||
People = null!,
|
||||
PeopleId = entityPerson.Id,
|
||||
ListOrder = sortOrder,
|
||||
SortOrder = sortOrder,
|
||||
ListOrder = listOrder,
|
||||
SortOrder = person.SortOrder,
|
||||
Role = person.Role
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// Update the order for existing mappings
|
||||
existingMap.ListOrder = listOrder;
|
||||
existingMap.SortOrder = person.SortOrder;
|
||||
// person mapping already exists so remove from list
|
||||
existingMaps.Remove(existingMap);
|
||||
}
|
||||
|
||||
listOrder++;
|
||||
}
|
||||
|
||||
context.PeopleBaseItemMap.RemoveRange(existingMaps);
|
||||
|
||||
@@ -186,6 +186,11 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
|
||||
foreach (SqliteDataReader dto in connection.Query(itemValueQuery))
|
||||
{
|
||||
var itemId = dto.GetGuid(0);
|
||||
if (!baseItemIds.Contains(itemId))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var entity = GetItemValue(dto);
|
||||
var key = ((int)entity.Type, entity.Value);
|
||||
if (!localItems.TryGetValue(key, out var existing))
|
||||
|
||||
@@ -53,5 +53,13 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
Task<string> GetSubtitleFilePath(MediaStream subtitleStream, MediaSourceInfo mediaSource, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Extracts all extractable subtitles (text and pgs).
|
||||
/// </summary>
|
||||
/// <param name="mediaSource">The mediaSource.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task ExtractAllExtractableSubtitles(MediaSourceInfo mediaSource, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,13 +477,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles
|
||||
|| string.Equals(codec, "pgssub", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Extracts all extractable subtitles (text and pgs).
|
||||
/// </summary>
|
||||
/// <param name="mediaSource">The mediaSource.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
private async Task ExtractAllExtractableSubtitles(MediaSourceInfo mediaSource, CancellationToken cancellationToken)
|
||||
/// <inheritdoc />
|
||||
public async Task ExtractAllExtractableSubtitles(MediaSourceInfo mediaSource, CancellationToken cancellationToken)
|
||||
{
|
||||
var locks = new List<IDisposable>();
|
||||
var extractableStreams = new List<MediaStream>();
|
||||
|
||||
@@ -437,12 +437,12 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
{
|
||||
audio.TrySetProviderId(MetadataProvider.MusicBrainzRecording, recordingMbId);
|
||||
}
|
||||
else if (TryGetSanitizedAdditionalFields(track, "UFID", out var ufIdValue) && !string.IsNullOrEmpty(ufIdValue))
|
||||
else if (TryGetSanitizedUFIDFields(track, out var owner, out var identifier) && !string.IsNullOrEmpty(owner) && !string.IsNullOrEmpty(identifier))
|
||||
{
|
||||
// If tagged with MB Picard, the format is 'http://musicbrainz.org\0<recording MBID>'
|
||||
if (ufIdValue.Contains("musicbrainz.org", StringComparison.OrdinalIgnoreCase))
|
||||
if (owner.Contains("musicbrainz.org", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
audio.TrySetProviderId(MetadataProvider.MusicBrainzRecording, ufIdValue.AsSpan().RightPart('\0').ToString());
|
||||
audio.TrySetProviderId(MetadataProvider.MusicBrainzRecording, identifier);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -537,5 +537,24 @@ namespace MediaBrowser.Providers.MediaInfo
|
||||
value = GetSanitizedStringTag(value, track.Path);
|
||||
return hasField;
|
||||
}
|
||||
|
||||
private bool TryGetSanitizedUFIDFields(Track track, out string? owner, out string? identifier)
|
||||
{
|
||||
var hasField = track.AdditionalFields.TryGetValue("UFID", out string? value);
|
||||
if (hasField && !string.IsNullOrEmpty(value))
|
||||
{
|
||||
string[] parts = value.Split('\0');
|
||||
if (parts.Length == 2)
|
||||
{
|
||||
owner = GetSanitizedStringTag(parts[0], track.Path);
|
||||
identifier = GetSanitizedStringTag(parts[1], track.Path);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
owner = null;
|
||||
identifier = null;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,24 @@
|
||||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
|
||||
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(Stability)'=='Unstable'">
|
||||
<!-- Include all symbols in the main nupkg until Azure Artifact Feed starts supporting ingesting NuGet symbol packages. -->
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Authors>Jellyfin Contributors</Authors>
|
||||
<PackageId>Jellyfin.CodeAnalysis</PackageId>
|
||||
<VersionPrefix>10.11.0</VersionPrefix>
|
||||
<RepositoryUrl>https://github.com/jellyfin/jellyfin</RepositoryUrl>
|
||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -12,7 +12,7 @@ public class PeopleBaseItemMapConfiguration : IEntityTypeConfiguration<PeopleBas
|
||||
/// <inheritdoc/>
|
||||
public void Configure(EntityTypeBuilder<PeopleBaseItemMap> builder)
|
||||
{
|
||||
builder.HasKey(e => new { e.ItemId, e.PeopleId });
|
||||
builder.HasKey(e => new { e.ItemId, e.PeopleId, e.Role });
|
||||
builder.HasIndex(e => new { e.ItemId, e.SortOrder });
|
||||
builder.HasIndex(e => new { e.ItemId, e.ListOrder });
|
||||
builder.HasOne(e => e.Item);
|
||||
|
||||
@@ -10,6 +10,28 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.Sql("""
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
DELETE FROM BaseItems
|
||||
WHERE
|
||||
ParentId IS NOT NULL
|
||||
AND
|
||||
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
|
||||
""");
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_BaseItems_BaseItems_ParentId",
|
||||
table: "BaseItems",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace Jellyfin.Server.Implementations.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ExtendPeopleMapKey : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PeopleBaseItemMap",
|
||||
table: "PeopleBaseItemMap");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Role",
|
||||
table: "PeopleBaseItemMap",
|
||||
type: "TEXT",
|
||||
nullable: false,
|
||||
defaultValue: string.Empty,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT",
|
||||
oldNullable: true);
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PeopleBaseItemMap",
|
||||
table: "PeopleBaseItemMap",
|
||||
columns: new[] { "ItemId", "PeopleId", "Role" });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropPrimaryKey(
|
||||
name: "PK_PeopleBaseItemMap",
|
||||
table: "PeopleBaseItemMap");
|
||||
|
||||
migrationBuilder.AlterColumn<string>(
|
||||
name: "Role",
|
||||
table: "PeopleBaseItemMap",
|
||||
type: "TEXT",
|
||||
nullable: true,
|
||||
oldClrType: typeof(string),
|
||||
oldType: "TEXT");
|
||||
|
||||
migrationBuilder.AddPrimaryKey(
|
||||
name: "PK_PeopleBaseItemMap",
|
||||
table: "PeopleBaseItemMap",
|
||||
columns: new[] { "ItemId", "PeopleId" });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -999,16 +999,16 @@ namespace Jellyfin.Server.Implementations.Migrations
|
||||
b.Property<Guid>("PeopleId")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("ListOrder")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<string>("Role")
|
||||
.HasColumnType("TEXT");
|
||||
|
||||
b.Property<int?>("ListOrder")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.Property<int?>("SortOrder")
|
||||
.HasColumnType("INTEGER");
|
||||
|
||||
b.HasKey("ItemId", "PeopleId");
|
||||
b.HasKey("ItemId", "PeopleId", "Role");
|
||||
|
||||
b.HasIndex("PeopleId");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user