Skip to content

Commit

Permalink
style: bump prettier and format app
Browse files Browse the repository at this point in the history
  • Loading branch information
sct committed May 13, 2021
1 parent 4e48428 commit aa86809
Show file tree
Hide file tree
Showing 50 changed files with 196 additions and 195 deletions.
4 changes: 2 additions & 2 deletions .gitbook.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
root: ./docs

​structure:
readme: README.md
summary: SUMMARY.md​
readme: README.md
summary: SUMMARY.md​
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github: [sct]
github: [sct]
patreon: overseerr
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"lint-staged": "^11.0.0",
"nodemon": "^2.0.7",
"postcss": "^8.2.15",
"prettier": "^2.2.1",
"prettier": "^2.3.0",
"semantic-release": "^17.4.3",
"semantic-release-docker-buildx": "^1.0.1",
"tailwindcss": "^2.1.2",
Expand Down
10 changes: 4 additions & 6 deletions server/lib/notifications/agents/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ interface DiscordWebhookPayload {

class DiscordAgent
extends BaseAgent<NotificationAgentDiscord>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentDiscord {
if (this.settings) {
return this.settings;
Expand Down Expand Up @@ -217,11 +218,8 @@ class DiscordAgent
let content = undefined;

try {
const {
botUsername,
botAvatarUrl,
webhookUrl,
} = this.getSettings().options;
const { botUsername, botAvatarUrl, webhookUrl } =
this.getSettings().options;

if (!webhookUrl) {
return false;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';

class EmailAgent
extends BaseAgent<NotificationAgentEmail>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentEmail {
if (this.settings) {
return this.settings;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/lunasea.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { BaseAgent, NotificationAgent, NotificationPayload } from './agent';

class LunaSeaAgent
extends BaseAgent<NotificationAgentLunaSea>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentLunaSea {
if (this.settings) {
return this.settings;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/pushbullet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ interface PushbulletPayload {

class PushbulletAgent
extends BaseAgent<NotificationAgentPushbullet>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentPushbullet {
if (this.settings) {
return this.settings;
Expand Down
12 changes: 4 additions & 8 deletions server/lib/notifications/agents/pushover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ interface PushoverPayload {

class PushoverAgent
extends BaseAgent<NotificationAgentPushover>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentPushover {
if (this.settings) {
return this.settings;
Expand Down Expand Up @@ -170,13 +171,8 @@ class PushoverAgent

const { accessToken, userToken } = this.getSettings().options;

const {
title,
message,
url,
url_title,
priority,
} = this.constructMessageDetails(type, payload);
const { title, message, url, url_title, priority } =
this.constructMessageDetails(type, payload);

await axios.post(endpoint, {
token: accessToken,
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ interface SlackBlockEmbed {

class SlackAgent
extends BaseAgent<NotificationAgentSlack>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentSlack {
if (this.settings) {
return this.settings;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ interface TelegramPhotoPayload {

class TelegramAgent
extends BaseAgent<NotificationAgentTelegram>
implements NotificationAgent {
implements NotificationAgent
{
private baseUrl = 'https://api.telegram.org/';

protected getSettings(): NotificationAgentTelegram {
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const KeyMap: Record<string, string | KeyMapFunction> = {

class WebhookAgent
extends BaseAgent<NotificationAgentWebhook>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentWebhook {
if (this.settings) {
return this.settings;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/notifications/agents/webpush.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ interface PushNotificationPayload {

class WebPushAgent
extends BaseAgent<NotificationAgentConfig>
implements NotificationAgent {
implements NotificationAgent
{
protected getSettings(): NotificationAgentConfig {
if (this.settings) {
return this.settings;
Expand Down
20 changes: 8 additions & 12 deletions server/lib/scanners/baseScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ class BaseScanner<T> {
existing[is4k ? 'externalServiceId4k' : 'externalServiceId'] !==
externalServiceId
) {
existing[
is4k ? 'externalServiceId4k' : 'externalServiceId'
] = externalServiceId;
existing[is4k ? 'externalServiceId4k' : 'externalServiceId'] =
externalServiceId;
changedExisting = true;
}

Expand All @@ -156,9 +155,8 @@ class BaseScanner<T> {
existing[is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] !==
externalServiceSlug
) {
existing[
is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'
] = externalServiceSlug;
existing[is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] =
externalServiceSlug;
changedExisting = true;
}

Expand Down Expand Up @@ -389,15 +387,13 @@ class BaseScanner<T> {
}

if (externalServiceId !== undefined) {
media[
is4k ? 'externalServiceId4k' : 'externalServiceId'
] = externalServiceId;
media[is4k ? 'externalServiceId4k' : 'externalServiceId'] =
externalServiceId;
}

if (externalServiceSlug !== undefined) {
media[
is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'
] = externalServiceSlug;
media[is4k ? 'externalServiceSlug4k' : 'externalServiceSlug'] =
externalServiceSlug;
}

// If the show is already available, and there are no new seasons, dont adjust
Expand Down
3 changes: 2 additions & 1 deletion server/lib/scanners/plex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ type SyncStatus = StatusBase & {

class PlexScanner
extends BaseScanner<PlexLibraryItem>
implements RunnableScanner<SyncStatus> {
implements RunnableScanner<SyncStatus>
{
private plexClient: PlexAPI;
private libraries: Library[];
private currentLibrary: Library;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/scanners/radarr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ type SyncStatus = StatusBase & {

class RadarrScanner
extends BaseScanner<RadarrMovie>
implements RunnableScanner<SyncStatus> {
implements RunnableScanner<SyncStatus>
{
private servers: RadarrSettings[];
private currentServer: RadarrSettings;
private radarrApi: RadarrAPI;
Expand Down
3 changes: 2 additions & 1 deletion server/lib/scanners/sonarr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ type SyncStatus = StatusBase & {

class SonarrScanner
extends BaseScanner<SonarrSeries>
implements RunnableScanner<SyncStatus> {
implements RunnableScanner<SyncStatus>
{
private servers: SonarrSettings[];
private currentServer: SonarrSettings;
private sonarrApi: SonarrAPI;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddUserRequestDeleteCascades1608219049304
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddUserRequestDeleteCascades1608219049304';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
3 changes: 2 additions & 1 deletion server/migration/1608477467935-AddLastSeasonChangeMedia.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddLastSeasonChangeMedia1608477467935
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddLastSeasonChangeMedia1608477467935';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class ForceDropImdbUniqueConstraint1608477467935
implements MigrationInterface {
implements MigrationInterface
{
name = 'ForceDropImdbUniqueConstraint1608477467936';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class RemoveTmdbIdUniqueConstraint1609236552057
implements MigrationInterface {
implements MigrationInterface
{
name = 'RemoveTmdbIdUniqueConstraint1609236552057';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
3 changes: 2 additions & 1 deletion server/migration/1610522845513-AddMediaAddedFieldToMedia.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddMediaAddedFieldToMedia1610522845513
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddMediaAddedFieldToMedia1610522845513';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class SonarrRadarrSyncServiceFields1611757511674
implements MigrationInterface {
implements MigrationInterface
{
name = 'SonarrRadarrSyncServiceFields1611757511674';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddResetPasswordGuidAndExpiryDate1612482778137
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddResetPasswordGuidAndExpiryDate1612482778137';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
3 changes: 2 additions & 1 deletion server/migration/1613955393450-UpdateUserSettingsRegions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class UpdateUserSettingsRegions1613955393450
implements MigrationInterface {
implements MigrationInterface
{
name = 'UpdateUserSettingsRegions1613955393450';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddTelegramSettingsToUserSettings1614334195680
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddTelegramSettingsToUserSettings1614334195680';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class CreateTagsFieldonMediaRequest1617624225464
implements MigrationInterface {
implements MigrationInterface
{
name = 'CreateTagsFieldonMediaRequest1617624225464';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddUserSettingsNotificationAgentsField1617730837489
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddUserSettingsNotificationAgentsField1617730837489';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class CreateUserPushSubscriptions1618912653565
implements MigrationInterface {
implements MigrationInterface
{
name = 'CreateUserPushSubscriptions1618912653565';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class AddUserSettingsNotificationTypes1619339817343
implements MigrationInterface {
implements MigrationInterface
{
name = 'AddUserSettingsNotificationTypes1619339817343';

public async up(queryRunner: QueryRunner): Promise<void> {
Expand Down
6 changes: 2 additions & 4 deletions server/routes/media.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ mediaRoutes.get('/', async (req, res, next) => {
const pageSize = req.query.take ? Number(req.query.take) : 20;
const skip = req.query.skip ? Number(req.query.skip) : 0;

let statusFilter:
| MediaStatus
| FindOperator<MediaStatus>
| undefined = undefined;
let statusFilter: MediaStatus | FindOperator<MediaStatus> | undefined =
undefined;

switch (req.query.filter) {
case 'available':
Expand Down
Loading

0 comments on commit aa86809

Please sign in to comment.