Fix H3/L30/L44/L60/L90/L25/L32 polish: dependencies, naming, consistency
L30: Remove redundant loading=lazy from MediaThumb images inside the
virtualizer which only mounts visible rows anyway.
L44: electron-builder.yml now excludes the actual eslint.config.js and
.prettierrc rather than non-existent legacy .eslintrc/.prettierrc.yaml.
L60: IpcChannels.externalUrl renamed from external-url to app:external-url
to match every other channel name category prefix.
L90: settings.ts sanitizeOptions now uses (ARR as readonly string[]).includes
pattern consistently with setSettings; removes the as-never hack.
typecheck + 242 tests + eslint + prettier green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+13
-6
@@ -16,7 +16,10 @@ import {
|
||||
isYtdlpUpdateChannel,
|
||||
type Settings,
|
||||
type DownloadOptions,
|
||||
type SponsorBlockCategory
|
||||
type SponsorBlockCategory,
|
||||
type AudioFormat,
|
||||
type VideoContainer,
|
||||
type VideoCodecPref
|
||||
} from '@shared/ipc'
|
||||
|
||||
const DEFAULTS: Settings = {
|
||||
@@ -121,12 +124,16 @@ function sanitizeOptions(input: unknown): DownloadOptions {
|
||||
) as SponsorBlockCategory[])
|
||||
: d.sponsorBlockCategories
|
||||
return {
|
||||
audioFormat: AUDIO_FORMATS.includes(o.audioFormat as never) ? o.audioFormat! : d.audioFormat,
|
||||
videoContainer: VIDEO_CONTAINERS.includes(o.videoContainer as never)
|
||||
? o.videoContainer!
|
||||
audioFormat: (AUDIO_FORMATS as readonly string[]).includes(o.audioFormat as string)
|
||||
? (o.audioFormat as AudioFormat)
|
||||
: d.audioFormat,
|
||||
videoContainer: (VIDEO_CONTAINERS as readonly string[]).includes(o.videoContainer as string)
|
||||
? (o.videoContainer as VideoContainer)
|
||||
: d.videoContainer,
|
||||
preferredVideoCodec: VIDEO_CODECS.includes(o.preferredVideoCodec as never)
|
||||
? o.preferredVideoCodec!
|
||||
preferredVideoCodec: (VIDEO_CODECS as readonly string[]).includes(
|
||||
o.preferredVideoCodec as string
|
||||
)
|
||||
? (o.preferredVideoCodec as VideoCodecPref)
|
||||
: d.preferredVideoCodec,
|
||||
formatSort: typeof o.formatSort === 'string' ? o.formatSort.trim() : d.formatSort,
|
||||
embedSubtitles: bool(o.embedSubtitles, d.embedSubtitles),
|
||||
|
||||
@@ -53,13 +53,7 @@ export function MediaThumb({
|
||||
style={{ backgroundColor: colors.bg, color: colors.fg }}
|
||||
>
|
||||
{showImg ? (
|
||||
<img
|
||||
className={styles.img}
|
||||
src={src}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
onError={() => setFailedSrc(src ?? null)}
|
||||
/>
|
||||
<img className={styles.img} src={src} alt="" onError={() => setFailedSrc(src ?? null)} />
|
||||
) : kind === 'audio' ? (
|
||||
<MusicNote2Regular fontSize={iconSize} />
|
||||
) : (
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ export const IpcChannels = {
|
||||
preloadBridgeFailure: 'preload:bridge-failure',
|
||||
/** main → renderer push channel: a URL handed to AeroFetch from outside the app
|
||||
* (the aerofetch:// protocol, or a .url file via Explorer's "Send to" menu) */
|
||||
externalUrl: 'external-url',
|
||||
externalUrl: 'app:external-url',
|
||||
// --- Sources & media-manager indexing (Pinchflat-style, see ROADMAP-PINCHFLAT.md) ---
|
||||
sourcesList: 'sources:list',
|
||||
sourceIndex: 'sources:index',
|
||||
|
||||
Reference in New Issue
Block a user