Compare commits

...

8 Commits

Author SHA1 Message Date
Joshua M. Boniface
d483c3efe6 Merge pull request #14887 from JPVenson/bugfix/fixMigrationReferences
Some checks failed
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
Stale Issue Labeler / Check for stale issues (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled
Add explicit reference check to migration
2025-09-28 12:44:09 -04:00
Joshua M. Boniface
275c1a3cc1 Merge pull request #14883 from crobibero/code-analysis
Only include custom code analysis for debug builds
2025-09-28 12:34:21 -04:00
Joshua M. Boniface
4942b2c15f Merge pull request #14890 from nielsvanvelzen/destructive-migration
Fix AddProperParentChildRelationBaseItemWithCascade migration deleting all items
2025-09-28 12:26:40 -04:00
Niels van Velzen
3fc71293b4 Fix AddProperParentChildRelationBaseItemWithCascade migration deleting all items 2025-09-28 13:14:10 +02:00
JPVenson
8ea9bece03 Add explicit reference check to migration 2025-09-28 08:46:31 +00:00
Nicolas N
baa7f5f0b0 Translated using Weblate (Haitian)
Some checks failed
CodeQL / Analyze (csharp) (push) Has been cancelled
OpenAPI / OpenAPI - HEAD (push) Has been cancelled
OpenAPI / OpenAPI - BASE (push) Has been cancelled
OpenAPI / OpenAPI - Difference (push) Has been cancelled
OpenAPI / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI / OpenAPI - Publish Stable Spec (push) Has been cancelled
Tests / run-tests (macos-latest) (push) Has been cancelled
Tests / run-tests (ubuntu-latest) (push) Has been cancelled
Tests / run-tests (windows-latest) (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ht/
2025-09-28 06:47:40 +00:00
Cody Robibero
b9c96f3d2c Revert "Add Jellyfin.CodeAnalysis project to abi diff (#14875)"
This reverts commit 526ec83305.
2025-09-27 16:41:01 -06:00
Cody Robibero
08f9b932ac Only include CodeAnalysis in debug mode 2025-09-27 16:39:40 -06:00
6 changed files with 95 additions and 27 deletions

View File

@@ -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 Jellyfin.CodeAnalysis.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; 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"

View File

@@ -20,7 +20,7 @@
</ItemGroup>
<!-- Custom Analyzers -->
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'Jellyfin.CodeAnalysis' ">
<ItemGroup Condition=" '$(MSBuildProjectName)' != 'Jellyfin.CodeAnalysis' AND '$(Configuration)' == 'Debug' ">
<ProjectReference Include="$(MSBuildThisFileDirectory)src/Jellyfin.CodeAnalysis/Jellyfin.CodeAnalysis.csproj" OutputItemType="Analyzer" />
</ItemGroup>

View File

@@ -1,3 +1,62 @@
{
"Books": "liv"
"Books": "Liv",
"TasksLibraryCategory": "Libreri",
"Albums": "Albòm yo",
"Artists": "Atis yo",
"Application": "Aplikasyon",
"Channels": "Kanal yo",
"ChapterNameValue": "Chapit {0}",
"Default": "Defo",
"DeviceOnlineWithName": "{0} konekte",
"DeviceOfflineWithName": "{0} dekonekte",
"External": "Extèn",
"Collections": "Koleksyon yo",
"Favorites": "Pi Renmen",
"Folders": "Dosye",
"Genres": "Jan yo",
"Forced": "Fòse",
"HeaderAlbumArtists": "Albòm Atis",
"HeaderContinueWatching": "Kontinye Kade",
"HeaderFavoriteAlbums": "Albòm Pi Renmen",
"HeaderFavoriteArtists": "Atis Pi Renmen",
"HeaderFavoriteEpisodes": "Epizòd Pi Renmen",
"HeaderFavoriteShows": "Emisyon Pi Renmen",
"HeaderFavoriteSongs": "Mizik Pi Renmen",
"HeaderLiveTV": "Televizyon an Direk",
"HeaderNextUp": "Pwochen an",
"HomeVideos": "Videyo Lakay",
"Latest": "Pi Resan",
"MessageApplicationUpdated": "Sèvè Jellyfin met a jou",
"MessageApplicationUpdatedTo": "Sèvè Jellyfin met a jou sou {0}",
"Movies": "Fim",
"MixedContent": "Kontni Melanje",
"Music": "Mizik",
"MusicVideos": "Videyo Mizik",
"NameInstallFailed": "{0} enstalasyon fe fayit",
"NameSeasonNumber": "Sezon {0}",
"NameSeasonUnknown": "Sezon Enkoni",
"NotificationOptionCameraImageUploaded": "Imaj Kamera telechaje",
"NotificationOptionInstallationFailed": "Enstalasyon echwe",
"Photos": "Foto",
"PluginInstalledWithName": "{0} te enstale",
"PluginUninstalledWithName": "{0} te dezenstale",
"PluginUpdatedWithName": "{0} te mi a jou",
"ScheduledTaskFailedWithName": "{0} echwe",
"ScheduledTaskStartedWithName": "{0} komanse",
"Songs": "Mizik yo",
"Shows": "Emisyon yo",
"System": "Sistèm",
"TvShows": "Emisyon Tele",
"User": "Itilizatè",
"UserCreatedWithName": "Itilizatè {0} kreye",
"UserDeletedWithName": "Itilizatè {0} a efase",
"UserDownloadingItemWithValues": "{0} ap telechaje {1}",
"UserOfflineFromDevice": "{0} dekonekte de {1}",
"UserStartedPlayingItemWithValues": "{0} ap jwe {1} sou {2}",
"UserStoppedPlayingItemWithValues": "{0} fin jwe {1} sou {2}",
"UserPasswordChangedWithName": "Modpas la chanje pou Itilizatè {0}",
"ValueSpecialEpisodeName": "Spesyal - {0}",
"VersionNumber": "Vesyon {0}",
"TasksApplicationCategory": "Aplikasyon",
"TasksMaintenanceCategory": "Antretyen"
}

View File

@@ -257,6 +257,11 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
continue;
}
if (!baseItemIds.Contains(refItem.Id))
{
continue;
}
userData.ItemId = refItem.Id;
operation.JellyfinDbContext.UserData.Add(userData);
}
@@ -287,7 +292,13 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
{
foreach (SqliteDataReader dto in connection.Query(mediaStreamQuery))
{
operation.JellyfinDbContext.MediaStreamInfos.Add(GetMediaStream(dto));
var entity = GetMediaStream(dto);
if (!baseItemIds.Contains(entity.ItemId))
{
continue;
}
operation.JellyfinDbContext.MediaStreamInfos.Add(entity);
}
}
@@ -310,7 +321,13 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
{
foreach (SqliteDataReader dto in connection.Query(mediaAttachmentQuery))
{
operation.JellyfinDbContext.AttachmentStreamInfos.Add(GetMediaAttachment(dto));
var entity = GetMediaAttachment(dto);
if (!baseItemIds.Contains(entity.ItemId))
{
continue;
}
operation.JellyfinDbContext.AttachmentStreamInfos.Add(entity);
}
}
@@ -396,6 +413,11 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
foreach (SqliteDataReader dto in connection.Query(chapterQuery))
{
var chapter = GetChapter(dto);
if (!baseItemIds.Contains(chapter.ItemId))
{
continue;
}
operation.JellyfinDbContext.Chapters.Add(chapter);
}
}
@@ -422,6 +444,11 @@ internal class MigrateLibraryDb : IDatabaseMigrationRoutine
foreach (SqliteDataReader dto in connection.Query(ancestorIdsQuery))
{
var ancestorId = GetAncestorId(dto);
if (!baseItemIds.Contains(ancestorId.ItemId) || !baseItemIds.Contains(ancestorId.ParentItemId))
{
continue;
}
operation.JellyfinDbContext.AncestorIds.Add(ancestorId);
}
}

View File

@@ -7,24 +7,6 @@
<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>

View File

@@ -15,22 +15,22 @@ DELETE FROM BaseItems
WHERE
ParentId IS NOT NULL
AND
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
DELETE FROM BaseItems
WHERE
ParentId IS NOT NULL
AND
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
DELETE FROM BaseItems
WHERE
ParentId IS NOT NULL
AND
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
DELETE FROM BaseItems
WHERE
ParentId IS NOT NULL
AND
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE ParentId = parent.Id);
NOT EXISTS(SELECT 1 FROM BaseItems parent WHERE parent.Id = BaseItems.ParentId);
""");
migrationBuilder.AddForeignKey(
name: "FK_BaseItems_BaseItems_ParentId",