Merge remote-tracking branch 'upstream/master' into search-rebased

This commit is contained in:
Shadowghost
2026-05-16 09:57:06 +02:00
189 changed files with 3738 additions and 2972 deletions

View File

@@ -111,7 +111,9 @@ public static class DescendantQueryHelper
private static HashSet<Guid> GetMatchingMediaStreamItemIds(JellyfinDbContext context, HasMediaStreamType criteria)
{
var query = context.MediaStreamInfos
.Where(ms => ms.StreamType == criteria.StreamType && ms.Language == criteria.Language);
.Where(ms => ms.StreamType == criteria.StreamType
&& (criteria.Language.Contains(ms.Language)
|| (criteria.Language.Contains("und") && string.IsNullOrEmpty(ms.Language)))); // und = undetermined
if (criteria.IsExternal.HasValue)
{

View File

@@ -273,6 +273,11 @@ public class JellyfinDbContext(DbContextOptions<JellyfinDbContext> options, ILog
}).ConfigureAwait(false);
return result;
}
catch (DbUpdateConcurrencyException)
{
// a concurrency exception is supposed to be always handled by the invoker of the method, logging it here is only causing log bloat.
throw;
}
catch (Exception e)
{
logger.LogError(e, "Error trying to save changes.");
@@ -294,6 +299,11 @@ public class JellyfinDbContext(DbContextOptions<JellyfinDbContext> options, ILog
});
return result;
}
catch (DbUpdateConcurrencyException)
{
// a concurrency exception is supposed to be always handled by the invoker of the method, logging it here is only causing log bloat.
throw;
}
catch (Exception e)
{
logger.LogError(e, "Error trying to save changes.");

View File

@@ -1,3 +1,6 @@
#pragma warning disable SA1313 // Parameter names should begin with lower-case letter
using System.Collections.Generic;
using Jellyfin.Database.Implementations.Entities;
namespace Jellyfin.Database.Implementations.MatchCriteria;
@@ -6,9 +9,23 @@ namespace Jellyfin.Database.Implementations.MatchCriteria;
/// Matches folders containing descendants with a specific media stream type and language.
/// </summary>
/// <param name="StreamType">The type of media stream to match (Audio, Subtitle, etc.).</param>
/// <param name="Language">The language to match.</param>
/// <param name="Language">List of languages to match.</param>
/// <param name="IsExternal">If not null, filters by internal (false) or external (true) streams. Only applicable to subtitles.</param>
public sealed record HasMediaStreamType(
MediaStreamTypeEntity StreamType,
string Language,
bool? IsExternal = null) : FolderMatchCriteria;
IReadOnlyCollection<string> Language,
bool? IsExternal = null) : FolderMatchCriteria
{
/// <summary>
/// Initializes a new instance of the <see cref="HasMediaStreamType"/> class.
/// </summary>
/// <param name="StreamType">The type of media stream to match (Audio, Subtitle, etc.).</param>
/// <param name="Language">The language to match.</param>
/// <param name="IsExternal">If not null, filters by internal (false) or external (true) streams. Only applicable to subtitles.</param>
public HasMediaStreamType(
MediaStreamTypeEntity StreamType,
string Language,
bool? IsExternal = null) : this(StreamType, [Language], IsExternal)
{
}
}

View File

@@ -40,10 +40,10 @@ namespace Jellyfin.LiveTv.Channels
}
/// <inheritdoc />
public string Name => _localization.GetLocalizedString("TasksRefreshChannels");
public string Name => _localization.GetLocalizedString("TaskRefreshChannels");
/// <inheritdoc />
public string Description => _localization.GetLocalizedString("TasksRefreshChannelsDescription");
public string Description => _localization.GetLocalizedString("TaskRefreshChannelsDescription");
/// <inheritdoc />
public string Category => _localization.GetLocalizedString("TasksChannelsCategory");