Fixed setup screen and some labels. Removed 100 char limit on inputs.
This commit is contained in:
parent
2b39f92106
commit
95574847e9
14 changed files with 36 additions and 32 deletions
|
|
@ -66,7 +66,7 @@
|
||||||
</div>
|
</div>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
When a torrent is finished downloading on the provider, perform this action. Use this setting if you only want
|
When a torrent is finished downloading on the provider, perform this action. Use this setting if you only want
|
||||||
to add files to Real-Debrid but not download them to the host.
|
to add files to your debrid provider but not download them to the host.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -132,7 +132,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Category</label>
|
<label class="label">Category</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" type="text" maxlength="100" [(ngModel)]="category" />
|
<input class="input" type="text" [(ngModel)]="category" />
|
||||||
</div>
|
</div>
|
||||||
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -188,7 +188,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Available files</label>
|
<label class="label">Available files</label>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
These files are available for immediate download from Real-Debrid. <br />
|
These files are available for immediate download from your debrid provider. <br />
|
||||||
It is possible that there are more files in the torrent, which are not shown here.<br />
|
It is possible that there are more files in the torrent, which are not shown here.<br />
|
||||||
</p>
|
</p>
|
||||||
<div class="scroll-container">
|
<div class="scroll-container">
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export class AuthService {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public setupProvider(provider: string, token: string): Observable<void> {
|
public setupProvider(provider: number, token: string): Observable<void> {
|
||||||
return this.http.post<void>(`${this.baseHref}Api/Authentication/SetupProvider`, {
|
return this.http.post<void>(`${this.baseHref}Api/Authentication/SetupProvider`, {
|
||||||
provider,
|
provider,
|
||||||
token,
|
token,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Login username</label>
|
<label class="label">Login username</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" type="text" minlength="1" maxlength="100" [(ngModel)]="username" />
|
<input class="input" type="text" minlength="1" [(ngModel)]="username" />
|
||||||
</div>
|
</div>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
This is the username you use to login Real-Debrid Client. Only change this if you want to change the username.
|
This is the username you use to login Real-Debrid Client. Only change this if you want to change the username.
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Login password</label>
|
<label class="label">Login password</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" type="password" minlength="1" maxlength="100" [(ngModel)]="password" />
|
<input class="input" type="password" minlength="1" [(ngModel)]="password" />
|
||||||
</div>
|
</div>
|
||||||
<p class="help">
|
<p class="help">
|
||||||
This is the password you use to login Real-Debrid Client. Only change this if you want to change the password.
|
This is the password you use to login Real-Debrid Client. Only change this if you want to change the password.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
}}</label>
|
}}</label>
|
||||||
<ng-container [ngSwitch]="setting.type">
|
<ng-container [ngSwitch]="setting.type">
|
||||||
<div class="control" *ngSwitchCase="'String'">
|
<div class="control" *ngSwitchCase="'String'">
|
||||||
<input class="input" type="text" maxlength="100" [(ngModel)]="setting.value" />
|
<input class="input" type="text" [(ngModel)]="setting.value" />
|
||||||
</div>
|
</div>
|
||||||
<div class="control" *ngSwitchCase="'Int32'">
|
<div class="control" *ngSwitchCase="'Int32'">
|
||||||
<input class="input" type="number" [(ngModel)]="setting.value" />
|
<input class="input" type="number" [(ngModel)]="setting.value" />
|
||||||
|
|
|
||||||
|
|
@ -62,9 +62,9 @@
|
||||||
<label class="label">Provider</label>
|
<label class="label">Provider</label>
|
||||||
<div class="control select is-fullwidth">
|
<div class="control select is-fullwidth">
|
||||||
<select [(ngModel)]="provider">
|
<select [(ngModel)]="provider">
|
||||||
<option [value]="0">Real-Debrid</option>
|
<option [ngValue]="0">Real-Debrid</option>
|
||||||
<option [value]="1">AllDebrid</option>
|
<option [ngValue]="1">AllDebrid</option>
|
||||||
<option [value]="2">Premiumize</option>
|
<option [ngValue]="2">Premiumize</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -73,19 +73,19 @@
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input type="text" placeholder="" class="input" name="token" [(ngModel)]="token" required />
|
<input type="text" placeholder="" class="input" name="token" [(ngModel)]="token" required />
|
||||||
</div>
|
</div>
|
||||||
<p class="help" *ngIf="provider === 'RealDebrid'">
|
<p class="help" *ngIf="provider === 0">
|
||||||
You can find your API key here:
|
You can find your API key here:
|
||||||
<a href="https://real-debrid.com/apitoken" target="_blank" rel="noopener"
|
<a href="https://real-debrid.com/apitoken" target="_blank" rel="noopener"
|
||||||
>https://real-debrid.com/apitoken</a
|
>https://real-debrid.com/apitoken</a
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
<p class="help" *ngIf="provider === 'AllDebrid'">
|
<p class="help" *ngIf="provider === 1">
|
||||||
You can find your API key here:
|
You can find your API key here:
|
||||||
<a href="https://alldebrid.com/apikeys/" target="_blank" rel="noopener"
|
<a href="https://alldebrid.com/apikeys/" target="_blank" rel="noopener"
|
||||||
>https://alldebrid.com/apikeys/</a
|
>https://alldebrid.com/apikeys/</a
|
||||||
>.
|
>.
|
||||||
</p>
|
</p>
|
||||||
<p class="help" *ngIf="provider === 'Premiumize'">
|
<p class="help" *ngIf="provider === 2">
|
||||||
You can find your API key here:
|
You can find your API key here:
|
||||||
<a href="https://www.premiumize.me/account" target="_blank" rel="noopener"
|
<a href="https://www.premiumize.me/account" target="_blank" rel="noopener"
|
||||||
>https://www.premiumize.me/account</a
|
>https://www.premiumize.me/account</a
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ import { AuthService } from '../auth.service';
|
||||||
export class SetupComponent {
|
export class SetupComponent {
|
||||||
public userName: string;
|
public userName: string;
|
||||||
public password: string;
|
public password: string;
|
||||||
public provider = 'RealDebrid';
|
public provider = 0;
|
||||||
public token: string;
|
public token: string;
|
||||||
|
|
||||||
public error: string;
|
public error: string;
|
||||||
public working: boolean;
|
public working: boolean;
|
||||||
|
|
||||||
public step: number = 1;
|
public step: number = 2;
|
||||||
|
|
||||||
constructor(private authService: AuthService, private router: Router) {}
|
constructor(private authService: AuthService, private router: Router) {}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Category</label>
|
<label class="label">Category</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" type="text" maxlength="100" [(ngModel)]="updateSettingsCategory" />
|
<input class="input" type="text" [(ngModel)]="updateSettingsCategory" />
|
||||||
</div>
|
</div>
|
||||||
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -508,7 +508,7 @@
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<label class="label">Category</label>
|
<label class="label">Category</label>
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<input class="input" type="text" maxlength="100" [(ngModel)]="updateSettingsCategory" />
|
<input class="input" type="text" [(ngModel)]="updateSettingsCategory" />
|
||||||
</div>
|
</div>
|
||||||
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
<p class="help">The category becomes a sub-folder in your main download path.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ public class TorrentData
|
||||||
return dbTorrent;
|
return dbTorrent;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<Torrent> Add(String realDebridId,
|
public async Task<Torrent> Add(String rdId,
|
||||||
String hash,
|
String hash,
|
||||||
String? fileOrMagnetContents,
|
String? fileOrMagnetContents,
|
||||||
Boolean isFile,
|
Boolean isFile,
|
||||||
|
|
@ -87,7 +87,7 @@ public class TorrentData
|
||||||
{
|
{
|
||||||
TorrentId = Guid.NewGuid(),
|
TorrentId = Guid.NewGuid(),
|
||||||
Added = DateTimeOffset.UtcNow,
|
Added = DateTimeOffset.UtcNow,
|
||||||
RdId = realDebridId,
|
RdId = rdId,
|
||||||
Hash = hash.ToLower(),
|
Hash = hash.ToLower(),
|
||||||
Category = torrent.Category,
|
Category = torrent.Category,
|
||||||
HostDownloadAction = torrent.HostDownloadAction,
|
HostDownloadAction = torrent.HostDownloadAction,
|
||||||
|
|
|
||||||
|
|
@ -145,11 +145,11 @@ or
|
||||||
public String ApiKey { get; set; } = "";
|
public String ApiKey { get; set; } = "";
|
||||||
|
|
||||||
[DisplayName("Automatically import and process torrents added to provider")]
|
[DisplayName("Automatically import and process torrents added to provider")]
|
||||||
[Description("When selected, import downloads that are not added through RealDebridClient but have been directly added to Real-Debrid, AllDebrid or Premiumize.")]
|
[Description("When selected, import downloads that are not added through RealDebridClient but have been directly added to your debrid provider.")]
|
||||||
public Boolean AutoImport { get; set; } = false;
|
public Boolean AutoImport { get; set; } = false;
|
||||||
|
|
||||||
[DisplayName("Automatically delete downloads removed from provider")]
|
[DisplayName("Automatically delete downloads removed from provider")]
|
||||||
[Description("When selected, cancel and delete downloads that have been removed from Real-Debrid, AllDebrid or Premiumize.")]
|
[Description("When selected, cancel and delete downloads that have been removed from your debrid provider.")]
|
||||||
public Boolean AutoDelete { get; set; } = false;
|
public Boolean AutoDelete { get; set; } = false;
|
||||||
|
|
||||||
[DisplayName("Connection Timeout")]
|
[DisplayName("Connection Timeout")]
|
||||||
|
|
@ -199,7 +199,7 @@ public class DbSettingsWatch
|
||||||
public class DbSettingsDefaultsWithDownload : DbSettingsDefaultsWithCategory
|
public class DbSettingsDefaultsWithDownload : DbSettingsDefaultsWithCategory
|
||||||
{
|
{
|
||||||
[DisplayName("Post Torrent Download Action")]
|
[DisplayName("Post Torrent Download Action")]
|
||||||
[Description("When a torrent is finished downloading on the provider, perform this action. Use this setting if you only want to add files to Real-Debrid but not download them to the host.")]
|
[Description("When a torrent is finished downloading on your debrid provider, perform this action. Use this setting if you only want to add files to your debrid provider but not download them to the host.")]
|
||||||
public TorrentHostDownloadAction HostDownloadAction { get; set; }
|
public TorrentHostDownloadAction HostDownloadAction { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class ProviderUpdater : BackgroundService
|
||||||
|
|
||||||
if (_nextUpdate < DateTime.UtcNow && ((torrents.Count > 0 && !Settings.Get.Provider.AutoImport) || Settings.Get.Provider.AutoImport))
|
if (_nextUpdate < DateTime.UtcNow && ((torrents.Count > 0 && !Settings.Get.Provider.AutoImport) || Settings.Get.Provider.AutoImport))
|
||||||
{
|
{
|
||||||
_logger.LogDebug($"Updating torrent info from Real-Debrid");
|
_logger.LogDebug($"Updating torrent info from debrid provider");
|
||||||
|
|
||||||
var updateTime = Settings.Get.Provider.CheckInterval * 3;
|
var updateTime = Settings.Get.Provider.CheckInterval * 3;
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ public class ProviderUpdater : BackgroundService
|
||||||
|
|
||||||
await torrentService.UpdateRdData();
|
await torrentService.UpdateRdData();
|
||||||
|
|
||||||
_logger.LogDebug($"Finished updating torrent info from Real-Debrid, next update in {updateTime} seconds");
|
_logger.LogDebug($"Finished updating torrent info from debrid provider, next update in {updateTime} seconds");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -424,12 +424,12 @@ public class QBittorrent
|
||||||
switch (Settings.Get.Integrations.Default.FinishedAction)
|
switch (Settings.Get.Integrations.Default.FinishedAction)
|
||||||
{
|
{
|
||||||
case TorrentFinishedAction.RemoveAllTorrents:
|
case TorrentFinishedAction.RemoveAllTorrents:
|
||||||
_logger.LogDebug("Removing torrents from Real-Debrid and Real-Debrid Client, no files");
|
_logger.LogDebug("Removing torrents from debrid provider and RDT-Client, no files");
|
||||||
await _torrents.Delete(torrent.TorrentId, true, true, false);
|
await _torrents.Delete(torrent.TorrentId, true, true, false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case TorrentFinishedAction.RemoveRealDebrid:
|
case TorrentFinishedAction.RemoveRealDebrid:
|
||||||
_logger.LogDebug("Removing torrents from Real-Debrid, no files");
|
_logger.LogDebug("Removing torrents from debrid provider, no files");
|
||||||
await _torrents.Delete(torrent.TorrentId, false, true, false);
|
await _torrents.Delete(torrent.TorrentId, false, true, false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,7 @@ public class TorrentRunner
|
||||||
|
|
||||||
Log("Processing", torrent);
|
Log("Processing", torrent);
|
||||||
|
|
||||||
// If torrent is erroring out on the Real-Debrid side.
|
// If torrent is erroring out on the debrid side.
|
||||||
if (torrent.RdStatus == TorrentStatus.Error)
|
if (torrent.RdStatus == TorrentStatus.Error)
|
||||||
{
|
{
|
||||||
Log($"Torrent reported an error: {torrent.RdStatusRaw}", torrent);
|
Log($"Torrent reported an error: {torrent.RdStatusRaw}", torrent);
|
||||||
|
|
@ -481,7 +481,7 @@ public class TorrentRunner
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Real-Debrid is waiting for file selection, select which files to download.
|
// Debrid provider is waiting for file selection, select which files to download.
|
||||||
if ((torrent.RdStatus == TorrentStatus.WaitingForFileSelection || torrent.RdStatus == TorrentStatus.Finished) &&
|
if ((torrent.RdStatus == TorrentStatus.WaitingForFileSelection || torrent.RdStatus == TorrentStatus.Finished) &&
|
||||||
torrent.FilesSelected == null &&
|
torrent.FilesSelected == null &&
|
||||||
torrent.Downloads.Count == 0)
|
torrent.Downloads.Count == 0)
|
||||||
|
|
@ -493,10 +493,10 @@ public class TorrentRunner
|
||||||
await _torrents.UpdateFilesSelected(torrent.TorrentId, DateTime.UtcNow);
|
await _torrents.UpdateFilesSelected(torrent.TorrentId, DateTime.UtcNow);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Real-Debrid finished downloading the torrent, process the file to host.
|
// Debrid provider finished downloading the torrent, process the file to host.
|
||||||
if (torrent.RdStatus == TorrentStatus.Finished)
|
if (torrent.RdStatus == TorrentStatus.Finished)
|
||||||
{
|
{
|
||||||
// The files are selected but there are no downloads yet, check if Real-Debrid has generated links yet.
|
// The files are selected but there are no downloads yet, check if debrid provider has generated links yet.
|
||||||
if (torrent.Downloads.Count == 0 && torrent.FilesSelected != null)
|
if (torrent.Downloads.Count == 0 && torrent.FilesSelected != null)
|
||||||
{
|
{
|
||||||
Log($"Creating downloads", torrent);
|
Log($"Creating downloads", torrent);
|
||||||
|
|
@ -543,12 +543,12 @@ public class TorrentRunner
|
||||||
switch (torrent.FinishedAction)
|
switch (torrent.FinishedAction)
|
||||||
{
|
{
|
||||||
case TorrentFinishedAction.RemoveAllTorrents:
|
case TorrentFinishedAction.RemoveAllTorrents:
|
||||||
Log($"Removing torrents from Real-Debrid and Real-Debrid Client, no files", torrent);
|
Log($"Removing torrents from debrid provider and RDT-Client, no files", torrent);
|
||||||
await _torrents.Delete(torrent.TorrentId, true, true, false);
|
await _torrents.Delete(torrent.TorrentId, true, true, false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case TorrentFinishedAction.RemoveRealDebrid:
|
case TorrentFinishedAction.RemoveRealDebrid:
|
||||||
Log($"Removing torrents from Real-Debrid, no files", torrent);
|
Log($"Removing torrents from debrid provider, no files", torrent);
|
||||||
await _torrents.Delete(torrent.TorrentId, false, true, false);
|
await _torrents.Delete(torrent.TorrentId, false, true, false);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -48,5 +48,9 @@
|
||||||
<ProjectReference Include="..\RdtClient.Service\RdtClient.Service.csproj" />
|
<ProjectReference Include="..\RdtClient.Service\RdtClient.Service.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="wwwroot\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue