diff --git a/CHANGELOG.md b/CHANGELOG.md
index 706c60c..8c6eadf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,11 @@ 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).
+## [2.0.27] - 2023-04-08
+### Changed
+- Fixed Premiumize selecting of files.
+- Updated internal downloader to report download speeds better.
+
## [2.0.26] - 2023-03-30
### Changed
- Add some logging for Premiumize to better understand errors.
diff --git a/client/src/app/navbar/navbar.component.html b/client/src/app/navbar/navbar.component.html
index c847305..f124591 100644
--- a/client/src/app/navbar/navbar.component.html
+++ b/client/src/app/navbar/navbar.component.html
@@ -55,7 +55,7 @@
Profile
Logout
- Version 2.0.26
+ Version 2.0.27
diff --git a/package.json b/package.json
index 35422f0..3849cfb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "rdt-client",
- "version": "2.0.26",
+ "version": "2.0.27",
"description": "This is a web interface to manage your torrents on Real-Debrid.",
"main": "index.js",
"dependencies": {
diff --git a/server/RdtClient.Data/RdtClient.Data.csproj b/server/RdtClient.Data/RdtClient.Data.csproj
index 375756b..d47e838 100644
--- a/server/RdtClient.Data/RdtClient.Data.csproj
+++ b/server/RdtClient.Data/RdtClient.Data.csproj
@@ -8,11 +8,11 @@
-
-
-
-
-
+
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/server/RdtClient.Service/RdtClient.Service.csproj b/server/RdtClient.Service/RdtClient.Service.csproj
index d13e93c..a76a848 100644
--- a/server/RdtClient.Service/RdtClient.Service.csproj
+++ b/server/RdtClient.Service/RdtClient.Service.csproj
@@ -11,7 +11,7 @@
-
+
diff --git a/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs b/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs
index 8f88d69..79ebdf7 100644
--- a/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs
+++ b/server/RdtClient.Service/Services/Downloaders/InternalDownloader.cs
@@ -43,7 +43,7 @@ public class InternalDownloader : IDownloader
DownloadProgress.Invoke(this,
new DownloadProgressEventArgs
{
- Speed = (Int64) args.Average(m => m.Speed),
+ Speed = (Int64) args.Sum(m => m.Speed),
BytesDone = args.Sum(m => m.DownloadBytes),
BytesTotal = args.Sum(m => m.LengthBytes)
});
diff --git a/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs b/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs
index e62d364..d62fc91 100644
--- a/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs
+++ b/server/RdtClient.Service/Services/TorrentClients/PremiumizeTorrentClient.cs
@@ -235,21 +235,32 @@ public class PremiumizeTorrentClient : ITorrentClient
if (transfer == null)
{
- Log($"Transfer {torrent.RdId} not found!", torrent);
- return null;
+ throw new Exception($"Transfer {torrent.RdId} not found!");
}
- if (String.IsNullOrWhiteSpace(transfer.FolderId))
+ List downloadLinks;
+ if (!String.IsNullOrWhiteSpace(transfer.FolderId))
{
- Log($"Transfer {torrent.RdId} has no folderId!", torrent);
- return null;
+ var files = await GetClient().Folder.ListAsync(transfer.FolderId);
+ downloadLinks = files.Content.Where(m => !String.IsNullOrWhiteSpace(m.Link)).Select(m => m.Link).ToList();
+
+ Log($"Found {downloadLinks.Count} links in folder {transfer.FolderId}", torrent);
}
+ else if (!String.IsNullOrWhiteSpace(transfer.FileId))
+ {
+ var file = await GetClient().Items.DetailsAsync(transfer.FileId);
- var files = await GetClient().Folder.ListAsync(transfer.FolderId);
+ downloadLinks = new List
+ {
+ file.Link
+ };
- var downloadLinks = files.Content.Where(m => !String.IsNullOrWhiteSpace(m.Link)).Select(m => m.Link).ToList();
-
- Log($"Found {downloadLinks.Count} links", torrent);
+ Log($"Found {transfer.FileId}", torrent);
+ }
+ else
+ {
+ throw new Exception($"Transfer {torrent.RdId} has no folderId or fileId!");
+ }
foreach (var link in downloadLinks)
{
diff --git a/server/RdtClient.Web/RdtClient.Web.csproj b/server/RdtClient.Web/RdtClient.Web.csproj
index e7ca979..73d43ca 100644
--- a/server/RdtClient.Web/RdtClient.Web.csproj
+++ b/server/RdtClient.Web/RdtClient.Web.csproj
@@ -4,7 +4,7 @@
net6.0
Exe
94c24cba-f03f-4453-a671-3640b517c573
- 2.0.26
+ 2.0.27
enable
enable
latest
@@ -29,15 +29,15 @@
-
-
-
-
+
+
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+