From 79315688033c8a055049f0b80e91311d5cebb188 Mon Sep 17 00:00:00 2001 From: Roger Far Date: Mon, 2 Aug 2021 13:37:22 -0600 Subject: [PATCH] Fixed bug where downloads weren't starting properly. Bump to 1.8.2. --- CHANGELOG.md | 4 ++++ client/src/app/navbar/navbar.component.html | 2 +- package.json | 2 +- server/RdtClient.Service/Services/TaskRunner.cs | 2 +- server/RdtClient.Service/Services/TorrentRunner.cs | 2 ++ server/RdtClient.Service/Services/Torrents.cs | 4 +++- server/RdtClient.Web/RdtClient.Web.csproj | 2 +- 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a149db..2ece04d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.8.2] - 2021-08-02 +### Changed +- Fixed issue with starting downloads. + ## [1.8.1] - 2021-07-31 ### Changed - Fixed issue where downloads were hanging the full interface. diff --git a/client/src/app/navbar/navbar.component.html b/client/src/app/navbar/navbar.component.html index 19bdde6..8aa663e 100644 --- a/client/src/app/navbar/navbar.component.html +++ b/client/src/app/navbar/navbar.component.html @@ -55,7 +55,7 @@ Profile Logout - + diff --git a/package.json b/package.json index cd97142..234a114 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rdt-client", - "version": "1.8.1", + "version": "1.8.2", "description": "This is a web interface to manage your torrents on Real-Debrid.", "main": "index.js", "dependencies": { diff --git a/server/RdtClient.Service/Services/TaskRunner.cs b/server/RdtClient.Service/Services/TaskRunner.cs index cd6d224..9919c3e 100644 --- a/server/RdtClient.Service/Services/TaskRunner.cs +++ b/server/RdtClient.Service/Services/TaskRunner.cs @@ -46,7 +46,7 @@ namespace RdtClient.Service.Services Torrents.TorrentResetLock.Release(); } - await Task.Delay(TimeSpan.FromSeconds(2), stoppingToken); + await Task.Delay(TimeSpan.FromSeconds(1), stoppingToken); } _logger.LogInformation("TaskRunner stopped."); diff --git a/server/RdtClient.Service/Services/TorrentRunner.cs b/server/RdtClient.Service/Services/TorrentRunner.cs index 5fb1c25..45d0640 100644 --- a/server/RdtClient.Service/Services/TorrentRunner.cs +++ b/server/RdtClient.Service/Services/TorrentRunner.cs @@ -354,6 +354,8 @@ namespace RdtClient.Service.Services // The files are selected but there are no downloads yet, check if Real-Debrid has generated links yet. if (torrent.Downloads.Count == 0 && torrent.FilesSelected != null) { + Log.Debug($"Torrent {torrent.RdId} checking for links"); + await _torrents.CheckForLinks(torrent.TorrentId); } diff --git a/server/RdtClient.Service/Services/Torrents.cs b/server/RdtClient.Service/Services/Torrents.cs index 632bd63..795184d 100644 --- a/server/RdtClient.Service/Services/Torrents.cs +++ b/server/RdtClient.Service/Services/Torrents.cs @@ -171,7 +171,9 @@ namespace RdtClient.Service.Services var rdTorrent = await GetRdNetClient().Torrents.GetInfoAsync(torrent.RdId); // Sometimes RD will give you 1 rar with all files, sometimes it will give you 1 link per file. - if (torrent.Files.Count != rdTorrent.Links.Count && rdTorrent.Links.Count != 1) + if (torrent.Files.Count(m => m.Selected) != rdTorrent.Links.Count && + torrent.ManualFiles.Count != rdTorrent.Links.Count && + rdTorrent.Links.Count != 1) { return; } diff --git a/server/RdtClient.Web/RdtClient.Web.csproj b/server/RdtClient.Web/RdtClient.Web.csproj index 9505a39..bd5a5d4 100644 --- a/server/RdtClient.Web/RdtClient.Web.csproj +++ b/server/RdtClient.Web/RdtClient.Web.csproj @@ -4,7 +4,7 @@ net5.0 Exe 94c24cba-f03f-4453-a671-3640b517c573 - 1.8.1 + 1.8.2