release: 5.0.10 — Single-Source-Of-Truth fuer Config-Defaults
DEFAULT_METADATA_CACHE_MINUTES und DEFAULT_PERFORMANCE_MODE waren dupliziert in main.ts und src/main/domain/config-normalize.ts. Wenn jemand einen Default aendert (z.B. metadata-cache von 10 auf 15min), ist die andere Seite still drift-anfaellig — config laedt den alten Default beim Erst-Start aber normalize-Funktion fallt auf den neuen zurueck. Fix: beide Konstanten werden jetzt aus config-normalize.ts exportiert und in main.ts importiert. Single source of truth. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a4931d3ec0
commit
57f56d98a6
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "5.0.9",
|
"version": "5.0.10",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "5.0.9",
|
"version": "5.0.10",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.16.1",
|
"axios": "^1.16.1",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "twitch-vod-manager",
|
"name": "twitch-vod-manager",
|
||||||
"version": "5.0.9",
|
"version": "5.0.10",
|
||||||
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
||||||
"main": "dist/main.js",
|
"main": "dist/main.js",
|
||||||
"author": "xRangerDE",
|
"author": "xRangerDE",
|
||||||
|
|||||||
@ -26,6 +26,8 @@ import {
|
|||||||
normalizePerformanceMode,
|
normalizePerformanceMode,
|
||||||
isPlainObject,
|
isPlainObject,
|
||||||
VALID_STREAMLINK_QUALITIES,
|
VALID_STREAMLINK_QUALITIES,
|
||||||
|
DEFAULT_METADATA_CACHE_MINUTES,
|
||||||
|
DEFAULT_PERFORMANCE_MODE,
|
||||||
type PerformanceMode,
|
type PerformanceMode,
|
||||||
} from './main/domain/config-normalize';
|
} from './main/domain/config-normalize';
|
||||||
import { CustomClip, MergeGroupItem, MergeGroup, QueueItem, DownloadProgress, DownloadResult } from './types';
|
import { CustomClip, MergeGroupItem, MergeGroup, QueueItem, DownloadProgress, DownloadResult } from './types';
|
||||||
@ -62,8 +64,9 @@ const DEFAULT_DOWNLOAD_PATH = path.join(app.getPath('desktop'), 'Twitch_VODs');
|
|||||||
const DEFAULT_FILENAME_TEMPLATE_VOD = '{title}.mp4';
|
const DEFAULT_FILENAME_TEMPLATE_VOD = '{title}.mp4';
|
||||||
const DEFAULT_FILENAME_TEMPLATE_PARTS = '{date}_Part{part_padded}.mp4';
|
const DEFAULT_FILENAME_TEMPLATE_PARTS = '{date}_Part{part_padded}.mp4';
|
||||||
const DEFAULT_FILENAME_TEMPLATE_CLIP = '{date}_{part}.mp4';
|
const DEFAULT_FILENAME_TEMPLATE_CLIP = '{date}_{part}.mp4';
|
||||||
const DEFAULT_METADATA_CACHE_MINUTES = 10;
|
// DEFAULT_METADATA_CACHE_MINUTES + DEFAULT_PERFORMANCE_MODE kommen aus
|
||||||
const DEFAULT_PERFORMANCE_MODE: PerformanceMode = 'balanced';
|
// ./main/domain/config-normalize (Single-Source-Of-Truth, vermeidet
|
||||||
|
// Drift wenn man eine der Defaults aendert).
|
||||||
const QUEUE_SAVE_DEBOUNCE_MS = 250;
|
const QUEUE_SAVE_DEBOUNCE_MS = 250;
|
||||||
const MIN_FREE_DISK_BYTES = 128 * 1024 * 1024;
|
const MIN_FREE_DISK_BYTES = 128 * 1024 * 1024;
|
||||||
const DEBUG_LOG_FLUSH_INTERVAL_MS = 1000;
|
const DEBUG_LOG_FLUSH_INTERVAL_MS = 1000;
|
||||||
|
|||||||
@ -6,8 +6,8 @@ export const VALID_STREAMLINK_QUALITIES = ['best', 'source', '1080p60', '720p60'
|
|||||||
|
|
||||||
const AUTO_RECORD_POLL_MIN_SECONDS = 30;
|
const AUTO_RECORD_POLL_MIN_SECONDS = 30;
|
||||||
const AUTO_RECORD_POLL_MAX_SECONDS = 1800;
|
const AUTO_RECORD_POLL_MAX_SECONDS = 1800;
|
||||||
const DEFAULT_METADATA_CACHE_MINUTES = 10;
|
export const DEFAULT_METADATA_CACHE_MINUTES = 10;
|
||||||
const DEFAULT_PERFORMANCE_MODE: PerformanceMode = 'balanced';
|
export const DEFAULT_PERFORMANCE_MODE: PerformanceMode = 'balanced';
|
||||||
|
|
||||||
/** trim + strip leading @ + lowercase. Verbatim aus altem main.ts. */
|
/** trim + strip leading @ + lowercase. Verbatim aus altem main.ts. */
|
||||||
export function normalizeLogin(input: string): string {
|
export function normalizeLogin(input: string): string {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user