diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index 3ed1c78..4fd1c04 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -33,7 +33,7 @@ jobs: runs-on: ${{ matrix.config.runs-on }} steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Extract version and patch .csproj run: | @@ -127,7 +127,7 @@ jobs: ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.APP_NAME }}@${{ needs.build.outputs.digest-arm64 }} - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Docker Hub Registry Description if: ${{ env.ENABLE_DOCKERHUB == 1 }} diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 008ec02..8453c6e 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -16,17 +16,17 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version: "lts/*" - name: Set up .NET - uses: actions/setup-dotnet@v3 + uses: actions/setup-dotnet@v5 with: dotnet-version: '9' @@ -67,7 +67,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 diff --git a/.github/workflows/dotnet-test.yml b/.github/workflows/dotnet-test.yml index 78b25ca..7345ced 100644 --- a/.github/workflows/dotnet-test.yml +++ b/.github/workflows/dotnet-test.yml @@ -11,11 +11,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Setup .NET - uses: actions/setup-dotnet@v4 + uses: actions/setup-dotnet@v5 with: - dotnet-version: 9.0.x + dotnet-version: 10.0.x - name: Restore dependencies run: dotnet restore server - name: Build diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bc05a3..6d54a95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased +## [2.0.120] - 2026-02-11 +### Changed +- Upgrade to .NET 10. +- Upgrade to Angular 21. + ## [2.0.119] - 2025-10-13 ### Removed - Removed internal downloader from the GUI. diff --git a/Dockerfile b/Dockerfile index fdab022..e60b133 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Stage 1 - Build the frontend -FROM node:22.16.0-alpine3.22 AS node-build-env +FROM node:lts-alpine AS node-build-env ARG TARGETPLATFORM ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} ARG BUILDPLATFORM @@ -21,7 +21,7 @@ RUN \ RUN ls -FCla /appclient/root # Stage 2 - Build the backend -FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS dotnet-build-env +FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS dotnet-build-env ARG TARGETPLATFORM ENV TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} ARG BUILDPLATFORM @@ -67,14 +67,14 @@ RUN \ RUN \ if [ "$TARGETPLATFORM" = "linux/arm/v7" ] ; then \ - wget https://download.visualstudio.microsoft.com/download/pr/59a041e1-921e-405e-8092-95333f80f9ca/63e83e3feb70e05ca05ed5db3c579be2/aspnetcore-runtime-9.0.0-linux-musl-arm.tar.gz && \ - tar zxf aspnetcore-runtime-9.0.0-linux-musl-arm.tar.gz -C /usr/share/dotnet ; \ + wget https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.0/aspnetcore-runtime-10.0.0-linux-musl-arm.tar.gz && \ + tar zxf aspnetcore-runtime-10.0.0-linux-musl-arm.tar.gz -C /usr/share/dotnet ; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ] ; then \ - wget https://download.visualstudio.microsoft.com/download/pr/e137f557-83cb-4f55-b1c8-e5f59ccd3cba/b8ba6f2ab96d0961757b71b00c201f31/aspnetcore-runtime-9.0.0-linux-musl-arm64.tar.gz && \ - tar zxf aspnetcore-runtime-9.0.0-linux-musl-arm64.tar.gz -C /usr/share/dotnet ; \ + wget https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.0/aspnetcore-runtime-10.0.0-linux-musl-arm64.tar.gz && \ + tar zxf aspnetcore-runtime-10.0.0-linux-musl-arm64.tar.gz -C /usr/share/dotnet ; \ else \ - wget https://download.visualstudio.microsoft.com/download/pr/86d7a513-fe71-4f37-b9ec-fdcf5566cce8/e72574fc82d7496c73a61f411d967d8e/aspnetcore-runtime-9.0.0-linux-musl-x64.tar.gz && \ - tar zxf aspnetcore-runtime-9.0.0-linux-musl-x64.tar.gz -C /usr/share/dotnet ; \ + wget https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.0/aspnetcore-runtime-10.0.0-linux-musl-x64.tar.gz && \ + tar zxf aspnetcore-runtime-10.0.0-linux-musl-x64.tar.gz -C /usr/share/dotnet ; \ fi RUN \ diff --git a/server/RdtClient.Data/RdtClient.Data.csproj b/server/RdtClient.Data/RdtClient.Data.csproj index 3a82264..d23a9f1 100644 --- a/server/RdtClient.Data/RdtClient.Data.csproj +++ b/server/RdtClient.Data/RdtClient.Data.csproj @@ -1,22 +1,22 @@ - net9.0 + net10.0 enable enable latest - - - - - + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + diff --git a/server/RdtClient.Service.Test/RdtClient.Service.Test.csproj b/server/RdtClient.Service.Test/RdtClient.Service.Test.csproj index 3313d85..638c85a 100644 --- a/server/RdtClient.Service.Test/RdtClient.Service.Test.csproj +++ b/server/RdtClient.Service.Test/RdtClient.Service.Test.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable false @@ -15,11 +15,11 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - + + + all diff --git a/server/RdtClient.Service/RdtClient.Service.csproj b/server/RdtClient.Service/RdtClient.Service.csproj index 3d042d8..afa389b 100644 --- a/server/RdtClient.Service/RdtClient.Service.csproj +++ b/server/RdtClient.Service/RdtClient.Service.csproj @@ -1,7 +1,7 @@  - net9.0 + net10.0 enable enable latest @@ -12,19 +12,19 @@ - - - + + + - + - + - + - - + + diff --git a/server/RdtClient.Service/Services/Downloaders/BezzadDownloader.cs b/server/RdtClient.Service/Services/Downloaders/BezzadDownloader.cs index be503e7..15963ca 100644 --- a/server/RdtClient.Service/Services/Downloaders/BezzadDownloader.cs +++ b/server/RdtClient.Service/Services/Downloaders/BezzadDownloader.cs @@ -35,7 +35,6 @@ public class BezzadDownloader : IDownloader MaxTryAgainOnFailure = 5, RangeDownload = false, ClearPackageOnCompletionWithFailure = true, - ReserveStorageSpaceBeforeStartingDownload = false, CheckDiskSizeBeforeDownload = false, MaximumMemoryBufferBytes = 1024 * 1024 * 10, RequestConfiguration = @@ -171,7 +170,8 @@ public class BezzadDownloader : IDownloader _downloadConfiguration.MaximumBytesPerSecond = settingDownloadMaxSpeed; _downloadConfiguration.ParallelDownload = settingParallelCount > 1; _downloadConfiguration.ParallelCount = settingParallelCount; - _downloadConfiguration.Timeout = settingDownloadTimeout; + _downloadConfiguration.BlockTimeout = settingDownloadTimeout; + _downloadConfiguration.HttpClientTimeout = settingDownloadTimeout; } private async Task StartTimer() diff --git a/server/RdtClient.Service/Services/UnpackClient.cs b/server/RdtClient.Service/Services/UnpackClient.cs index d5e1cd7..5efe3b0 100644 --- a/server/RdtClient.Service/Services/UnpackClient.cs +++ b/server/RdtClient.Service/Services/UnpackClient.cs @@ -1,10 +1,10 @@ -using System.Diagnostics; -using RdtClient.Data.Models.Data; +using RdtClient.Data.Models.Data; using RdtClient.Service.Helpers; using RdtClient.Service.Services.TorrentClients; using SharpCompress.Archives; using SharpCompress.Archives.Rar; using SharpCompress.Archives.Zip; +using SharpCompress.Common; namespace RdtClient.Service.Services; @@ -129,11 +129,11 @@ public class UnpackClient(Download download, String destinationPath) IArchive archive; if (extension == ".zip") { - archive = ZipArchive.Open(stream); + archive = ZipArchive.OpenArchive(stream); } else { - archive = RarArchive.Open(stream); + archive = RarArchive.OpenArchive(stream); } var entries = archive.Entries @@ -157,20 +157,18 @@ public class UnpackClient(Download download, String destinationPath) IArchive archive; if (extension == ".zip") { - archive = ZipArchive.Open(fi); + archive = ZipArchive.OpenArchive(fi); } else { - archive = RarArchive.Open(fi); + archive = RarArchive.OpenArchive(fi); } - archive.ExtractToDirectory(extractPath, - d => - { - Debug.WriteLine(d); - Progess = (Int32)Math.Round(d); - }, - cancellationToken: cancellationToken); + archive.WriteToDirectory(extractPath, + new Progress(d => + { + Progess = (Int32)Math.Round(d.PercentComplete ?? 0); + })); archive.Dispose(); diff --git a/server/RdtClient.Web/Controllers/TorrentsController.cs b/server/RdtClient.Web/Controllers/TorrentsController.cs index fd3a0dc..a1ba703 100644 --- a/server/RdtClient.Web/Controllers/TorrentsController.cs +++ b/server/RdtClient.Web/Controllers/TorrentsController.cs @@ -2,7 +2,9 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using MonoTorrent; +using RdtClient.Data.Models.Internal; using RdtClient.Data.Models.TorrentClient; +using RdtClient.Service.BackgroundServices; using RdtClient.Service.Helpers; using RdtClient.Service.Services; using Torrent = RdtClient.Data.Models.Data.Torrent; @@ -47,9 +49,9 @@ public class TorrentsController(ILogger logger, Torrents tor [HttpGet] [Route("DiskSpaceStatus")] - public ActionResult GetDiskSpaceStatus() + public ActionResult GetDiskSpaceStatus() { - var status = RdtClient.Service.BackgroundServices.DiskSpaceMonitor.GetCurrentStatus(); + var status = DiskSpaceMonitor.GetCurrentStatus(); return Ok(status); } diff --git a/server/RdtClient.Web/RdtClient.Web.csproj b/server/RdtClient.Web/RdtClient.Web.csproj index 9cf16e9..f5b2caf 100644 --- a/server/RdtClient.Web/RdtClient.Web.csproj +++ b/server/RdtClient.Web/RdtClient.Web.csproj @@ -1,7 +1,7 @@ - net9.0 + net10.0 Exe 94c24cba-f03f-4453-a671-3640b517c573 1.0.0 @@ -30,17 +30,17 @@ - - - - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - + + + +