|
|
|
@ -2,10 +2,10 @@
|
|
|
|
|
import { Subject } from 'rxjs/Subject';
|
|
|
|
|
import "rxjs/add/operator/takeUntil";
|
|
|
|
|
|
|
|
|
|
import { IRadarrSettings } from '../../interfaces/ISettings'
|
|
|
|
|
import { ISonarrProfile, ISonarrRootFolder } from '../../interfaces/ISonarr'
|
|
|
|
|
import { IRadarrSettings } from '../../interfaces/ISettings';
|
|
|
|
|
import { IRadarrProfile, IRadarrRootFolder } from '../../interfaces/IRadarr';
|
|
|
|
|
import { SettingsService } from '../../services/settings.service';
|
|
|
|
|
// import { RadarrService } from '../../services/applications/radarr.service';
|
|
|
|
|
import { RadarrService } from '../../services/applications/radarr.service';
|
|
|
|
|
import { NotificationService } from "../../services/notification.service";
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
@ -15,15 +15,15 @@ import { NotificationService } from "../../services/notification.service";
|
|
|
|
|
})
|
|
|
|
|
export class RadarrComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
constructor(private settingsService: SettingsService, /*private radarrService: RadarrService,*/ private notificationService: NotificationService) { }
|
|
|
|
|
constructor(private settingsService: SettingsService, private radarrService: RadarrService, private notificationService: NotificationService) { }
|
|
|
|
|
|
|
|
|
|
settings: IRadarrSettings;
|
|
|
|
|
|
|
|
|
|
qualities: ISonarrProfile[];
|
|
|
|
|
rootFolders: ISonarrRootFolder[];
|
|
|
|
|
|
|
|
|
|
selectedRootFolder:ISonarrRootFolder;
|
|
|
|
|
selectedQuality: ISonarrProfile;
|
|
|
|
|
qualities: IRadarrProfile[];
|
|
|
|
|
rootFolders: IRadarrRootFolder[];
|
|
|
|
|
|
|
|
|
|
selectedRootFolder: IRadarrRootFolder;
|
|
|
|
|
selectedQuality: IRadarrProfile;
|
|
|
|
|
|
|
|
|
|
profilesRunning: boolean;
|
|
|
|
|
rootFoldersRunning: boolean;
|
|
|
|
@ -40,23 +40,23 @@ export class RadarrComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getProfiles() {
|
|
|
|
|
// this.profilesRunning = true;
|
|
|
|
|
// this.sonarrService.getQualityProfiles(this.settings).subscribe(x => {
|
|
|
|
|
// this.qualities = x;
|
|
|
|
|
//
|
|
|
|
|
// this.profilesRunning = false;
|
|
|
|
|
// this.notificationService.success("Quality Profiles", "Successfully retrevied the Quality Profiles");
|
|
|
|
|
// });
|
|
|
|
|
this.profilesRunning = true;
|
|
|
|
|
this.radarrService.getQualityProfiles(this.settings).subscribe(x => {
|
|
|
|
|
this.qualities = x;
|
|
|
|
|
|
|
|
|
|
this.profilesRunning = false;
|
|
|
|
|
this.notificationService.success("Quality Profiles", "Successfully retrevied the Quality Profiles");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getRootFolders() {
|
|
|
|
|
// this.rootFoldersRunning = true;
|
|
|
|
|
// this.sonarrService.getRootFolders(this.settings).subscribe(x => {
|
|
|
|
|
// this.rootFolders = x;
|
|
|
|
|
//
|
|
|
|
|
// this.rootFoldersRunning = false;
|
|
|
|
|
// this.notificationService.success("Settings Saved", "Successfully retrevied the Root Folders");
|
|
|
|
|
// });
|
|
|
|
|
this.rootFoldersRunning = true;
|
|
|
|
|
this.radarrService.getRootFolders(this.settings).subscribe(x => {
|
|
|
|
|
this.rootFolders = x;
|
|
|
|
|
|
|
|
|
|
this.rootFoldersRunning = false;
|
|
|
|
|
this.notificationService.success("Settings Saved", "Successfully retrevied the Root Folders");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
test() {
|
|
|
|
|