Compare commits

..

No commits in common. "f9a0fdcf3d162cedf102a8b2e8d75c1ca6929b1c" and "d9bdf744fd7f480786cbb7f891769a3dc3e9356a" have entirely different histories.

4 changed files with 16 additions and 1174 deletions

View File

@ -1,25 +0,0 @@
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import security from 'eslint-plugin-security';
export default [
js.configs.recommended,
...tseslint.configs.recommended,
security.configs.recommended,
{
files: ['src/**/*.ts'],
rules: {
// Tune down noisy rules for existing codebase
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'no-console': 'off',
'security/detect-object-injection': 'off', // Too many false positives with Record types
'security/detect-non-literal-fs-filename': 'off', // All paths come from controlled sources
'no-async-promise-executor': 'warn',
'no-empty': ['warn', { allowEmptyCatch: true }],
}
},
{
ignores: ['dist/**', 'release/**', 'node_modules/**', 'scripts/**', 'tmp_*/**']
}
];

1145
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "twitch-vod-manager", "name": "twitch-vod-manager",
"version": "4.5.6", "version": "4.5.5",
"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",
@ -25,14 +25,10 @@
"electron-updater": "^6.1.0" "electron-updater": "^6.1.0"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^20.10.0", "@types/node": "^20.10.0",
"electron": "^28.0.0", "electron": "^28.0.0",
"electron-builder": "^24.9.0", "electron-builder": "^24.9.0",
"eslint": "^10.1.0", "typescript": "^5.3.0"
"eslint-plugin-security": "^4.0.0",
"typescript": "^5.3.0",
"typescript-eslint": "^8.57.1"
}, },
"build": { "build": {
"appId": "de.24-music.twitch-vod-manager", "appId": "de.24-music.twitch-vod-manager",

View File

@ -688,7 +688,6 @@ function parseDuration(duration: string): number {
} }
function formatDuration(seconds: number): string { function formatDuration(seconds: number): string {
if (!isFinite(seconds) || seconds < 0) return '00:00:00';
const h = Math.floor(seconds / 3600); const h = Math.floor(seconds / 3600);
const m = Math.floor((seconds % 3600) / 60); const m = Math.floor((seconds % 3600) / 60);
const s = Math.floor(seconds % 60); const s = Math.floor(seconds % 60);
@ -696,7 +695,6 @@ function formatDuration(seconds: number): string {
} }
function formatDurationDashed(seconds: number): string { function formatDurationDashed(seconds: number): string {
if (!isFinite(seconds) || seconds < 0) return '00-00-00';
const h = Math.floor(seconds / 3600); const h = Math.floor(seconds / 3600);
const m = Math.floor((seconds % 3600) / 60); const m = Math.floor((seconds % 3600) / 60);
const s = Math.floor(seconds % 60); const s = Math.floor(seconds % 60);
@ -1097,7 +1095,8 @@ function withInFlightDedup<T>(
return existing; return existing;
} }
const requestPromise: Promise<T> = factory().finally(() => { let requestPromise: Promise<T>;
requestPromise = factory().finally(() => {
if (store.get(key) === requestPromise) { if (store.get(key) === requestPromise) {
store.delete(key); store.delete(key);
} }
@ -1413,7 +1412,8 @@ function requestTwitchLogin(): Promise<boolean> {
return twitchLoginInFlight; return twitchLoginInFlight;
} }
const loginPromise: Promise<boolean> = twitchLogin().finally(() => { let loginPromise: Promise<boolean>;
loginPromise = twitchLogin().finally(() => {
if (twitchLoginInFlight === loginPromise) { if (twitchLoginInFlight === loginPromise) {
twitchLoginInFlight = null; twitchLoginInFlight = null;
} }
@ -1883,7 +1883,9 @@ async function cutVideo(
let inputBytes = 0; let inputBytes = 0;
try { try {
inputBytes = fs.statSync(inputFile).size; inputBytes = fs.statSync(inputFile).size;
} catch { } } catch {
inputBytes = 0;
}
const cutRequiredBytes = Math.max(96 * 1024 * 1024, Math.ceil(inputBytes * 0.75)); const cutRequiredBytes = Math.max(96 * 1024 * 1024, Math.ceil(inputBytes * 0.75));
const cutDiskCheck = ensureDiskSpace(path.dirname(outputFile), cutRequiredBytes, 'Video-Cut'); const cutDiskCheck = ensureDiskSpace(path.dirname(outputFile), cutRequiredBytes, 'Video-Cut');