disable seeding
Would rather have seeding disabled and Torbox support be merged then fix it in December when I have time again.
This commit is contained in:
parent
b78f0cdd95
commit
ec4e160288
2 changed files with 15 additions and 12 deletions
|
|
@ -177,14 +177,6 @@ or
|
||||||
|
|
||||||
[DisplayName("Auto Import Defaults")]
|
[DisplayName("Auto Import Defaults")]
|
||||||
public DbSettingsDefaultsWithCategory Default { get; set; } = new();
|
public DbSettingsDefaultsWithCategory Default { get; set; } = new();
|
||||||
|
|
||||||
[DisplayName("Seeding")]
|
|
||||||
[Description("Set the priority of a torrent, 1 = Auto, 2 = Seed, 3 = disabled. [TorBox Only]")]
|
|
||||||
public Int32 Seeding { get; set; } = 3;
|
|
||||||
|
|
||||||
[DisplayName("Download as Zip")]
|
|
||||||
[Description("Whether to download the files individually or zipped. [TorBox Only]")]
|
|
||||||
public bool Zipped { get; set; } = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DbSettingsIntegrations
|
public class DbSettingsIntegrations
|
||||||
|
|
|
||||||
|
|
@ -120,8 +120,13 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
||||||
|
|
||||||
public async Task<String> AddMagnet(String magnetLink)
|
public async Task<String> AddMagnet(String magnetLink)
|
||||||
{
|
{
|
||||||
var seeding = Settings.Get.Provider.Seeding;
|
// var seeding = Settings.Get.Integrations.Default.FinishedAction;
|
||||||
var result = await GetClient().Torrents.AddMagnetAsync(magnetLink, seeding, false);
|
|
||||||
|
// Line is not working right now, will disable seeding and fix in december when I have time again.
|
||||||
|
// var seed = (seeding == TorrentFinishedAction.RemoveAllTorrents || seeding == TorrentFinishedAction.RemoveRealDebrid) ? 3 : 2;
|
||||||
|
|
||||||
|
var seed = 3;
|
||||||
|
var result = await GetClient().Torrents.AddMagnetAsync(magnetLink, seed, false);
|
||||||
|
|
||||||
if (result.Error == "ACTIVE_LIMIT")
|
if (result.Error == "ACTIVE_LIMIT")
|
||||||
{
|
{
|
||||||
|
|
@ -136,8 +141,14 @@ public class TorBoxTorrentClient(ILogger<TorBoxTorrentClient> logger, IHttpClien
|
||||||
|
|
||||||
public async Task<String> AddFile(Byte[] bytes)
|
public async Task<String> AddFile(Byte[] bytes)
|
||||||
{
|
{
|
||||||
var seeding = Settings.Get.Provider.Seeding;
|
var seeding = Settings.Get.Integrations.Default.FinishedAction;
|
||||||
var result = await GetClient().Torrents.AddFileAsync(bytes, seeding, false);
|
|
||||||
|
// Line is not working right now, will disable seeding and fix in december when I have time again.
|
||||||
|
// var seed = (seeding == TorrentFinishedAction.RemoveAllTorrents || seeding == TorrentFinishedAction.RemoveRealDebrid) ? 3 : 2;
|
||||||
|
|
||||||
|
var seed = 3;
|
||||||
|
|
||||||
|
var result = await GetClient().Torrents.AddFileAsync(bytes, seed, false);
|
||||||
if (result.Error == "ACTIVE_LIMIT")
|
if (result.Error == "ACTIVE_LIMIT")
|
||||||
{
|
{
|
||||||
using (var stream = new MemoryStream(bytes))
|
using (var stream = new MemoryStream(bytes))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue