diff --git a/.prettierignore b/.prettierignore index bab2d699e..ad1f34fb7 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,6 +3,7 @@ dist/ config/ CHANGELOG.md +pnpm-lock.yaml # assets src/assets/ diff --git a/Dockerfile b/Dockerfile index f475fe056..0f761e338 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 . ./ diff --git a/package.json b/package.json index 10c36b22d..e918a64fd 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1aafd24bc..298ff6d4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,9 +52,6 @@ importers: bowser: specifier: 2.11.0 version: 2.11.0 - cacheable-lookup: - specifier: ^7.0.0 - version: 7.0.0 connect-typeorm: specifier: 1.1.4 version: 1.1.4(typeorm@0.3.12(sqlite3@5.1.4(encoding@0.1.13))(ts-node@10.9.1(@swc/core@1.6.5(@swc/helpers@0.5.11))(@types/node@17.0.36)(typescript@4.9.5))) @@ -5764,13 +5761,6 @@ packages: } engines: { node: ^12.13.0 || ^14.15.0 || >=16.0.0 } - cacheable-lookup@7.0.0: - resolution: - { - integrity: sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w==, - } - engines: { node: '>=14.16' } - cachedir@2.3.0: resolution: { @@ -19815,8 +19805,6 @@ snapshots: transitivePeerDependencies: - bluebird - cacheable-lookup@7.0.0: {} - cachedir@2.3.0: {} cachedir@2.4.0: {} diff --git a/postinstall-win.js b/postinstall-win.js new file mode 100644 index 000000000..aa3650991 --- /dev/null +++ b/postinstall-win.js @@ -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 typeorm@0.3.11 for Windows\n'); + execSync('pnpm add typeorm@0.3.11', { stdio: 'inherit' }); + } +} diff --git a/server/index.ts b/server/index.ts index 4bb1535fa..c0d1866da 100644 --- a/server/index.ts +++ b/server/index.ts @@ -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()}`); @@ -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)); - } else { - originalLookup(...(args as Parameters)); - } - }; - - cacheable.install(http.globalAgent); - cacheable.install(https.globalAgent); - const dbConnection = await dataSource.initialize(); // Run migrations in production diff --git a/src/components/TvDetails/Season/index.tsx b/src/components/TvDetails/Season/index.tsx index 75c56b017..09b2b6398 100644 --- a/src/components/TvDetails/Season/index.tsx +++ b/src/components/TvDetails/Season/index.tsx @@ -56,12 +56,14 @@ const Season = ({ seasonNumber, tvId }: SeasonProps) => { {episode.overview &&

{episode.overview}

} {episode.stillPath && ( - +
+ +
)} ); diff --git a/tailwind.config.js b/tailwind.config.js index b8b70fd54..f5b97ab56 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -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'),