Compare commits

...

27 Commits

Author SHA1 Message Date
renovate[bot]
f9c7b18fdd Update Microsoft to 10.0.6 2026-04-14 18:21:22 +00:00
theguymadmax
5bad7b8ae3 Fix artist metadata not being fetched on initial library scan (#16606)
Some checks failed
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
* Fix artist metadata not being fetched on initial library scan

* Update Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs

Co-authored-by: Bond-009 <bond.009@outlook.com>

---------

Co-authored-by: Bond-009 <bond.009@outlook.com>
2026-04-14 18:38:01 +02:00
Tim Eisele
fb33b725e0 Fix in-process restart (#16482)
Some checks failed
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Stale Issue Labeler / Check for stale issues (push) Has been cancelled
Fix in-process restart
2026-04-13 20:06:46 +02:00
Gargotaire
ce3fa80a28 Translated using Weblate (Catalan)
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/ca/
2026-04-13 17:46:40 +00:00
Niels van Velzen
ec9c94bd7a Merge pull request #16619 from dkanada/person-filter
Some checks failed
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
add NameStartsWith and NameLessThan filters to Person search
2026-04-13 11:57:33 +02:00
dkanada
bb265cd403 add NameStartsWithOrGreater parameter to Persons endpoint 2026-04-13 13:50:04 +09:00
dkanada
22644075e7 add NameStartsWith and NameLessThan filters to Person search 2026-04-12 12:42:49 +09:00
Lofuuzi
6fc406f2c5 Translated using Weblate (Chinese (Traditional Han script, Hong Kong))
Some checks failed
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Stale Issue Labeler / Check for stale issues (push) Has been cancelled
Translation: Jellyfin/Jellyfin
Translate-URL: https://translate.jellyfin.org/projects/jellyfin/jellyfin-core/zh_Hant_HK/
2026-04-11 23:47:59 +00:00
Bond-009
046023b9dd Merge pull request #16380 from LTe/fix-subtitle-extraction-setting
Some checks failed
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Stale Issue Labeler / Check for stale issues (push) Has been cancelled
Respect EnableSubtitleExtraction setting in subtitle delivery
2026-04-11 11:37:17 +02:00
Bond-009
193a15ea45 Merge pull request #16567 from shocklateboy92/fix/iso639-2-language-display
Fix language display for ISO 639-2-only codes (e.g. mul, und, mis, zxx)
2026-04-11 10:24:48 +02:00
Bond-009
45700f6f7d Merge pull request #16609 from ddemarco5/master
Fix HDR tonemapping for BDMV content
2026-04-11 10:13:34 +02:00
Bond-009
99f2129d91 Merge pull request #16618 from jellyfin/renovate/ci-deps
Update actions/upload-artifact action to v7.0.1
2026-04-11 10:11:33 +02:00
renovate[bot]
29d11f6ecb Update actions/upload-artifact action to v7.0.1 2026-04-10 19:09:15 +00:00
Dominic DeMarco
22f0507258 Record missing information
Fixes tonemapping checks by recording previously missing information when gathering video stream information from videos in a BDMV structure
2026-04-10 00:21:52 -07:00
Lasath Fernando
c300651d0d Simplify null-check ternary style in ProbeResultNormalizer
Co-authored-by: Bond-009 <bond.009@outlook.com>
2026-04-09 13:53:38 -05:00
Bond-009
eacdc83fda Merge pull request #16588 from jellyfin/renovate/microsoft
Some checks failed
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Stale Issue Labeler / Check for stale issues (push) Has been cancelled
Update dependency Microsoft.NET.Test.Sdk to 18.4.0
2026-04-09 18:12:17 +02:00
Joshua M. Boniface
e3b5cf4996 Merge pull request #16456 from joshuaboniface/fix-path-filesystem-logic
Some checks failed
CodeQL / Analyze (csharp) (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 Publish / OpenAPI - Publish Artifact (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Unstable Spec (push) Has been cancelled
OpenAPI Publish / OpenAPI - Publish Stable Spec (push) Has been cancelled
Project Automation / Project board (push) Has been cancelled
Merge Conflict Labeler / Labeling (push) Has been cancelled
Stale PR Check / Check PRs with merge conflicts (push) Has been cancelled
2026-04-09 00:37:00 -04:00
Lasath Fernando
553f38a237 Fix language display for ISO 639-2-only codes (e.g. mul, und)
LoadCultures() in LocalizationManager skipped all iso6392.txt entries
without a two-letter ISO 639-1 code, dropping 302 of 496 languages
including mul (Multiple languages), und (Undetermined), mis (Uncoded
languages), zxx, and many real languages like Achinese, Akkadian, etc.
This caused FindLanguageInfo() to return null for these codes, which
meant:
- ExternalPathParser could not recognize them as valid language codes
  in subtitle filenames, so the Language field was never set
- DisplayTitle fell back to the raw code string (e.g. "Mul")

Fix by allowing entries without two-letter codes to be loaded with an
empty TwoLetterISOLanguageName. Also set LocalizedLanguage in
ProbeResultNormalizer for ffprobe-detected streams (the DB repository
path was already handled on master).
2026-04-08 12:38:24 -05:00
renovate[bot]
68f26e5a34 Update dependency Microsoft.NET.Test.Sdk to 18.4.0 2026-04-08 15:37:03 +00:00
Joshua M. Boniface
fec78c8448 Lint for the Linter Gods 2026-03-24 22:31:17 -04:00
Joshua M. Boniface
c22933260b Fix linting issue 2026-03-24 22:23:48 -04:00
Joshua M. Boniface
965b602c68 Apply suggestions from code review
Co-authored-by: JPVenson <ger-delta-07@hotmail.de>
2026-03-23 23:09:56 -04:00
Joshua M. Boniface
8142bbd50e Properly define variable type 2026-03-23 17:22:35 -04:00
Joshua M. Boniface
418beafebb Update FolderStorageInfo record 2026-03-23 17:15:49 -04:00
Joshua M. Boniface
434ebc8b11 Ensure ResolvedPath is sent on error too 2026-03-23 17:11:29 -04:00
Joshua M. Boniface
300036c859 Fix FolderStorageInfo to show parent filesystem
A direct implementation using DriveInfo directly on a path does not work
as expected. The method will return a DriveInfo object with the given
path as both the Name and the RootDirectory, which is not helpful.

Instead, add parsing logic to find the best possible match out of all
filesystems on the system for the path, including handling edge cases
involving symlinked paths in the chain.

This ensures that the resulting DeviceId is a valid filesystem, allowing
it to be used in the UI to show a better description. It also includes
the new ResolvedPath which will show, if required, what the Path
resolved to after all symlinks are interpolated.

One possible issue here is that walking all drives as-is might become
slow(er) on a system with many partitions, but even on my
partition-heavy system with over a dozen ZVOLs and remote mounts, this
takes under 0.4 seconds including runup time for `dotnet run`, so I
imagine this should be fine.
2026-03-23 17:08:15 -04:00
Piotr Niełacny
37983c943a Respect EnableSubtitleExtraction setting in subtitle delivery
Wire up EnableSubtitleExtraction config to MediaEncoder.CanExtractSubtitles
so the setting is actually respected. Gate subtitle extraction check behind
PlayMethod.Transcode since DirectPlay has no competing ffmpeg process.

Add parameterized tests for StreamBuilder.GetSubtitleProfile covering
text and graphical codecs, profile format matching, and extraction
setting behavior. Remove misplaced SubtitleEncoder extraction test.
2026-03-13 16:34:44 +01:00
26 changed files with 231 additions and 46 deletions

View File

@@ -26,7 +26,7 @@ jobs:
dotnet build Jellyfin.Server -o ./out
- name: Upload Head
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: abi-head
retention-days: 14
@@ -65,7 +65,7 @@ jobs:
dotnet build Jellyfin.Server -o ./out
- name: Upload Head
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: abi-base
retention-days: 14

View File

@@ -36,7 +36,7 @@ jobs:
run: dotnet test tests/Jellyfin.Server.Integration.Tests/Jellyfin.Server.Integration.Tests.csproj -c Release --filter Jellyfin.Server.Integration.Tests.OpenApiSpecTests
- name: Upload Artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.artifact }}
path: tests/Jellyfin.Server.Integration.Tests/bin/Release/net10.0/openapi.json

View File

@@ -74,7 +74,7 @@ jobs:
docker run -v /tmp/openapi-report:/data openapitools/openapi-diff:2.1.6 /data/base.json /data/head.json --state -l ERROR --markdown /data/openapi-report.md
- name: Upload Artifact
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: openapi-report
path: /tmp/openapi-report/openapi-report.md

View File

@@ -26,28 +26,28 @@
<PackageVersion Include="libse" Version="4.0.12" />
<PackageVersion Include="LrcParser" Version="2025.623.0" />
<PackageVersion Include="MetaBrainz.MusicBrainz" Version="8.0.1" />
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.5" />
<PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="10.0.6" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.6" />
<PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="4.14.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="5.3.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.3.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.5" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.5" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.5" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="10.0.6" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="10.0.6" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="10.0.6" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.6" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="10.0.6" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="10.0.6" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
<PackageVersion Include="MimeTypes" Version="2.5.2" />
<PackageVersion Include="Morestachio" Version="5.0.1.631" />
<PackageVersion Include="Moq" Version="4.18.4" />
@@ -77,7 +77,7 @@
<PackageVersion Include="Svg.Skia" Version="3.4.1" />
<PackageVersion Include="Swashbuckle.AspNetCore.ReDoc" Version="10.1.7" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="10.1.7" />
<PackageVersion Include="System.Text.Json" Version="10.0.5" />
<PackageVersion Include="System.Text.Json" Version="10.0.6" />
<PackageVersion Include="TagLibSharp" Version="2.3.0" />
<PackageVersion Include="z440.atl.core" Version="7.12.0" />
<PackageVersion Include="TMDbLib" Version="3.0.0" />

View File

@@ -60,6 +60,7 @@ namespace Emby.Server.Implementations.IO
_fileSystem = fileSystem;
appLifetime.ApplicationStarted.Register(Start);
appLifetime.ApplicationStopping.Register(Stop);
}
/// <inheritdoc />

View File

@@ -50,6 +50,10 @@ public class ArtistsValidator
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
{
var names = _itemRepo.GetAllArtistNames();
var existingArtistIds = _libraryManager.GetItemIds(new InternalItemsQuery
{
IncludeItemTypes = [BaseItemKind.MusicArtist]
}).ToHashSet();
var numComplete = 0;
var count = names.Count;
@@ -59,8 +63,13 @@ public class ArtistsValidator
try
{
var item = _libraryManager.GetArtist(name);
var isNew = !existingArtistIds.Contains(item.Id);
var neverRefreshed = item.DateLastRefreshed == default;
await item.RefreshMetadata(cancellationToken).ConfigureAwait(false);
if (isNew || neverRefreshed)
{
await item.RefreshMetadata(cancellationToken).ConfigureAwait(false);
}
}
catch (OperationCanceledException)
{

View File

@@ -63,8 +63,8 @@
"Photos": "Fotos",
"Playlists": "Llistes de reproducció",
"Plugin": "Complement",
"PluginInstalledWithName": "{0} s'ha instal·lat",
"PluginUninstalledWithName": "{0} s'ha desinstal·lat",
"PluginInstalledWithName": "S'ha instal·lat {0}",
"PluginUninstalledWithName": "S'ha desinstal·lat {0}",
"PluginUpdatedWithName": "S'ha actualitzat {0}",
"ProviderValue": "Proveïdor: {0}",
"ScheduledTaskFailedWithName": "{0} ha fallat",

View File

@@ -29,7 +29,7 @@
"Inherit": "繼承",
"ItemAddedWithName": "{0} 經已加咗入媒體櫃",
"ItemRemovedWithName": "{0} 經已由媒體櫃移除咗",
"LabelIpAddressValue": "IP 址:{0}",
"LabelIpAddressValue": "IP 址:{0}",
"LabelRunningTimeValue": "運行時間:{0}",
"Latest": "最新",
"MessageApplicationUpdated": "Jellyfin 經已更新咗",

View File

@@ -138,7 +138,7 @@ namespace Emby.Server.Implementations.Localization
string twoCharName = parts[2];
if (string.IsNullOrWhiteSpace(twoCharName))
{
continue;
twoCharName = string.Empty;
}
else if (twoCharName.Contains('-', StringComparison.OrdinalIgnoreCase))
{

View File

@@ -50,6 +50,9 @@ public class PersonsController : BaseJellyfinApiController
/// <param name="startIndex">Optional. All items with a lower index will be dropped from the response.</param>
/// <param name="limit">Optional. The maximum number of records to return.</param>
/// <param name="searchTerm">The search term.</param>
/// <param name="nameStartsWith">Optional. Filter by items whose name starts with the given input string.</param>
/// <param name="nameLessThan">Optional. Filter by items whose name will appear before this value when sorted alphabetically.</param>
/// <param name="nameStartsWithOrGreater">Optional. Filter by items whose name will appear after this value when sorted alphabetically.</param>
/// <param name="fields">Optional. Specify additional fields of information to return in the output.</param>
/// <param name="filters">Optional. Specify additional filters to apply.</param>
/// <param name="isFavorite">Optional filter by items that are marked as favorite, or not. userId is required.</param>
@@ -70,6 +73,9 @@ public class PersonsController : BaseJellyfinApiController
[FromQuery] int? startIndex,
[FromQuery] int? limit,
[FromQuery] string? searchTerm,
[FromQuery] string? nameStartsWith,
[FromQuery] string? nameLessThan,
[FromQuery] string? nameStartsWithOrGreater,
[FromQuery, ModelBinder(typeof(CommaDelimitedCollectionModelBinder))] ItemFields[] fields,
[FromQuery, ModelBinder(typeof(CommaDelimitedCollectionModelBinder))] ItemFilter[] filters,
[FromQuery] bool? isFavorite,
@@ -97,6 +103,9 @@ public class PersonsController : BaseJellyfinApiController
excludePersonTypes)
{
NameContains = searchTerm,
NameStartsWith = nameStartsWith,
NameLessThan = nameLessThan,
NameStartsWithOrGreater = nameStartsWithOrGreater,
User = user,
IsFavorite = !isFavorite.HasValue && isFavoriteInFilters ? true : isFavorite,
AppearsInItemId = appearsInItemId ?? Guid.Empty,

View File

@@ -235,6 +235,21 @@ public class PeopleRepository(IDbContextFactory<JellyfinDbContext> dbProvider, I
query = query.Where(e => e.Name.ToUpper().Contains(nameContainsUpper));
}
if (!string.IsNullOrWhiteSpace(filter.NameStartsWith))
{
query = query.Where(e => e.Name.StartsWith(filter.NameStartsWith.ToLowerInvariant()));
}
if (!string.IsNullOrWhiteSpace(filter.NameLessThan))
{
query = query.Where(e => e.Name.CompareTo(filter.NameLessThan.ToLowerInvariant()) < 0);
}
if (!string.IsNullOrWhiteSpace(filter.NameStartsWithOrGreater))
{
query = query.Where(e => e.Name.CompareTo(filter.NameStartsWithOrGreater.ToLowerInvariant()) >= 0);
}
return query;
}

View File

@@ -28,22 +28,44 @@ public static class StorageHelper
}
/// <summary>
/// Gets the free space of a specific directory.
/// Gets the free space of the parent filesystem of a specific directory.
/// </summary>
/// <param name="path">Path to a folder.</param>
/// <returns>The number of bytes available space.</returns>
/// <returns>Various details about the parent filesystem containing the directory.</returns>
public static FolderStorageInfo GetFreeSpaceOf(string path)
{
try
{
var driveInfo = new DriveInfo(path);
// Fully resolve the given path to an actual filesystem target, in case it's a symlink or similar.
var resolvedPath = ResolvePath(path);
// We iterate all filesystems reported by GetDrives() here, and attempt to find the best
// match that contains, as deep as possible, the given path.
// This is required because simply calling `DriveInfo` on a path returns that path as
// the Name and RootDevice, which is not at all how this should work.
var allDrives = DriveInfo.GetDrives();
DriveInfo? bestMatch = null;
foreach (DriveInfo d in allDrives)
{
if (resolvedPath.StartsWith(d.RootDirectory.FullName, StringComparison.InvariantCultureIgnoreCase) &&
(bestMatch is null || d.RootDirectory.FullName.Length > bestMatch.RootDirectory.FullName.Length))
{
bestMatch = d;
}
}
if (bestMatch is null)
{
throw new InvalidOperationException($"The path `{path}` has no matching parent device. Space check invalid.");
}
return new FolderStorageInfo()
{
Path = path,
FreeSpace = driveInfo.AvailableFreeSpace,
UsedSpace = driveInfo.TotalSize - driveInfo.AvailableFreeSpace,
StorageType = driveInfo.DriveType.ToString(),
DeviceId = driveInfo.Name,
ResolvedPath = resolvedPath,
FreeSpace = bestMatch.AvailableFreeSpace,
UsedSpace = bestMatch.TotalSize - bestMatch.AvailableFreeSpace,
StorageType = bestMatch.DriveType.ToString(),
DeviceId = bestMatch.Name,
};
}
catch
@@ -51,6 +73,7 @@ public static class StorageHelper
return new FolderStorageInfo()
{
Path = path,
ResolvedPath = path,
FreeSpace = -1,
UsedSpace = -1,
StorageType = null,
@@ -59,6 +82,26 @@ public static class StorageHelper
}
}
/// <summary>
/// Walk a path and fully resolve any symlinks within it.
/// </summary>
private static string ResolvePath(string path)
{
var parts = path.Split(Path.DirectorySeparatorChar, StringSplitOptions.RemoveEmptyEntries);
var current = Path.DirectorySeparatorChar.ToString();
foreach (var part in parts)
{
current = Path.Combine(current, part);
var resolved = new DirectoryInfo(current).ResolveLinkTarget(returnFinalTarget: true);
if (resolved is not null)
{
current = resolved.FullName;
}
}
return current;
}
/// <summary>
/// Gets the underlying drive data from a given path and checks if the available storage capacity matches the threshold.
/// </summary>

View File

@@ -161,7 +161,6 @@ namespace Jellyfin.Server
_loggerFactory,
options,
startupConfig);
_appHost = appHost;
var configurationCompleted = false;
try
{
@@ -207,6 +206,7 @@ namespace Jellyfin.Server
await jellyfinMigrationService.MigrateStepAsync(JellyfinMigrationStageTypes.CoreInitialisation, appHost.ServiceProvider).ConfigureAwait(false);
await appHost.InitializeServices(startupConfig).ConfigureAwait(false);
_appHost = appHost;
await jellyfinMigrationService.MigrateStepAsync(JellyfinMigrationStageTypes.AppInitialisation, appHost.ServiceProvider).ConfigureAwait(false);
await jellyfinMigrationService.CleanupSystemAfterMigration(_logger).ConfigureAwait(false);
@@ -263,6 +263,7 @@ namespace Jellyfin.Server
_appHost = null;
_jellyfinHost?.Dispose();
_jellyfinHost = null;
}
}

View File

@@ -142,6 +142,7 @@ public sealed class SetupServer : IDisposable
ThrowIfDisposed();
var retryAfterValue = TimeSpan.FromSeconds(5);
var config = _configurationManager.GetNetworkConfiguration()!;
_startupServer?.Dispose();
_startupServer = Host.CreateDefaultBuilder(["hostBuilder:reloadConfigOnChange=false"])
.UseConsoleLifetime()
.UseSerilog()

View File

@@ -42,6 +42,12 @@ namespace MediaBrowser.Controller.Entities
public string NameContains { get; set; }
public string NameStartsWith { get; set; }
public string NameLessThan { get; set; }
public string NameStartsWithOrGreater { get; set; }
public User User { get; set; }
public bool? IsFavorite { get; set; }

View File

@@ -1331,8 +1331,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
public bool CanExtractSubtitles(string codec)
{
// TODO is there ever a case when a subtitle can't be extracted??
return true;
return _configurationManager.GetEncodingOptions().EnableSubtitleExtraction;
}
private sealed class ProcessWrapper : IDisposable

View File

@@ -729,6 +729,9 @@ namespace MediaBrowser.MediaEncoding.Probing
stream.Type = MediaStreamType.Audio;
stream.LocalizedDefault = _localization.GetLocalizedString("Default");
stream.LocalizedExternal = _localization.GetLocalizedString("External");
stream.LocalizedLanguage = string.IsNullOrEmpty(stream.Language)
? null
: _localization.FindLanguageInfo(stream.Language)?.DisplayName;
stream.Channels = streamInfo.Channels;
@@ -767,6 +770,9 @@ namespace MediaBrowser.MediaEncoding.Probing
stream.LocalizedForced = _localization.GetLocalizedString("Forced");
stream.LocalizedExternal = _localization.GetLocalizedString("External");
stream.LocalizedHearingImpaired = _localization.GetLocalizedString("HearingImpaired");
stream.LocalizedLanguage = string.IsNullOrEmpty(stream.Language)
? null
: _localization.FindLanguageInfo(stream.Language)?.DisplayName;
if (string.IsNullOrEmpty(stream.Title))
{

View File

@@ -1555,7 +1555,7 @@ namespace MediaBrowser.Model.Dlna
continue;
}
if (!subtitleStream.IsExternal && !transcoderSupport.CanExtractSubtitles(subtitleStream.Codec))
if (!subtitleStream.IsExternal && playMethod == PlayMethod.Transcode && !transcoderSupport.CanExtractSubtitles(subtitleStream.Codec))
{
continue;
}

View File

@@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using Jellyfin.Data.Enums;

View File

@@ -11,17 +11,22 @@ public record FolderStorageInfo
public required string Path { get; init; }
/// <summary>
/// Gets the free space of the underlying storage device of the <see cref="Path"/>.
/// Gets the fully resolved path of the folder in question (interpolating any symlinks if present).
/// </summary>
public required string ResolvedPath { get; init; }
/// <summary>
/// Gets the free space of the underlying storage device of the <see cref="ResolvedPath"/>.
/// </summary>
public long FreeSpace { get; init; }
/// <summary>
/// Gets the used space of the underlying storage device of the <see cref="Path"/>.
/// Gets the used space of the underlying storage device of the <see cref="ResolvedPath"/>.
/// </summary>
public long UsedSpace { get; init; }
/// <summary>
/// Gets the kind of storage device of the <see cref="Path"/>.
/// Gets the kind of storage device of the <see cref="ResolvedPath"/>.
/// </summary>
public string? StorageType { get; init; }

View File

@@ -487,6 +487,13 @@ namespace MediaBrowser.Providers.Manager
return true;
}
// Artists without a folder structure that are derived from metadata have no real path in the library,
// so GetLibraryOptions returns null. Allow all providers through rather than blocking them.
if (item is MusicArtist && libraryTypeOptions is null)
{
return true;
}
return _baseItemManager.IsMetadataFetcherEnabled(item, libraryTypeOptions, provider.Name);
}

View File

@@ -366,6 +366,8 @@ namespace MediaBrowser.Providers.MediaInfo
blurayVideoStream.ColorSpace = ffmpegVideoStream.ColorSpace;
blurayVideoStream.ColorTransfer = ffmpegVideoStream.ColorTransfer;
blurayVideoStream.ColorPrimaries = ffmpegVideoStream.ColorPrimaries;
blurayVideoStream.BitDepth = ffmpegVideoStream.BitDepth;
blurayVideoStream.PixelFormat = ffmpegVideoStream.PixelFormat;
}
}

View File

@@ -125,7 +125,9 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
if (string.IsNullOrWhiteSpace(overview))
{
overview = result.strBiographyEN;
overview = string.IsNullOrWhiteSpace(result.strBiographyEN)
? result.strBiography
: result.strBiographyEN;
}
item.Overview = (overview ?? string.Empty).StripHtml();
@@ -224,6 +226,8 @@ namespace MediaBrowser.Providers.Plugins.AudioDb
public string strTwitter { get; set; }
public string strBiography { get; set; }
public string strBiographyEN { get; set; }
public string strBiographyDE { get; set; }

View File

@@ -22,7 +22,7 @@ namespace MediaBrowser.Providers.Plugins.MusicBrainz;
/// <summary>
/// MusicBrainz artist provider.
/// </summary>
public class MusicBrainzArtistProvider : IRemoteMetadataProvider<MusicArtist, ArtistInfo>, IDisposable
public class MusicBrainzArtistProvider : IRemoteMetadataProvider<MusicArtist, ArtistInfo>, IDisposable, IHasOrder
{
private readonly ILogger<MusicBrainzArtistProvider> _logger;
private Query _musicBrainzQuery;
@@ -42,6 +42,10 @@ public class MusicBrainzArtistProvider : IRemoteMetadataProvider<MusicArtist, Ar
/// <inheritdoc />
public string Name => "MusicBrainz";
/// <inheritdoc />
/// Runs first to populate the MusicBrainz artist ID used by downstream providers.
public int Order => 0;
private void ReloadConfig(object? sender, BasePluginConfiguration e)
{
var configuration = (PluginConfiguration)e;

View File

@@ -617,5 +617,60 @@ namespace Jellyfin.Model.Tests
return (path, query, filename, extension);
}
[Theory]
// EnableSubtitleExtraction = false, internal subtitles
[InlineData("srt", "srt", false, false, PlayMethod.Transcode, SubtitleDeliveryMethod.Encode)]
[InlineData("srt", "srt", false, false, PlayMethod.DirectPlay, SubtitleDeliveryMethod.External)]
[InlineData("pgssub", "pgssub", false, false, PlayMethod.Transcode, SubtitleDeliveryMethod.Encode)]
[InlineData("pgssub", "pgssub", false, false, PlayMethod.DirectPlay, SubtitleDeliveryMethod.External)]
[InlineData("pgssub", "srt", false, false, PlayMethod.Transcode, SubtitleDeliveryMethod.Encode)]
// EnableSubtitleExtraction = false, external subtitles
[InlineData("srt", "srt", false, true, PlayMethod.Transcode, SubtitleDeliveryMethod.External)]
// EnableSubtitleExtraction = true, internal subtitles
[InlineData("srt", "srt", true, false, PlayMethod.Transcode, SubtitleDeliveryMethod.External)]
[InlineData("pgssub", "pgssub", true, false, PlayMethod.Transcode, SubtitleDeliveryMethod.External)]
[InlineData("pgssub", "pgssub", true, false, PlayMethod.DirectPlay, SubtitleDeliveryMethod.External)]
[InlineData("pgssub", "srt", true, false, PlayMethod.Transcode, SubtitleDeliveryMethod.Encode)]
// EnableSubtitleExtraction = true, external subtitles
[InlineData("srt", "srt", true, true, PlayMethod.Transcode, SubtitleDeliveryMethod.External)]
public void GetSubtitleProfile_RespectsExtractionSetting(
string codec,
string profileFormat,
bool enableSubtitleExtraction,
bool isExternal,
PlayMethod playMethod,
SubtitleDeliveryMethod expectedMethod)
{
var mediaSource = new MediaSourceInfo();
var subtitleStream = new MediaStream
{
Type = MediaStreamType.Subtitle,
Index = 0,
IsExternal = isExternal,
Path = isExternal ? "/media/sub." + codec : null,
Codec = codec,
SupportsExternalStream = MediaStream.IsTextFormat(codec)
};
var subtitleProfiles = new[]
{
new SubtitleProfile { Format = profileFormat, Method = SubtitleDeliveryMethod.External }
};
var transcoderSupport = new Mock<ITranscoderSupport>();
transcoderSupport.Setup(t => t.CanExtractSubtitles(It.IsAny<string>())).Returns(enableSubtitleExtraction);
var result = StreamBuilder.GetSubtitleProfile(
mediaSource,
subtitleStream,
subtitleProfiles,
playMethod,
transcoderSupport.Object,
null,
null);
Assert.Equal(expectedMethod, result.Method);
}
}
}

View File

@@ -41,7 +41,7 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
await localizationManager.LoadAll();
var cultures = localizationManager.GetCultures().ToList();
Assert.Equal(194, cultures.Count);
Assert.Equal(496, cultures.Count);
var germany = cultures.FirstOrDefault(x => x.TwoLetterISOLanguageName.Equals("de", StringComparison.Ordinal));
Assert.NotNull(germany);
@@ -99,6 +99,25 @@ namespace Jellyfin.Server.Implementations.Tests.Localization
Assert.Contains("ger", germany.ThreeLetterISOLanguageNames);
}
[Theory]
[InlineData("mul", "Multiple languages")]
[InlineData("und", "Undetermined")]
[InlineData("mis", "Uncoded languages")]
[InlineData("zxx", "No linguistic content; Not applicable")]
public async Task FindLanguageInfo_ISO6392Only_Success(string code, string expectedDisplayName)
{
var localizationManager = Setup(new ServerConfiguration
{
UICulture = "en-US"
});
await localizationManager.LoadAll();
var culture = localizationManager.FindLanguageInfo(code);
Assert.NotNull(culture);
Assert.Equal(expectedDisplayName, culture.DisplayName);
Assert.Equal(code, culture.ThreeLetterISOLanguageName);
}
[Fact]
public async Task GetParentalRatings_Default_Success()
{