Fixed Premiumize selecting of files when there is no folder.
Some checks failed
Docker Image CI / build (push) Has been cancelled
Some checks failed
Docker Image CI / build (push) Has been cancelled
This commit is contained in:
parent
e1d7c07598
commit
8b8943c3c5
8 changed files with 40 additions and 24 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<a class="navbar-item" routerLink="profile"> Profile </a>
|
||||
<a class="navbar-item" (click)="logout()"> Logout </a>
|
||||
<hr class="navbar-divider" />
|
||||
<div class="navbar-item">Version 2.0.26</div>
|
||||
<div class="navbar-item">Version 2.0.27</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
|
||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.15">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="AllDebrid.NET" Version="1.0.12" />
|
||||
<PackageReference Include="Aria2.NET" Version="1.0.5" />
|
||||
<PackageReference Include="Downloader.NET" Version="1.0.0" />
|
||||
<PackageReference Include="Downloader.NET" Version="1.0.2" />
|
||||
<PackageReference Include="MonoTorrent" Version="2.0.7" />
|
||||
<PackageReference Include="Premiumize.NET" Version="1.0.3" />
|
||||
<PackageReference Include="RD.NET" Version="2.1.4" />
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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<String> 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<String>
|
||||
{
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<TargetFramework>net6.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
<UserSecretsId>94c24cba-f03f-4453-a671-3640b517c573</UserSecretsId>
|
||||
<Version>2.0.26</Version>
|
||||
<Version>2.0.27</Version>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
|
|
@ -29,15 +29,15 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
|
||||
<PackageReference Include="Microsoft.AspNetCore.SpaServices.Extensions" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="6.0.15" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.15">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="6.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="6.0.14" />
|
||||
<PackageReference Include="Microsoft.Extensions.Identity.Core" Version="6.0.15" />
|
||||
<PackageReference Include="Serilog" Version="2.12.0" />
|
||||
<PackageReference Include="Serilog.AspNetCore" Version="6.1.0" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
|
|
|
|||
Loading…
Reference in a new issue