Skip to content

Commit

Permalink
Merge branch 'develop' into docs-docusaurus-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallenbagel authored Jun 29, 2024
2 parents ebfaed2 + 96ba53f commit d2c770a
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 45 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
dist/
config/
CHANGELOG.md
pnpm-lock.yaml

# assets
src/assets/
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN \

RUN npm install --global pnpm

COPY package.json pnpm-lock.yaml ./
COPY package.json pnpm-lock.yaml postinstall-win.js ./
RUN CYPRESS_INSTALL_BINARY=0 pnpm install --frozen-lockfile

COPY . ./
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": true,
"scripts": {
"preinstall": "npx only-allow pnpm",
"postinstall": "node postinstall-win.js",
"dev": "nodemon -e ts --watch server --watch overseerr-api.yml -e .json,.ts,.yml -x ts-node -r tsconfig-paths/register --files --project server/tsconfig.json server/index.ts",
"build:server": "tsc --project server/tsconfig.json && copyfiles -u 2 server/templates/**/*.{html,pug} dist/templates && tsc-alias -p server/tsconfig.json",
"build:next": "next build",
Expand Down Expand Up @@ -46,7 +47,6 @@
"axios-rate-limit": "1.3.0",
"bcrypt": "5.1.0",
"bowser": "2.11.0",
"cacheable-lookup": "^7.0.0",
"connect-typeorm": "1.1.4",
"cookie-parser": "1.4.6",
"copy-to-clipboard": "3.3.3",
Expand Down
12 changes: 0 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions postinstall-win.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');

if (process.platform === 'win32') {
const typeormPath = path.resolve('node_modules/typeorm');

if (fs.existsSync(typeormPath)) {
process.stdout.write('> Installing [email protected] for Windows\n');
execSync('pnpm add [email protected]', { stdio: 'inherit' });
}
}
25 changes: 0 additions & 25 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,19 @@ import imageproxy from '@server/routes/imageproxy';
import { getAppVersion } from '@server/utils/appVersion';
import restartFlag from '@server/utils/restartFlag';
import { getClientIp } from '@supercharge/request-ip';
import type CacheableLookupType from 'cacheable-lookup';
import { TypeormStore } from 'connect-typeorm/out';
import cookieParser from 'cookie-parser';
import csurf from 'csurf';
import { lookup } from 'dns';
import type { NextFunction, Request, Response } from 'express';
import express from 'express';
import * as OpenApiValidator from 'express-openapi-validator';
import type { Store } from 'express-session';
import session from 'express-session';
import next from 'next';
import http from 'node:http';
import https from 'node:https';
import path from 'path';
import swaggerUi from 'swagger-ui-express';
import YAML from 'yamljs';

const _importDynamic = new Function('modulePath', 'return import(modulePath)');

const API_SPEC_PATH = path.join(__dirname, '../overseerr-api.yml');

logger.info(`Starting Overseerr version ${getAppVersion()}`);
Expand All @@ -52,25 +46,6 @@ const handle = app.getRequestHandler();
app
.prepare()
.then(async () => {
const CacheableLookup = (await _importDynamic('cacheable-lookup'))
.default as typeof CacheableLookupType;
const cacheable = new CacheableLookup();

const originalLookup = cacheable.lookup;

// if hostname is localhost use dns.lookup instead of cacheable-lookup
cacheable.lookup = (...args: any) => {
const [hostname] = args;
if (hostname === 'localhost') {
lookup(...(args as Parameters<typeof lookup>));
} else {
originalLookup(...(args as Parameters<typeof originalLookup>));
}
};

cacheable.install(http.globalAgent);
cacheable.install(https.globalAgent);

const dbConnection = await dataSource.initialize();

// Run migrations in production
Expand Down
14 changes: 8 additions & 6 deletions src/components/TvDetails/Season/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ const Season = ({ seasonNumber, tvId }: SeasonProps) => {
{episode.overview && <p>{episode.overview}</p>}
</div>
{episode.stillPath && (
<Image
className="h-auto w-full rounded-lg xl:h-32 xl:w-auto"
src={`https://image.tmdb.org/t/p/original/${episode.stillPath}`}
alt=""
fill
/>
<div className="relative aspect-video xl:h-32">
<Image
className="rounded-lg object-contain"
src={`https://image.tmdb.org/t/p/original/${episode.stillPath}`}
alt=""
fill
/>
</div>
)}
</div>
);
Expand Down
21 changes: 21 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ module.exports = {
},
}),
},
aspectRatio: {
auto: 'auto',
square: '1 / 1',
video: '16 / 9',
1: '1',
2: '2',
3: '3',
4: '4',
5: '5',
6: '6',
7: '7',
8: '8',
9: '9',
10: '10',
11: '11',
12: '12',
13: '13',
14: '14',
15: '15',
16: '16',
},
},
plugins: [
require('@tailwindcss/forms'),
Expand Down

0 comments on commit d2c770a

Please sign in to comment.