Added setting to set the category when a torrent is imported from RealDebrid or other provider.
This commit is contained in:
parent
05df0cb558
commit
dc16108983
8 changed files with 26 additions and 2 deletions
|
|
@ -4,6 +4,9 @@ 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.7] - 2022-02-06
|
||||
- Added setting to set the category when a torrent is imported from RealDebrid or other provider.
|
||||
|
||||
## [2.0.6] - 2022-02-06
|
||||
### Added
|
||||
- Added setting to automatically delete torrents in the state of error after a certain amount of time.
|
||||
|
|
|
|||
|
|
@ -69,6 +69,13 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label">Automatically import category.</label>
|
||||
<div class="control">
|
||||
<input class="input" type="text" maxlength="100" [(ngModel)]="settingProviderAutoImportCategory" />
|
||||
</div>
|
||||
<p class="help">When a torrent is imported assign it this category.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
<div class="control">
|
||||
<label class="checkbox">
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ export class SettingsComponent implements OnInit {
|
|||
public settingLogLevel: string;
|
||||
public settingProvider: string;
|
||||
public settingProviderAutoImport: boolean;
|
||||
public settingProviderAutoImportCategory: string;
|
||||
public settingProviderAutoDelete: boolean;
|
||||
public settingRealDebridApiKey: string;
|
||||
public settingDownloadPath: string;
|
||||
|
|
@ -62,6 +63,7 @@ export class SettingsComponent implements OnInit {
|
|||
(results) => {
|
||||
this.settingProvider = this.getSetting(results, 'Provider');
|
||||
this.settingProviderAutoImport = this.getSetting(results, 'ProviderAutoImport') === '1';
|
||||
this.settingProviderAutoImportCategory = this.getSetting(results, 'ProviderAutoImportCategory');
|
||||
this.settingProviderAutoDelete = this.getSetting(results, 'ProviderAutoDelete') === '1';
|
||||
this.settingRealDebridApiKey = this.getSetting(results, 'RealDebridApiKey');
|
||||
this.settingLogLevel = this.getSetting(results, 'LogLevel');
|
||||
|
|
@ -102,6 +104,10 @@ export class SettingsComponent implements OnInit {
|
|||
settingId: 'ProviderAutoImport',
|
||||
value: this.settingProviderAutoImport ? '1' : '0',
|
||||
},
|
||||
{
|
||||
settingId: 'ProviderAutoImportCategory',
|
||||
value: this.settingProviderAutoImportCategory,
|
||||
},
|
||||
{
|
||||
settingId: 'ProviderAutoDelete',
|
||||
value: this.settingProviderAutoDelete ? '1' : '0',
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "rdt-client",
|
||||
"version": "2.0.6",
|
||||
"version": "2.0.7",
|
||||
"description": "This is a web interface to manage your torrents on Real-Debrid.",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@ namespace RdtClient.Data.Data
|
|||
Value = "0"
|
||||
},
|
||||
new Setting
|
||||
{
|
||||
SettingId = "ProviderAutoImportCategory",
|
||||
Type = "String",
|
||||
Value = ""
|
||||
},
|
||||
new Setting
|
||||
{
|
||||
SettingId = "ProviderAutoDelete",
|
||||
Type = "Int32",
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ namespace RdtClient.Data.Data
|
|||
{
|
||||
Provider = GetString("Provider"),
|
||||
ProviderAutoImport = GetInt32("ProviderAutoImport"),
|
||||
ProviderAutoImportCategory = GetString("ProviderAutoImportCategory"),
|
||||
ProviderAutoDelete = GetInt32("ProviderAutoDelete"),
|
||||
RealDebridApiKey = GetString("RealDebridApiKey"),
|
||||
DownloadPath = GetString("DownloadPath"),
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ namespace RdtClient.Data.Models.Internal
|
|||
{
|
||||
public String Provider { get; set; }
|
||||
public Int32 ProviderAutoImport { get; set; }
|
||||
public String ProviderAutoImportCategory { get; set; }
|
||||
public Int32 ProviderAutoDelete { get; set; }
|
||||
public String RealDebridApiKey { get; set; }
|
||||
public String DownloadPath { get; set; }
|
||||
|
|
|
|||
|
|
@ -360,7 +360,7 @@ namespace RdtClient.Service.Services
|
|||
{
|
||||
var newTorrent = new Torrent
|
||||
{
|
||||
Category = null,
|
||||
Category = Settings.Get.ProviderAutoImportCategory,
|
||||
DownloadAction = TorrentDownloadAction.DownloadManual,
|
||||
FinishedAction = TorrentFinishedAction.None,
|
||||
DownloadMinSize = 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue