Fix deleting torrents from provider
This commit is contained in:
parent
183798db2d
commit
e60059a5bd
2 changed files with 3 additions and 5 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
<PackageReference Include="Serilog" Version="4.0.0" />
|
<PackageReference Include="Serilog" Version="4.0.0" />
|
||||||
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
|
||||||
<PackageReference Include="SharpCompress" Version="0.37.2" />
|
<PackageReference Include="SharpCompress" Version="0.37.2" />
|
||||||
<PackageReference Include="TorBox.NET" Version="1.0.0.23" />
|
<PackageReference Include="TorBox.NET" Version="1.0.0.25" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -168,15 +168,13 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
||||||
|
|
||||||
public async Task Delete(String torrentId)
|
public async Task Delete(String torrentId)
|
||||||
{
|
{
|
||||||
await GetClient().Torrents.ControlAsync(Convert.ToInt32(torrentId), "delete");
|
await GetClient().Torrents.ControlAsync(torrentId, "delete");
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<String> Unrestrict(String link)
|
public async Task<String> Unrestrict(String link)
|
||||||
{
|
{
|
||||||
var torrentFile = new List<string>(link.Split('/'));
|
var torrentFile = new List<string>(link.Split('/'));
|
||||||
var torrentID = torrentFile[4];
|
var result = await GetClient().Unrestrict.LinkAsync(torrentID: torrentFile[4], fileID: torrentFile[5]);
|
||||||
var fileID = torrentFile[5];
|
|
||||||
var result = await GetClient().Unrestrict.LinkAsync(torrentID, fileID);
|
|
||||||
|
|
||||||
if (result.Error != null)
|
if (result.Error != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue