From b793109e8ef0799c40537523bedde35818215ef7 Mon Sep 17 00:00:00 2001 From: NeKz Date: Sun, 18 Aug 2024 01:30:38 +0200 Subject: [PATCH] Enable 1440p and 4K --- src/bot/commands/render.ts | 18 ++++++++---------- src/client/config.ts | 14 +++++++++++--- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/bot/commands/render.ts b/src/bot/commands/render.ts index 8df5c06..51731a3 100644 --- a/src/bot/commands/render.ts +++ b/src/bot/commands/render.ts @@ -683,16 +683,14 @@ const qualityOptionChoices: ApplicationCommandOptionChoice[] = [ name: '1080p (FHD)', value: '1080p', }, - // TODO: Client render might or might not support these resolutions. - // Allowing these would also mean we need more storage... - // { - // name: "1440p (QHD)", - // value: "1440p", - // }, - // { - // name: "2160p (UHD)", - // value: "2160p", - // }, + { + name: '1440p (QHD)', + value: '1440p', + }, + { + name: '2160p (4K UHD)', + value: '2160p', + }, ]; const validateQualityOption = ( diff --git a/src/client/config.ts b/src/client/config.ts index a92a137..dc513e1 100644 --- a/src/client/config.ts +++ b/src/client/config.ts @@ -22,6 +22,8 @@ import { getRelease } from './github.ts'; const isWindows = Deno.build.os === 'windows'; export const supportedQualities: RenderQuality[] = [ + RenderQuality.UHD_2160p, + RenderQuality.QHD_1440p, RenderQuality.FHD_1080p, RenderQuality.HD_720p, RenderQuality.SD_480p, @@ -427,9 +429,15 @@ const createConfig = async () => { }, { name: 'supported_quality', - message: '📺️ What is the maximum quality you want to support? (default: 1080p)', + message: '📺️ What is the maximum quality you want to support?', type: Select, - options: ['1080p (default)', '720p', '480p'], + options: [ + { name: '1080p (default)', value: RenderQuality.FHD_1080p }, + { name: '480p', value: RenderQuality.SD_480p }, + { name: '720p', value: RenderQuality.HD_720p }, + { name: '1440p', value: RenderQuality.QHD_1440p }, + { name: '4K', value: RenderQuality.UHD_2160p }, + ], }, { name: 'game_mod', @@ -527,7 +535,7 @@ const createConfig = async () => { 'base-api': baseApi, 'folder-name': 'autorender', 'protocol': 'autorender-v1', - 'max-supported-quality': RenderQuality.FHD_1080p, + 'max-supported-quality': setup.supported_quality as RenderQuality, 'check-interval': 1, 'scale-timeout': 9, 'load-timeout': 5,