mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 12:59:39 -07:00
more lint !wip
This commit is contained in:
parent
4c99acef75
commit
b43e61f4cb
27 changed files with 80 additions and 80 deletions
|
@ -147,13 +147,13 @@ export class MovieSearchGridComponent implements OnInit {
|
|||
}
|
||||
|
||||
private processGrid(movies: ISearchMovieResult[]) {
|
||||
let container = <ISearchMovieResultContainer>{ movies: [] };
|
||||
let container = <ISearchMovieResultContainer> { movies: [] };
|
||||
movies.forEach((movie, i) => {
|
||||
i++;
|
||||
if ((i % 4) === 0) {
|
||||
container.movies.push(movie);
|
||||
this.movieResultGrid.push(container);
|
||||
container = <ISearchMovieResultContainer>{ movies: [] };
|
||||
container = <ISearchMovieResultContainer> { movies: [] };
|
||||
} else {
|
||||
container.movies.push(movie);
|
||||
}
|
||||
|
|
|
@ -38,20 +38,20 @@ export class SeriesInformationComponent implements OnInit {
|
|||
});
|
||||
});
|
||||
|
||||
if(!selected) {
|
||||
if (!selected) {
|
||||
this.notificationService.error("You need to select some episodes!");
|
||||
return;
|
||||
}
|
||||
|
||||
this.series.requested = true;
|
||||
|
||||
const viewModel = <ITvRequestViewModel>{ firstSeason: this.series.firstSeason, latestSeason: this.series.latestSeason, requestAll: this.series.requestAll, tvDbId: this.series.id};
|
||||
const viewModel = <ITvRequestViewModel> { firstSeason: this.series.firstSeason, latestSeason: this.series.latestSeason, requestAll: this.series.requestAll, tvDbId: this.series.id};
|
||||
viewModel.seasons = [];
|
||||
this.series.seasonRequests.forEach((season) => {
|
||||
const seasonsViewModel = <ISeasonsViewModel>{seasonNumber: season.seasonNumber, episodes: []};
|
||||
const seasonsViewModel = <ISeasonsViewModel> {seasonNumber: season.seasonNumber, episodes: []};
|
||||
season.episodes.forEach(ep => {
|
||||
if(!this.series.latestSeason || !this.series.requestAll || !this.series.firstSeason) {
|
||||
if(ep.selected) {
|
||||
if (!this.series.latestSeason || !this.series.requestAll || !this.series.firstSeason) {
|
||||
if (ep.selected) {
|
||||
seasonsViewModel.episodes.push({episodeNumber: ep.episodeNumber});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -166,10 +166,10 @@ export class TvSearchComponent implements OnInit {
|
|||
searchResult.approved = true;
|
||||
}
|
||||
|
||||
const viewModel = <ITvRequestViewModel>{ firstSeason: searchResult.firstSeason, latestSeason: searchResult.latestSeason, requestAll: searchResult.requestAll, tvDbId: searchResult.id };
|
||||
const viewModel = <ITvRequestViewModel> { firstSeason: searchResult.firstSeason, latestSeason: searchResult.latestSeason, requestAll: searchResult.requestAll, tvDbId: searchResult.id };
|
||||
viewModel.seasons = [];
|
||||
searchResult.seasonRequests.forEach((season) => {
|
||||
const seasonsViewModel = <ISeasonsViewModel>{ seasonNumber: season.seasonNumber, episodes: [] };
|
||||
const seasonsViewModel = <ISeasonsViewModel> { seasonNumber: season.seasonNumber, episodes: [] };
|
||||
season.episodes.forEach(ep => {
|
||||
if (!searchResult.latestSeason || !searchResult.requestAll || !searchResult.firstSeason) {
|
||||
if (ep.requested) {
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Observable } from "rxjs";
|
|||
|
||||
import { TreeNode } from "primeng/primeng";
|
||||
import { IRequestEngineResult } from "../interfaces";
|
||||
import { IChildRequests, IFilter, IMovieRequestModel, IMovieRequests, IMovieUpdateModel, IRequestsViewModel, ITvRequests,ITvUpdateModel, OrderType } from "../interfaces";
|
||||
import { IChildRequests, IFilter, IMovieRequestModel, IMovieRequests, IMovieUpdateModel, IRequestsViewModel, ITvRequests, ITvUpdateModel, OrderType } from "../interfaces";
|
||||
import { ITvRequestViewModel } from "../interfaces";
|
||||
import { ServiceHelpers } from "./service.helpers";
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ export class DiscordComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <IDiscordNotifcationSettings>form.value;
|
||||
const settings = <IDiscordNotifcationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.saveDiscordNotificationSettings(settings).subscribe(x => {
|
||||
|
|
|
@ -54,7 +54,7 @@ export class EmailNotificationComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <IEmailNotificationSettings>form.value;
|
||||
const settings = <IEmailNotificationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.saveEmailNotificationSettings(settings).subscribe(x => {
|
||||
|
|
|
@ -29,7 +29,7 @@ export class MattermostComponent implements OnInit {
|
|||
username: [x.username],
|
||||
webhookUrl: [x.webhookUrl, [Validators.required]],
|
||||
channel: [x.channel],
|
||||
iconUrl:[x.iconUrl],
|
||||
iconUrl: [x.iconUrl],
|
||||
|
||||
});
|
||||
});
|
||||
|
@ -41,7 +41,7 @@ export class MattermostComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <IMattermostNotifcationSettings>form.value;
|
||||
const settings = <IMattermostNotifcationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.saveMattermostNotificationSettings(settings).subscribe(x => {
|
||||
|
|
|
@ -32,9 +32,9 @@ export class MobileComponent implements OnInit {
|
|||
});
|
||||
|
||||
this.mobileService.getUserDeviceList().subscribe(x => {
|
||||
if(x.length <= 0) {
|
||||
if (x.length <= 0) {
|
||||
this.userList = [];
|
||||
this.userList.push({username:"None",devices:0, userId:""});
|
||||
this.userList.push({username: "None", devices: 0, userId: ""});
|
||||
} else {
|
||||
this.userList = x;
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ export class MobileComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <IMobileNotifcationSettings>form.value;
|
||||
const settings = <IMobileNotifcationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.saveMobileNotificationSettings(settings).subscribe(x => {
|
||||
|
@ -65,8 +65,8 @@ export class MobileComponent implements OnInit {
|
|||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
if(!this.testUserId) {
|
||||
this.notificationService.warning("Warning","Please select a user to send the test notification");
|
||||
if (!this.testUserId) {
|
||||
this.notificationService.warning("Warning", "Please select a user to send the test notification");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ export class NewsletterComponent implements OnInit {
|
|||
}
|
||||
public addEmail() {
|
||||
|
||||
if(this.emailToAdd) {
|
||||
if (this.emailToAdd) {
|
||||
const emailRegex = "[a-zA-Z0-9.-_]{1,}@[a-zA-Z.-]{2,}[.]{1}[a-zA-Z]{2,}";
|
||||
const match = this.emailToAdd.match(emailRegex)!;
|
||||
if(match && match.length > 0) {
|
||||
if (match && match.length > 0) {
|
||||
this.settings.externalEmails.push(this.emailToAdd);
|
||||
this.emailToAdd = "";
|
||||
} else {
|
||||
|
|
|
@ -37,7 +37,7 @@ export class PushbulletComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <IPushbulletNotificationSettings>form.value;
|
||||
const settings = <IPushbulletNotificationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.savePushbulletNotificationSettings(settings).subscribe(x => {
|
||||
|
|
|
@ -37,7 +37,7 @@ export class PushoverComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <IPushoverNotificationSettings>form.value;
|
||||
const settings = <IPushoverNotificationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.savePushoverNotificationSettings(settings).subscribe(x => {
|
||||
|
|
|
@ -41,7 +41,7 @@ export class SlackComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <ISlackNotificationSettings>form.value;
|
||||
const settings = <ISlackNotificationSettings> form.value;
|
||||
if (settings.iconEmoji && settings.iconUrl) {
|
||||
|
||||
this.notificationService.error("You cannot have a Emoji icon and a URL icon");
|
||||
|
@ -65,7 +65,7 @@ export class SlackComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <ISlackNotificationSettings>form.value;
|
||||
const settings = <ISlackNotificationSettings> form.value;
|
||||
if (settings.iconEmoji && settings.iconUrl) {
|
||||
|
||||
this.notificationService.error("You cannot have a Emoji icon and a URL icon");
|
||||
|
|
|
@ -40,7 +40,7 @@ export class TelegramComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const settings = <ITelegramNotifcationSettings>form.value;
|
||||
const settings = <ITelegramNotifcationSettings> form.value;
|
||||
settings.notificationTemplates = this.templates;
|
||||
|
||||
this.settingsService.saveTelegramNotificationSettings(settings).subscribe(x => {
|
||||
|
|
|
@ -41,9 +41,9 @@ export class OmbiComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
|
||||
const result = <IOmbiSettings>form.value;
|
||||
if(result.baseUrl && result.baseUrl.length > 0) {
|
||||
if(!result.baseUrl.startsWith("/")) {
|
||||
const result = <IOmbiSettings> form.value;
|
||||
if (result.baseUrl && result.baseUrl.length > 0) {
|
||||
if (!result.baseUrl.startsWith("/")) {
|
||||
this.notificationService.error("Please ensure your base url starts with a '/'");
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ export class PlexComponent implements OnInit, OnDestroy {
|
|||
if (this.settings.servers == null) {
|
||||
this.settings.servers = [];
|
||||
}
|
||||
this.settings.servers.push(<IPlexServer>{ name: "New*", id: Math.floor(Math.random() * (99999 - 0 + 1) + 1) });
|
||||
this.settings.servers.push(<IPlexServer> { name: "New*", id: Math.floor(Math.random() * (99999 - 0 + 1) + 1) });
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,7 @@ export class RadarrComponent implements OnInit {
|
|||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
const settings = <IRadarrSettings>form.value;
|
||||
const settings = <IRadarrSettings> form.value;
|
||||
this.testerService.radarrTest(settings).subscribe(x => {
|
||||
if (x === true) {
|
||||
this.notificationService.success("Successfully connected to Radarr!");
|
||||
|
@ -108,12 +108,12 @@ public onSubmit(form: FormGroup) {
|
|||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
if(form.controls.defaultQualityProfile.value === "-1" || form.controls.defaultRootPath.value === "Please Select") {
|
||||
if (form.controls.defaultQualityProfile.value === "-1" || form.controls.defaultRootPath.value === "Please Select") {
|
||||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
|
||||
const settings = <IRadarrSettings>form.value;
|
||||
const settings = <IRadarrSettings> form.value;
|
||||
this.settingsService.saveRadarr(settings).subscribe(x => {
|
||||
if (x) {
|
||||
this.notificationService.success("Successfully saved Radarr settings");
|
||||
|
|
|
@ -40,7 +40,7 @@ export class SickRageComponent implements OnInit {
|
|||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
const settings = <ISickRageSettings>form.value;
|
||||
const settings = <ISickRageSettings> form.value;
|
||||
this.testerService.sickrageTest(settings).subscribe(x => {
|
||||
if (x) {
|
||||
this.notificationService.success("Successfully connected to SickRage!");
|
||||
|
|
|
@ -93,7 +93,7 @@ export class SonarrComponent implements OnInit {
|
|||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
const settings = <ISonarrSettings>form.value;
|
||||
const settings = <ISonarrSettings> form.value;
|
||||
this.testerService.sonarrTest(settings).subscribe(x => {
|
||||
if (x) {
|
||||
this.notificationService.success("Successfully connected to Sonarr!");
|
||||
|
@ -108,13 +108,13 @@ export class SonarrComponent implements OnInit {
|
|||
this.notificationService.error("Please check your entered values");
|
||||
return;
|
||||
}
|
||||
if(form.controls.defaultQualityProfile) {
|
||||
if(form.controls.defaultQualityProfile.value === "-1") {
|
||||
if (form.controls.defaultQualityProfile) {
|
||||
if (form.controls.defaultQualityProfile.value === "-1") {
|
||||
this.notificationService.error("Please check your entered values");
|
||||
}
|
||||
}
|
||||
if(form.controls.defaultRootPath) {
|
||||
if(form.controls.defaultRootPath.value === "Please Select") {
|
||||
if (form.controls.defaultRootPath) {
|
||||
if (form.controls.defaultRootPath.value === "Please Select") {
|
||||
this.notificationService.error("Please check your entered values");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ export class UpdateDetailsComponent implements OnInit {
|
|||
this.identityService.getUser().subscribe(x => {
|
||||
const localUser = x as IUpdateLocalUser;
|
||||
this.form = this.fb.group({
|
||||
id:[localUser.id],
|
||||
id: [localUser.id],
|
||||
username: [localUser.userName],
|
||||
emailAddress: [localUser.emailAddress, [Validators.email]],
|
||||
confirmNewPassword: [localUser.confirmNewPassword],
|
||||
|
|
|
@ -42,7 +42,7 @@ export class PlexComponent implements OnInit {
|
|||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue