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-openapi.yml | 4 | ||||
| -rw-r--r-- | .github/workflows/ci-tests.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/commands.yml | 2 | ||||
| -rw-r--r-- | .github/workflows/issue-template-check.yml | 2 | ||||
| -rw-r--r-- | CONTRIBUTORS.md | 1 | ||||
| -rw-r--r-- | Directory.Packages.props | 26 | ||||
| -rw-r--r-- | Emby.Server.Implementations/Localization/Core/et.json | 4 | ||||
| -rw-r--r-- | tests/Jellyfin.Server.Implementations.Tests/Sorting/PremiereDateComparerTests.cs | 76 |
10 files changed, 103 insertions, 24 deletions
diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 4bb3f8cae..af5264279 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -3,7 +3,7 @@ "isRoot": true, "tools": { "dotnet-ef": { - "version": "8.0.6", + "version": "8.0.7", "commands": [ "dotnet-ef" ] diff --git a/.github/workflows/ci-codeql-analysis.yml b/.github/workflows/ci-codeql-analysis.yml index 0458f5745..c6ea1d7ca 100644 --- a/.github/workflows/ci-codeql-analysis.yml +++ b/.github/workflows/ci-codeql-analysis.yml @@ -22,16 +22,16 @@ jobs: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - name: Setup .NET - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 with: dotnet-version: '8.0.x' - name: Initialize CodeQL - uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 + uses: github/codeql-action/init@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12 with: languages: ${{ matrix.language }} queries: +security-extended - name: Autobuild - uses: github/codeql-action/autobuild@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 + uses: github/codeql-action/autobuild@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11 + uses: github/codeql-action/analyze@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12 diff --git a/.github/workflows/ci-openapi.yml b/.github/workflows/ci-openapi.yml index 574c614a3..54a061556 100644 --- a/.github/workflows/ci-openapi.yml +++ b/.github/workflows/ci-openapi.yml @@ -21,7 +21,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Setup .NET - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 with: dotnet-version: '8.0.x' - name: Generate openapi.json @@ -55,7 +55,7 @@ jobs: ANCESTOR_REF=$(git merge-base upstream/${{ github.base_ref }} origin/$HEAD_REF) git checkout --progress --force $ANCESTOR_REF - name: Setup .NET - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 + uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 with: dotnet-version: '8.0.x' - name: Generate openapi.json diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 566c1004d..0ac955cc4 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 # v4.0.0 + - uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1 with: dotnet-version: ${{ env.SDK_VERSION }} diff --git a/.github/workflows/commands.yml b/.github/workflows/commands.yml index ee413bb10..b79185855 100644 --- a/.github/workflows/commands.yml +++ b/.github/workflows/commands.yml @@ -132,7 +132,7 @@ jobs: with: repository: jellyfin/jellyfin-triage-script - name: install python - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: '3.12' cache: 'pip' diff --git a/.github/workflows/issue-template-check.yml b/.github/workflows/issue-template-check.yml index f73b2c429..6172455c2 100644 --- a/.github/workflows/issue-template-check.yml +++ b/.github/workflows/issue-template-check.yml @@ -14,7 +14,7 @@ jobs: with: repository: jellyfin/jellyfin-triage-script - name: install python - uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0 + uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1.1 with: python-version: '3.12' cache: 'pip' diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 76d57a478..8f63bd6b4 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -184,6 +184,7 @@ - [GeorgeH005](https://github.com/GeorgeH005) - [Vedant](https://github.com/viktory36/) - [NotSaifA](https://github.com/NotSaifA) + - [HonestlyWhoKnows](https://github.com/honestlywhoknows) # Emby Contributors diff --git a/Directory.Packages.props b/Directory.Packages.props index b563ff695..825301bfc 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -25,24 +25,24 @@ <PackageVersion Include="libse" Version="4.0.5" /> <PackageVersion Include="LrcParser" Version="2023.524.0" /> <PackageVersion Include="MetaBrainz.MusicBrainz" Version="6.1.0" /> - <PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="8.0.6" /> - <PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.6" /> + <PackageVersion Include="Microsoft.AspNetCore.Authorization" Version="8.0.7" /> + <PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.7" /> <PackageVersion Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" /> - <PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.6" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.6" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.6" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.6" /> - <PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.6" /> + <PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.7" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.7" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.7" /> + <PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7" /> <PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" /> <PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" /> <PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" /> - <PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" /> + <PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" /> <PackageVersion Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" /> <PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" /> <PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" /> <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> - <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.6" /> - <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.6" /> + <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.7" /> + <PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.7" /> <PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" /> <PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" /> <PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" /> @@ -60,7 +60,7 @@ <PackageVersion Include="prometheus-net" Version="8.2.1" /> <PackageVersion Include="Serilog.AspNetCore" Version="8.0.1" /> <PackageVersion Include="Serilog.Enrichers.Thread" Version="4.0.0" /> - <PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.1" /> + <PackageVersion Include="Serilog.Settings.Configuration" Version="8.0.2" /> <PackageVersion Include="Serilog.Sinks.Async" Version="2.0.0" /> <PackageVersion Include="Serilog.Sinks.Console" Version="6.0.0" /> <PackageVersion Include="Serilog.Sinks.File" Version="6.0.0" /> @@ -78,8 +78,8 @@ <PackageVersion Include="System.Globalization" Version="4.3.0" /> <PackageVersion Include="System.Linq.Async" Version="6.0.1" /> <PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" /> - <PackageVersion Include="System.Text.Json" Version="8.0.3" /> - <PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.0" /> + <PackageVersion Include="System.Text.Json" Version="8.0.4" /> + <PackageVersion Include="System.Threading.Tasks.Dataflow" Version="8.0.1" /> <PackageVersion Include="TagLibSharp" Version="2.3.0" /> <PackageVersion Include="TMDbLib" Version="2.2.0" /> <PackageVersion Include="UTF.Unknown" Version="2.5.1" /> diff --git a/Emby.Server.Implementations/Localization/Core/et.json b/Emby.Server.Implementations/Localization/Core/et.json index 649229ee5..075bcc9a4 100644 --- a/Emby.Server.Implementations/Localization/Core/et.json +++ b/Emby.Server.Implementations/Localization/Core/et.json @@ -127,5 +127,7 @@ "TaskRefreshTrickplayImages": "Loo eelvaate pildid", "TaskRefreshTrickplayImagesDescription": "Loob eelvaated videotele, kus lubatud.", "TaskAudioNormalization": "Heli Normaliseerimine", - "TaskAudioNormalizationDescription": "Skaneerib faile heli normaliseerimise andmete jaoks." + "TaskAudioNormalizationDescription": "Skaneerib faile heli normaliseerimise andmete jaoks.", + "TaskCleanCollectionsAndPlaylistsDescription": "Eemaldab kogumikest ja esitusloenditest asjad, mida enam ei eksisteeri.", + "TaskCleanCollectionsAndPlaylists": "Puhasta kogumikud ja esitusloendid" } diff --git a/tests/Jellyfin.Server.Implementations.Tests/Sorting/PremiereDateComparerTests.cs b/tests/Jellyfin.Server.Implementations.Tests/Sorting/PremiereDateComparerTests.cs new file mode 100644 index 000000000..9dfacb2bf --- /dev/null +++ b/tests/Jellyfin.Server.Implementations.Tests/Sorting/PremiereDateComparerTests.cs @@ -0,0 +1,76 @@ +using System; +using Emby.Server.Implementations.Sorting; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities.Movies; +using Xunit; + +namespace Jellyfin.Server.Implementations.Tests.Sorting +{ + public class PremiereDateComparerTests + { + private readonly PremiereDateComparer _cmp = new PremiereDateComparer(); + + [Theory] + [ClassData(typeof(PremiereDateTestData))] + public void PremiereDateCompareTest(BaseItem x, BaseItem y, int expected) + { + Assert.Equal(expected, _cmp.Compare(x, y)); + Assert.Equal(-expected, _cmp.Compare(y, x)); + } + + private sealed class PremiereDateTestData : TheoryData<BaseItem, BaseItem, int> + { + public PremiereDateTestData() + { + // Happy case - Both have premier date + // Expected: x listed first + Add( + new Movie { PremiereDate = new DateTime(2018, 1, 1) }, + new Movie { PremiereDate = new DateTime(2018, 1, 3) }, + -1); + + // Both have premiere date, but y has invalid date + // Expected: y listed first + Add( + new Movie { PremiereDate = new DateTime(2019, 1, 1) }, + new Movie { PremiereDate = new DateTime(03, 1, 1) }, + 1); + + // Only x has premiere date, with earlier year than y + // Expected: x listed first + Add( + new Movie { PremiereDate = new DateTime(2020, 1, 1) }, + new Movie { ProductionYear = 2021 }, + -1); + + // Only x has premiere date, with same year as y + // Expected: y listed first + Add( + new Movie { PremiereDate = new DateTime(2022, 1, 2) }, + new Movie { ProductionYear = 2022 }, + 1); + + // Only x has a premiere date, with later year than y + // Expected: y listed first + Add( + new Movie { PremiereDate = new DateTime(2024, 3, 1) }, + new Movie { ProductionYear = 2023 }, + 1); + + // Only x has a premiere date, y has an invalid year + // Expected: y listed first + Add( + new Movie { PremiereDate = new DateTime(2025, 1, 1) }, + new Movie { ProductionYear = 0 }, + 1); + + // Only x has a premiere date, y has neither date nor year + // Expected: y listed first + Add( + new Movie { PremiereDate = new DateTime(2026, 1, 1) }, + new Movie(), + 1); + } + } + } +} |
