diff options
| -rw-r--r-- | .config/dotnet-tools.json | 2 | ||||
| -rw-r--r-- | .github/workflows/ci-codeql-analysis.yml | 8 | ||||
| -rw-r--r-- | .github/workflows/ci-compat.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/ci-openapi.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/ci-tests.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/commands.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/issue-template-check.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/release-bump-version.yaml | 4 | ||||
| -rw-r--r-- | Directory.Packages.props | 54 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Library/LibraryManager.cs | 12 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/el.json | 4 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/es-MX.json | 3 | ||||
| -rw-r--r-- | Jellyfin.Server.Implementations/Item/BaseItemRepository.cs | 15 | ||||
| -rw-r--r-- | MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs | 12 |
14 files changed, 66 insertions, 66 deletions
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 7cf60e92f..5efa53e31 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "9.0.7", + "version": "9.0.8", "commands": [ "dotnet-ef" ] diff --git a/.github/workflows/ci-codeql-analysis.yml b/.github/workflows/ci-codeql-analysis.yml index 352689de2..c7f7bea35 100644 --- a/.github/workflows/ci-codeql-analysis.yml +++ b/.github/workflows/ci-codeql-analysis.yml @@ -20,18 +20,18 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - name: Setup .NET uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 with: dotnet-version: '9.0.x' - name: Initialize CodeQL - uses: github/codeql-action/init@a4e1a019f5e24960714ff6296aee04b736cbc3cf # v3.29.6 + uses: github/codeql-action/init@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9 with: languages: ${{ matrix.language }} queries: +security-extended - name: Autobuild - uses: github/codeql-action/autobuild@a4e1a019f5e24960714ff6296aee04b736cbc3cf # v3.29.6 + uses: github/codeql-action/autobuild@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@a4e1a019f5e24960714ff6296aee04b736cbc3cf # v3.29.6 + uses: github/codeql-action/analyze@df559355d593797519d70b90fc8edd5db049e7a2 # v3.29.9 diff --git a/.github/workflows/ci-compat.yml b/.github/workflows/ci-compat.yml index c01fc51e8..00670410c 100644 --- a/.github/workflows/ci-compat.yml +++ b/.github/workflows/ci-compat.yml @@ -11,7 +11,7 @@ jobs: permissions: read-all steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ github.event.pull_request.head.sha }} repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -40,7 +40,7 @@ jobs: permissions: read-all steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ github.event.pull_request.head.sha }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/ci-openapi.yml b/.github/workflows/ci-openapi.yml index 49fefa602..809aecf7e 100644 --- a/.github/workflows/ci-openapi.yml +++ b/.github/workflows/ci-openapi.yml @@ -16,7 +16,7 @@ jobs: permissions: read-all steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ github.event.pull_request.head.sha }} repository: ${{ github.event.pull_request.head.repo.full_name }} @@ -41,7 +41,7 @@ jobs: permissions: read-all steps: - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ github.event.pull_request.head.sha }} repository: ${{ github.event.pull_request.head.repo.full_name }} diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 334c0f54a..d840e52b1 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -20,7 +20,7 @@ jobs: runs-on: "${{ matrix.os }}" steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4.3.1 with: @@ -35,7 +35,7 @@ jobs: --verbosity minimal - name: Merge code coverage results - uses: danielpalme/ReportGenerator-GitHub-Action@c1dd332d00304c5aa5d506aab698a5224a8fa24e # 5.4.11 + uses: danielpalme/ReportGenerator-GitHub-Action@c4c5175a441c6603ec614f5084386dabe0e2295b # v5.4.12 with: reports: "**/coverage.cobertura.xml" targetdir: "merged/" diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml index 374554ac0..261c179af 100644 --- a/.github/workflows/commands.yml +++ b/.github/workflows/commands.yml @@ -24,7 +24,7 @@ jobs: reactions: '+1' - name: Checkout the latest code - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: token: ${{ secrets.JF_BOT_TOKEN }} fetch-depth: 0 @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest steps: - name: pull in script - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: repository: jellyfin/jellyfin-triage-script - name: install python diff --git a/.github/workflows/issue-template-check.yml b/.github/workflows/issue-template-check.yml index 588f0a50e..707c77279 100644 --- a/.github/workflows/issue-template-check.yml +++ b/.github/workflows/issue-template-check.yml @@ -10,7 +10,7 @@ jobs: issues: write steps: - name: pull in script - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: repository: jellyfin/jellyfin-triage-script - name: install python diff --git a/.github/workflows/release-bump-version.yaml b/.github/workflows/release-bump-version.yaml index 0da9c44f8..ec91744f3 100644 --- a/.github/workflows/release-bump-version.yaml +++ b/.github/workflows/release-bump-version.yaml @@ -33,7 +33,7 @@ jobs: yq-version: v4.9.8 - name: Checkout Repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ env.TAG_BRANCH }} @@ -66,7 +66,7 @@ jobs: NEXT_VERSION: ${{ github.event.inputs.NEXT_VERSION }} steps: - name: Checkout Repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 with: ref: ${{ env.TAG_BRANCH }} diff --git a/Directory.Packages.props b/Directory.Packages.props index a7fb535d6..f075db3a6 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -26,29 +26,29 @@ <PackageVersion Include="libse" Version="4.0.12" /> <PackageVersion Include="LrcParser" Version="2025.623.0" /> <PackageVersion Include="MetaBrainz.MusicBrainz" Version="6.1.0" /> - <PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="9.0.7" /> - <PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.7" /> + <PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="9.0.8" /> + <PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.8" /> <PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="4.14.0" /> - <PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.7" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.7" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.7" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.7" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.7" /> - <PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.7" /> + <PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.8" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.8" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.8" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.8" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Http" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.8" /> + <PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.8" /> <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.14.1" /> <PackageVersion Include="MimeTypes" Version="2.5.2" /> <PackageVersion Include="Morestachio" Version="5.0.1.631" /> @@ -81,13 +81,13 @@ <PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" /> <PackageVersion Include="System.Globalization" Version="4.3.0" /> <PackageVersion Include="System.Linq.Async" Version="6.0.3" /> - <PackageVersion Include="System.Text.Encoding.CodePages" Version="9.0.7" /> - <PackageVersion Include="System.Text.Json" Version="9.0.7" /> - <PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.7" /> + <PackageVersion Include="System.Text.Encoding.CodePages" Version="9.0.8" /> + <PackageVersion Include="System.Text.Json" Version="9.0.8" /> + <PackageVersion Include="System.Threading.Tasks.Dataflow" Version="9.0.8" /> <PackageVersion Include="TagLibSharp" Version="2.3.0" /> - <PackageVersion Include="z440.atl.core" Version="7.2.0" /> + <PackageVersion Include="z440.atl.core" Version="7.3.0" /> <PackageVersion Include="TMDbLib" Version="2.2.0" /> - <PackageVersion Include="UTF.Unknown" Version="2.5.1" /> + <PackageVersion Include="UTF.Unknown" Version="2.6.0" /> <PackageVersion Include="Xunit.Priority" Version="1.1.6" /> <PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" /> <PackageVersion Include="Xunit.SkippableFact" Version="1.5.23" /> diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 3aaaaba5a..58a971f62 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -2000,8 +2000,6 @@ namespace Emby.Server.Implementations.Library return; } - var anyChange = false; - foreach (var img in outdated) { var image = img; @@ -2033,7 +2031,6 @@ namespace Emby.Server.Implementations.Library try { size = _imageProcessor.GetImageDimensions(item, image); - anyChange = image.Width != size.Width || image.Height != size.Height; image.Width = size.Width; image.Height = size.Height; } @@ -2041,7 +2038,6 @@ namespace Emby.Server.Implementations.Library { _logger.LogError(ex, "Cannot get image dimensions for {ImagePath}", image.Path); size = default; - anyChange = image.Width != size.Width || image.Height != size.Height; image.Width = 0; image.Height = 0; } @@ -2049,20 +2045,17 @@ namespace Emby.Server.Implementations.Library try { var blurhash = _imageProcessor.GetImageBlurHash(image.Path, size); - anyChange = anyChange || !blurhash.Equals(image.BlurHash, StringComparison.Ordinal); image.BlurHash = blurhash; } catch (Exception ex) { _logger.LogError(ex, "Cannot compute blurhash for {ImagePath}", image.Path); - anyChange = anyChange || !string.IsNullOrEmpty(image.BlurHash); image.BlurHash = string.Empty; } try { var modifiedDate = _fileSystem.GetLastWriteTimeUtc(image.Path); - anyChange = anyChange || modifiedDate != image.DateModified; image.DateModified = modifiedDate; } catch (Exception ex) @@ -2071,10 +2064,7 @@ namespace Emby.Server.Implementations.Library } } - if (anyChange) - { - _itemRepository.SaveImages(item); - } + _itemRepository.SaveImages(item); RegisterItem(item); } diff --git a/Emby.Server.Implementations/Localization/Core/el.json b/Emby.Server.Implementations/Localization/Core/el.json index f3195f0ea..2ba2085da 100644 --- a/Emby.Server.Implementations/Localization/Core/el.json +++ b/Emby.Server.Implementations/Localization/Core/el.json @@ -136,5 +136,7 @@ "TaskMoveTrickplayImagesDescription": "Μετακινεί τα υπάρχοντα αρχεία trickplay σύμφωνα με τις ρυθμίσεις της βιβλιοθήκης.", "TaskDownloadMissingLyricsDescription": "Κατεβάζει στίχους για τραγούδια", "TaskExtractMediaSegments": "Σάρωση τμημάτων πολυμέσων", - "TaskExtractMediaSegmentsDescription": "Εξάγει ή βρίσκει τμήματα πολυμέσων από επεκτάσεις που χρησιμοποιούν το MediaSegment." + "TaskExtractMediaSegmentsDescription": "Εξάγει ή βρίσκει τμήματα πολυμέσων από επεκτάσεις που χρησιμοποιούν το MediaSegment.", + "CleanupUserDataTaskDescription": "Καθαρίζει όλα τα δεδομένα χρήστη (κατάσταση παρακολούθησης, κατάσταση αγαπημένων κ.λπ.) από πολυμέσα που δεν υπάρχουν πλέον για τουλάχιστον 90 ημέρες.", + "CleanupUserDataTask": "Εργασία εκκαθάρισης δεδομένων χρήστη" } diff --git a/Emby.Server.Implementations/Localization/Core/es-MX.json b/Emby.Server.Implementations/Localization/Core/es-MX.json index 5fb7e8ae1..20f38de62 100644 --- a/Emby.Server.Implementations/Localization/Core/es-MX.json +++ b/Emby.Server.Implementations/Localization/Core/es-MX.json @@ -136,5 +136,6 @@ "TaskExtractMediaSegments": "Escaneo de segmentos de medios", "TaskExtractMediaSegmentsDescription": "Extrae u obtiene segmentos de medios de plugins habilitados para MediaSegment.", "TaskMoveTrickplayImages": "Migrar la ubicación de la imagen de Trickplay", - "TaskMoveTrickplayImagesDescription": "Mueve archivos de trickplay existentes según la configuración de la biblioteca." + "TaskMoveTrickplayImagesDescription": "Mueve archivos de trickplay existentes según la configuración de la biblioteca.", + "CleanupUserDataTask": "Tarea de limpieza de los datos del usuario" } diff --git a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs index c5fdcd834..ecde48406 100644 --- a/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs +++ b/Jellyfin.Server.Implementations/Item/BaseItemRepository.cs @@ -1175,13 +1175,18 @@ public sealed class BaseItemRepository IsSeries = filter.IsSeries }); + var itemValuesQuery = context.ItemValues + .Where(f => itemValueTypes.Contains(f.Type)) + .SelectMany(f => f.BaseItemsMap!, (f, w) => new { f, w }) + .Join( + innerQueryFilter, + fw => fw.w.ItemId, + g => g.Id, + (fw, g) => fw.f.CleanValue); + var innerQuery = PrepareItemQuery(context, filter) .Where(e => e.Type == returnType) - .Where(e => context.ItemValues! - .Where(f => itemValueTypes.Contains(f.Type)) - .Where(f => innerQueryFilter.Any(g => f.BaseItemsMap!.Any(w => w.ItemId == g.Id))) - .Select(f => f.CleanValue) - .Contains(e.CleanName)); + .Where(e => itemValuesQuery.Contains(e.CleanName)); var outerQueryFilter = new InternalItemsQuery(filter.User) { diff --git a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs index 508d5be32..359927d4d 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SubtitleEncoder.cs @@ -171,14 +171,15 @@ namespace MediaBrowser.MediaEncoding.Subtitles { using (var stream = await GetStream(fileInfo.Path, fileInfo.Protocol, cancellationToken).ConfigureAwait(false)) { - var result = CharsetDetector.DetectFromStream(stream).Detected; + var result = await CharsetDetector.DetectFromStreamAsync(stream, cancellationToken).ConfigureAwait(false); + var detected = result.Detected; stream.Position = 0; - if (result is not null) + if (detected is not null) { - _logger.LogDebug("charset {CharSet} detected for {Path}", result.EncodingName, fileInfo.Path); + _logger.LogDebug("charset {CharSet} detected for {Path}", detected.EncodingName, fileInfo.Path); - using var reader = new StreamReader(stream, result.Encoding); + using var reader = new StreamReader(stream, detected.Encoding); var text = await reader.ReadToEndAsync(cancellationToken).ConfigureAwait(false); return new MemoryStream(Encoding.UTF8.GetBytes(text)); @@ -938,7 +939,8 @@ namespace MediaBrowser.MediaEncoding.Subtitles using (var stream = await GetStream(path, mediaSource.Protocol, cancellationToken).ConfigureAwait(false)) { - var charset = CharsetDetector.DetectFromStream(stream).Detected?.EncodingName ?? string.Empty; + var result = await CharsetDetector.DetectFromStreamAsync(stream, cancellationToken).ConfigureAwait(false); + var charset = result.Detected?.EncodingName ?? string.Empty; // UTF16 is automatically converted to UTF8 by FFmpeg, do not specify a character encoding if ((path.EndsWith(".ass", StringComparison.Ordinal) || path.EndsWith(".ssa", StringComparison.Ordinal) || path.EndsWith(".srt", StringComparison.Ordinal)) |
