use non-deprecated observer .subscribe call signature
https://rxjs.dev/deprecations/subscribe-arguments
This commit is contained in:
parent
2b95b8d714
commit
2e7c97d023
8 changed files with 115 additions and 137 deletions
|
|
@ -149,25 +149,21 @@ export class AddNewTorrentComponent implements OnInit {
|
||||||
torrent.downloadClient = this.downloadClient;
|
torrent.downloadClient = this.downloadClient;
|
||||||
|
|
||||||
if (this.magnetLink) {
|
if (this.magnetLink) {
|
||||||
this.torrentService.uploadMagnet(this.magnetLink, torrent).subscribe(
|
this.torrentService.uploadMagnet(this.magnetLink, torrent).subscribe({
|
||||||
() => {
|
next: () => this.router.navigate(['/']),
|
||||||
this.router.navigate(['/']);
|
error: (err) => {
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
} else if (this.selectedFile) {
|
} else if (this.selectedFile) {
|
||||||
this.torrentService.uploadFile(this.selectedFile, torrent).subscribe(
|
this.torrentService.uploadFile(this.selectedFile, torrent).subscribe({
|
||||||
() => {
|
next: () => this.router.navigate(['/']),
|
||||||
this.router.navigate(['/']);
|
error: (err) => {
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
} else {
|
} else {
|
||||||
this.error = 'No magnet or file uploaded';
|
this.error = 'No magnet or file uploaded';
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
|
|
@ -192,8 +188,8 @@ export class AddNewTorrentComponent implements OnInit {
|
||||||
this.allSelected = true;
|
this.allSelected = true;
|
||||||
|
|
||||||
if (this.magnetLink) {
|
if (this.magnetLink) {
|
||||||
this.torrentService.checkFilesMagnet(this.magnetLink).subscribe(
|
this.torrentService.checkFilesMagnet(this.magnetLink).subscribe({
|
||||||
(result) => {
|
next: (result) => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.availableFiles = result;
|
this.availableFiles = result;
|
||||||
this.currentTorrentFile = this.magnetLink;
|
this.currentTorrentFile = this.magnetLink;
|
||||||
|
|
@ -201,25 +197,25 @@ export class AddNewTorrentComponent implements OnInit {
|
||||||
this.downloadFiles[file.filename] = true;
|
this.downloadFiles[file.filename] = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
} else if (this.selectedFile) {
|
} else if (this.selectedFile) {
|
||||||
this.torrentService.checkFiles(this.selectedFile).subscribe(
|
this.torrentService.checkFiles(this.selectedFile).subscribe({
|
||||||
(result) => {
|
next: (result) => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.availableFiles = result;
|
this.availableFiles = result;
|
||||||
result.forEach((file) => {
|
result.forEach((file) => {
|
||||||
this.downloadFiles[file.filename] = true;
|
this.downloadFiles[file.filename] = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
} else {
|
} else {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ import { FormsModule } from '@angular/forms';
|
||||||
import { NgClass } from '@angular/common';
|
import { NgClass } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-login',
|
selector: 'app-login',
|
||||||
templateUrl: './login.component.html',
|
templateUrl: './login.component.html',
|
||||||
styleUrls: ['./login.component.scss'],
|
styleUrls: ['./login.component.scss'],
|
||||||
imports: [FormsModule, NgClass],
|
imports: [FormsModule, NgClass],
|
||||||
})
|
})
|
||||||
export class LoginComponent {
|
export class LoginComponent {
|
||||||
public userName: string;
|
public userName: string;
|
||||||
|
|
@ -32,14 +32,12 @@ export class LoginComponent {
|
||||||
public login(): void {
|
public login(): void {
|
||||||
this.error = null;
|
this.error = null;
|
||||||
this.loggingIn = true;
|
this.loggingIn = true;
|
||||||
this.authService.login(this.userName, this.password).subscribe(
|
this.authService.login(this.userName, this.password).subscribe({
|
||||||
() => {
|
next: () => this.router.navigate(['/']),
|
||||||
this.router.navigate(['/']);
|
error: (err) => {
|
||||||
},
|
|
||||||
(err) => {
|
|
||||||
this.loggingIn = false;
|
this.loggingIn = false;
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,10 @@ import { SettingsService } from '../settings.service';
|
||||||
import { NgClass, DatePipe } from '@angular/common';
|
import { NgClass, DatePipe } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-navbar',
|
selector: 'app-navbar',
|
||||||
templateUrl: './navbar.component.html',
|
templateUrl: './navbar.component.html',
|
||||||
styleUrls: ['./navbar.component.scss'],
|
styleUrls: ['./navbar.component.scss'],
|
||||||
imports: [
|
imports: [RouterLink, NgClass, DatePipe],
|
||||||
RouterLink,
|
|
||||||
NgClass,
|
|
||||||
DatePipe,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class NavbarComponent implements OnInit {
|
export class NavbarComponent implements OnInit {
|
||||||
public showMobileMenu = false;
|
public showMobileMenu = false;
|
||||||
|
|
@ -63,11 +59,6 @@ export class NavbarComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public logout(): void {
|
public logout(): void {
|
||||||
this.authService.logout().subscribe(
|
this.authService.logout().subscribe({ next: () => this.router.navigate(['/login']), error: console.error });
|
||||||
() => {
|
|
||||||
this.router.navigate(['/login']);
|
|
||||||
},
|
|
||||||
(err) => {},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@ import { FormsModule } from '@angular/forms';
|
||||||
import { NgClass } from '@angular/common';
|
import { NgClass } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-profile',
|
selector: 'app-profile',
|
||||||
templateUrl: './profile.component.html',
|
templateUrl: './profile.component.html',
|
||||||
styleUrls: ['./profile.component.scss'],
|
styleUrls: ['./profile.component.scss'],
|
||||||
imports: [FormsModule, NgClass],
|
imports: [FormsModule, NgClass],
|
||||||
})
|
})
|
||||||
export class ProfileComponent {
|
export class ProfileComponent {
|
||||||
constructor(private authService: AuthService) {}
|
constructor(private authService: AuthService) {}
|
||||||
|
|
@ -24,16 +24,16 @@ export class ProfileComponent {
|
||||||
this.error = null;
|
this.error = null;
|
||||||
this.saving = true;
|
this.saving = true;
|
||||||
|
|
||||||
this.authService.update(this.username, this.password).subscribe(
|
this.authService.update(this.username, this.password).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.success = true;
|
this.success = true;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
this.success = false;
|
this.success = false;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,16 +7,10 @@ import { Nl2BrPipe } from '../nl2br.pipe';
|
||||||
import { FileSizePipe } from '../filesize.pipe';
|
import { FileSizePipe } from '../filesize.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-settings',
|
selector: 'app-settings',
|
||||||
templateUrl: './settings.component.html',
|
templateUrl: './settings.component.html',
|
||||||
styleUrls: ['./settings.component.scss'],
|
styleUrls: ['./settings.component.scss'],
|
||||||
imports: [
|
imports: [NgClass, FormsModule, KeyValuePipe, Nl2BrPipe, FileSizePipe],
|
||||||
NgClass,
|
|
||||||
FormsModule,
|
|
||||||
KeyValuePipe,
|
|
||||||
Nl2BrPipe,
|
|
||||||
FileSizePipe,
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
export class SettingsComponent implements OnInit {
|
export class SettingsComponent implements OnInit {
|
||||||
public activeTab = 0;
|
public activeTab = 0;
|
||||||
|
|
@ -62,17 +56,16 @@ export class SettingsComponent implements OnInit {
|
||||||
|
|
||||||
const settingsToSave = this.tabs.flatMap((m) => m.settings).filter((m) => m.type !== 'Object');
|
const settingsToSave = this.tabs.flatMap((m) => m.settings).filter((m) => m.type !== 'Object');
|
||||||
|
|
||||||
this.settingsService.update(settingsToSave).subscribe(
|
this.settingsService.update(settingsToSave).subscribe({
|
||||||
() => {
|
next: () =>
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
}, 1000);
|
}, 1000),
|
||||||
},
|
error: (err) => {
|
||||||
(err) => {
|
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.error = err;
|
this.error = err;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public testDownloadPath(): void {
|
public testDownloadPath(): void {
|
||||||
|
|
@ -84,16 +77,16 @@ export class SettingsComponent implements OnInit {
|
||||||
this.testPathError = null;
|
this.testPathError = null;
|
||||||
this.testPathSuccess = false;
|
this.testPathSuccess = false;
|
||||||
|
|
||||||
this.settingsService.testPath(settingDownloadPath).subscribe(
|
this.settingsService.testPath(settingDownloadPath).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.testPathSuccess = true;
|
this.testPathSuccess = true;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.testPathError = err.error;
|
this.testPathError = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public testDownloadSpeed(): void {
|
public testDownloadSpeed(): void {
|
||||||
|
|
@ -101,32 +94,32 @@ export class SettingsComponent implements OnInit {
|
||||||
this.testDownloadSpeedError = null;
|
this.testDownloadSpeedError = null;
|
||||||
this.testDownloadSpeedSuccess = 0;
|
this.testDownloadSpeedSuccess = 0;
|
||||||
|
|
||||||
this.settingsService.testDownloadSpeed().subscribe(
|
this.settingsService.testDownloadSpeed().subscribe({
|
||||||
(result) => {
|
next: (result) => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.testDownloadSpeedSuccess = result;
|
this.testDownloadSpeedSuccess = result;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.testDownloadSpeedError = err.error;
|
this.testDownloadSpeedError = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
public testWriteSpeed(): void {
|
public testWriteSpeed(): void {
|
||||||
this.saving = true;
|
this.saving = true;
|
||||||
this.testWriteSpeedError = null;
|
this.testWriteSpeedError = null;
|
||||||
this.testWriteSpeedSuccess = 0;
|
this.testWriteSpeedSuccess = 0;
|
||||||
|
|
||||||
this.settingsService.testWriteSpeed().subscribe(
|
this.settingsService.testWriteSpeed().subscribe({
|
||||||
(result) => {
|
next: (result) => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.testWriteSpeedSuccess = result;
|
this.testWriteSpeedSuccess = result;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.testWriteSpeedError = err.error;
|
this.testWriteSpeedError = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public testAria2cConnection(): void {
|
public testAria2cConnection(): void {
|
||||||
|
|
@ -141,22 +134,24 @@ export class SettingsComponent implements OnInit {
|
||||||
this.testAria2cConnectionError = null;
|
this.testAria2cConnectionError = null;
|
||||||
this.testAria2cConnectionSuccess = null;
|
this.testAria2cConnectionSuccess = null;
|
||||||
|
|
||||||
this.settingsService.testAria2cConnection(settingAria2cUrl, settingAria2cSecret).subscribe(
|
this.settingsService.testAria2cConnection(settingAria2cUrl, settingAria2cSecret).subscribe({
|
||||||
(result) => {
|
next: (result) => {
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
this.testAria2cConnectionSuccess = result.version;
|
this.testAria2cConnectionSuccess = result.version;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.testAria2cConnectionError = err.error;
|
this.testAria2cConnectionError = err.error;
|
||||||
this.saving = false;
|
this.saving = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public registerMagnetHandler(): void {
|
public registerMagnetHandler(): void {
|
||||||
try {
|
try {
|
||||||
navigator.registerProtocolHandler('magnet', `${window.location.origin}/add?magnet=%s`);
|
navigator.registerProtocolHandler('magnet', `${window.location.origin}/add?magnet=%s`);
|
||||||
alert('Success! Your browser will now prompt you to confirm and add the client as the default handler for magnet links.');
|
alert(
|
||||||
|
'Success! Your browser will now prompt you to confirm and add the client as the default handler for magnet links.',
|
||||||
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
alert('Magnet link registration failed.');
|
alert('Magnet link registration failed.');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { AuthService } from '../auth.service';
|
import { AuthService } from '../auth.service';
|
||||||
import { FormsModule } from '@angular/forms';
|
|
||||||
import { NgClass } from '@angular/common';
|
import { NgClass } from '@angular/common';
|
||||||
|
import { FormsModule } from '@angular/forms';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-setup',
|
selector: 'app-setup',
|
||||||
templateUrl: './setup.component.html',
|
templateUrl: './setup.component.html',
|
||||||
styleUrls: ['./setup.component.scss'],
|
styleUrls: ['./setup.component.scss'],
|
||||||
imports: [FormsModule, NgClass],
|
imports: [FormsModule, NgClass],
|
||||||
})
|
})
|
||||||
export class SetupComponent {
|
export class SetupComponent {
|
||||||
public userName: string;
|
public userName: string;
|
||||||
|
|
@ -30,29 +30,29 @@ export class SetupComponent {
|
||||||
this.error = null;
|
this.error = null;
|
||||||
this.working = true;
|
this.working = true;
|
||||||
|
|
||||||
this.authService.create(this.userName, this.password).subscribe(
|
this.authService.create(this.userName, this.password).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.step = 2;
|
this.step = 2;
|
||||||
this.working = false;
|
this.working = false;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.working = false;
|
this.working = false;
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public setToken(): void {
|
public setToken(): void {
|
||||||
this.authService.setupProvider(this.provider, this.token).subscribe(
|
this.authService.setupProvider(this.provider, this.token).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.step = 3;
|
this.step = 3;
|
||||||
this.working = false;
|
this.working = false;
|
||||||
},
|
},
|
||||||
(err: any) => {
|
error: (err: any) => {
|
||||||
this.working = false;
|
this.working = false;
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public close(): void {
|
public close(): void {
|
||||||
|
|
|
||||||
|
|
@ -61,18 +61,18 @@ export class TorrentTableComponent implements OnInit {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.torrentService.getList().subscribe(
|
this.torrentService.getList().subscribe({
|
||||||
(result) => {
|
next: (result) => {
|
||||||
this.torrents = result;
|
this.torrents = result;
|
||||||
|
|
||||||
this.torrentService.update$.subscribe((result2) => {
|
this.torrentService.update$.subscribe((result2) => {
|
||||||
this.torrents = result2;
|
this.torrents = result2;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.error = err.error;
|
this.error = err.error;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public sort(property: string): void {
|
public sort(property: string): void {
|
||||||
|
|
|
||||||
|
|
@ -12,19 +12,19 @@ import { DecodeURIPipe } from '../decode-uri.pipe';
|
||||||
import { FileSizePipe } from '../filesize.pipe';
|
import { FileSizePipe } from '../filesize.pipe';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-torrent',
|
selector: 'app-torrent',
|
||||||
templateUrl: './torrent.component.html',
|
templateUrl: './torrent.component.html',
|
||||||
styleUrls: ['./torrent.component.scss'],
|
styleUrls: ['./torrent.component.scss'],
|
||||||
imports: [
|
imports: [
|
||||||
NgClass,
|
NgClass,
|
||||||
CdkCopyToClipboard,
|
CdkCopyToClipboard,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
DatePipe,
|
DatePipe,
|
||||||
TorrentStatusPipe,
|
TorrentStatusPipe,
|
||||||
DownloadStatusPipe,
|
DownloadStatusPipe,
|
||||||
DecodeURIPipe,
|
DecodeURIPipe,
|
||||||
FileSizePipe,
|
FileSizePipe,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class TorrentComponent implements OnInit {
|
export class TorrentComponent implements OnInit {
|
||||||
public torrent: Torrent;
|
public torrent: Torrent;
|
||||||
|
|
@ -75,18 +75,16 @@ export class TorrentComponent implements OnInit {
|
||||||
this.activatedRoute.params.subscribe((params) => {
|
this.activatedRoute.params.subscribe((params) => {
|
||||||
const torrentId = params['id'];
|
const torrentId = params['id'];
|
||||||
|
|
||||||
this.torrentService.get(torrentId).subscribe(
|
this.torrentService.get(torrentId).subscribe({
|
||||||
(torrent) => {
|
next: (torrent) => {
|
||||||
this.torrent = torrent;
|
this.torrent = torrent;
|
||||||
|
|
||||||
this.torrentService.update$.subscribe((result) => {
|
this.torrentService.update$.subscribe((result) => {
|
||||||
this.update(result);
|
this.update(result);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
() => {
|
error: () => this.router.navigate(['/']),
|
||||||
this.router.navigate(['/']);
|
});
|
||||||
},
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,18 +130,18 @@ export class TorrentComponent implements OnInit {
|
||||||
|
|
||||||
this.torrentService
|
this.torrentService
|
||||||
.delete(this.torrent.torrentId, this.deleteData, this.deleteRdTorrent, this.deleteLocalFiles)
|
.delete(this.torrent.torrentId, this.deleteData, this.deleteRdTorrent, this.deleteLocalFiles)
|
||||||
.subscribe(
|
.subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.isDeleteModalActive = false;
|
this.isDeleteModalActive = false;
|
||||||
this.deleting = false;
|
this.deleting = false;
|
||||||
|
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.deleteError = err.error;
|
this.deleteError = err.error;
|
||||||
this.deleting = false;
|
this.deleting = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public showRetryModal(): void {
|
public showRetryModal(): void {
|
||||||
|
|
@ -159,18 +157,18 @@ export class TorrentComponent implements OnInit {
|
||||||
public retryOk(): void {
|
public retryOk(): void {
|
||||||
this.retrying = true;
|
this.retrying = true;
|
||||||
|
|
||||||
this.torrentService.retry(this.torrent.torrentId).subscribe(
|
this.torrentService.retry(this.torrent.torrentId).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.isRetryModalActive = false;
|
this.isRetryModalActive = false;
|
||||||
this.retrying = false;
|
this.retrying = false;
|
||||||
|
|
||||||
this.router.navigate(['/']);
|
this.router.navigate(['/']);
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.retryError = err.error;
|
this.retryError = err.error;
|
||||||
this.retrying = false;
|
this.retrying = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public showDownloadRetryModal(downloadId: string): void {
|
public showDownloadRetryModal(downloadId: string): void {
|
||||||
|
|
@ -187,16 +185,16 @@ export class TorrentComponent implements OnInit {
|
||||||
public downloadRetryOk(): void {
|
public downloadRetryOk(): void {
|
||||||
this.downloadRetrying = true;
|
this.downloadRetrying = true;
|
||||||
|
|
||||||
this.torrentService.retryDownload(this.downloadRetryId).subscribe(
|
this.torrentService.retryDownload(this.downloadRetryId).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.isDownloadRetryModalActive = false;
|
this.isDownloadRetryModalActive = false;
|
||||||
this.downloadRetrying = false;
|
this.downloadRetrying = false;
|
||||||
},
|
},
|
||||||
(err) => {
|
error: (err) => {
|
||||||
this.downloadRetryError = err.error;
|
this.downloadRetryError = err.error;
|
||||||
this.downloadRetrying = false;
|
this.downloadRetrying = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public showUpdateSettingsModal(): void {
|
public showUpdateSettingsModal(): void {
|
||||||
|
|
@ -228,16 +226,16 @@ export class TorrentComponent implements OnInit {
|
||||||
this.torrent.deleteOnError = this.updateSettingsDeleteOnError;
|
this.torrent.deleteOnError = this.updateSettingsDeleteOnError;
|
||||||
this.torrent.lifetime = this.updateSettingsTorrentLifetime;
|
this.torrent.lifetime = this.updateSettingsTorrentLifetime;
|
||||||
|
|
||||||
this.torrentService.update(this.torrent).subscribe(
|
this.torrentService.update(this.torrent).subscribe({
|
||||||
() => {
|
next: () => {
|
||||||
this.isUpdateSettingsModalActive = false;
|
this.isUpdateSettingsModalActive = false;
|
||||||
this.updating = false;
|
this.updating = false;
|
||||||
},
|
},
|
||||||
() => {
|
error: () => {
|
||||||
this.isUpdateSettingsModalActive = false;
|
this.isUpdateSettingsModalActive = false;
|
||||||
this.updating = false;
|
this.updating = false;
|
||||||
},
|
},
|
||||||
);
|
});
|
||||||
}
|
}
|
||||||
toggleDeleteSelectAllOptions() {
|
toggleDeleteSelectAllOptions() {
|
||||||
this.deleteData = this.deleteSelectAll;
|
this.deleteData = this.deleteSelectAll;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue