mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 23:54:25 +00:00
feat(transcode): add multi-resolution strategy with configurable ladders and fallback (#438)
* feat(transcode): add multi-resolution strategy with configurable ladders and fallback * feat(settings): show toast on settings update and add manual verification plan to PR template * fix(webui): preserve video resolution and fix 480p label in download dropdowns * fix(webui): display standard short-side resolution for vertical videos in seekbar * fix(webui): fix portrait transcode resolution labeling and serialize settings toggles
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
||||
Trash2,
|
||||
} from 'lucide-react'
|
||||
import React from 'react'
|
||||
import { getVideoResolutionLabel } from '@/ui/lib/media'
|
||||
|
||||
export interface MobileFileHeaderProps {
|
||||
fileName: string
|
||||
@@ -46,6 +47,7 @@ export interface MobileFileHeaderProps {
|
||||
key: string
|
||||
width: number
|
||||
height: number
|
||||
resolution?: string
|
||||
hdr?: boolean
|
||||
}>
|
||||
}
|
||||
@@ -238,14 +240,7 @@ export function MobileFileHeader({
|
||||
<DropdownMenuSubContent className="w-48 z-50">
|
||||
<DropdownMenuLabel className="text-xs">{m.download()}</DropdownMenuLabel>
|
||||
{downloadInfo?.videoTranscodes?.map((t) => {
|
||||
const longSide = Math.max(t.width, t.height)
|
||||
let resolution = `${t.height}p`
|
||||
if (longSide >= 3840) resolution = '2160p'
|
||||
else if (longSide >= 1920) resolution = '1080p'
|
||||
else if (longSide >= 1280) resolution = '720p'
|
||||
else if (longSide >= 960) resolution = '540p'
|
||||
else if (longSide >= 640) resolution = '360p'
|
||||
else if (longSide >= 320) resolution = '180p'
|
||||
const resolution = getVideoResolutionLabel(t)
|
||||
const label = t.hdr ? `${resolution} (HDR)` : resolution
|
||||
return (
|
||||
<DropdownMenuItem
|
||||
|
||||
Reference in New Issue
Block a user