Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions build-scripts/update-metainfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ if (currentReleaseMatch) {

if (currentVersion === version && currentDate === dateStr) {
console.log('✓ AppStream metadata already up to date');
updateSplash();
process.exit(0);
}
}
Expand All @@ -90,10 +91,34 @@ if (releaseSelfClosingRegex.test(updatedSection)) {

if (updatedSection === releasesSectionMatch[0]) {
console.log('✓ AppStream metadata already up to date');
updateSplash();
process.exit(0);
}

const updatedXml = xml.replace(releasesSectionRegex, updatedSection);
fs.writeFileSync(xmlPath, updatedXml, 'utf8');

console.log(`✓ Updated AppStream release to ${version} (${dateStr})`);

updateSplash();

function updateSplash() {
const splashPath = path.join(repoRoot, 'src', 'renderer', 'splash.html');
if (!fs.existsSync(splashPath)) {
console.warn(`⚠ splash.html not found at ${splashPath}`);
return;
}
const splashHtml = fs.readFileSync(splashPath, 'utf8');
const splashRegex = /(<div class="version" id="version-display">)v[^<]*(<\/div>)/;
if (!splashRegex.test(splashHtml)) {
console.warn('⚠ Could not locate version-display element in splash.html');
return;
}
const updatedSplash = splashHtml.replace(splashRegex, `$1v${version}$2`);
if (updatedSplash === splashHtml) {
console.log('✓ Splash screen version already up to date');
return;
}
fs.writeFileSync(splashPath, updatedSplash, 'utf8');
console.log(`✓ Updated splash screen version to v${version}`);
}
2 changes: 1 addition & 1 deletion com.burnttoasters.rosi.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</screenshot>
</screenshots>
<releases>
<release version="4.0.9" date="2026-05-06"/>
<release version="4.0.10" date="2026-05-06"/>
</releases>
<content_rating type="oars-1.1"/>
</component>
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rosi",
"version": "4.0.9",
"version": "4.0.10",
"private": true,
"description": "Electron GUI for yt-dlp",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/main/deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as fs from 'fs';
import { spawn } from 'child_process';
import { BrowserWindow, dialog } from 'electron';
import log from 'electron-log/main';
import log from 'electron-log/main.js';
import type { MessageBoxOptions } from 'electron';
import {
DENO_CHECK_TIMEOUT_MS,
Expand Down
2 changes: 1 addition & 1 deletion src/main/downloader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as path from 'path';
import * as fs from 'fs';
import sanitize from 'sanitize-filename';
import { dialog } from 'electron';
import log from 'electron-log/main';
import log from 'electron-log/main.js';
import { spawnWithEnv, getEffectiveFfmpegPath, ytdlpBinary, isWindows } from './platform';
import { loadSettings, recordDownload } from './settings';
import { buildFfmpegArgs, buildYtdlpArgs, resolveVideoEncoder } from './download/commandBuilders';
Expand Down
2 changes: 1 addition & 1 deletion src/main/gpu.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import log from 'electron-log/main';
import log from 'electron-log/main.js';
import { spawnWithEnv } from './platform';
import { loadSettings } from './settings';
import { getEffectiveFfmpegPath } from './platform';
Expand Down
2 changes: 1 addition & 1 deletion src/main/main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { app, BrowserWindow, ipcMain, dialog, shell, Notification } from 'electron';
import * as path from 'path';
import * as fs from 'fs';
import log from 'electron-log/main';
import log from 'electron-log/main.js';
import { isPackaged, resolveYtdlpPath, verifyBundledFfmpeg } from './platform';
import {
loadSettings,
Expand Down
2 changes: 1 addition & 1 deletion src/main/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as os from 'os';
import * as fs from 'fs';
import { spawn } from 'child_process';
import { app, dialog } from 'electron';
import log from 'electron-log/main';
import log from 'electron-log/main.js';

export const isWindows = process.platform === 'win32';
export const isMac = process.platform === 'darwin';
Expand Down
2 changes: 1 addition & 1 deletion src/main/settings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as path from 'path';
import * as fs from 'fs';
import { app, dialog } from 'electron';
import log from 'electron-log/main';
import log from 'electron-log/main.js';
import type { AudioFormat, DownloadStats, Settings } from '../types';
import {
ALLOWED_AUDIO_FORMATS,
Expand Down
2 changes: 1 addition & 1 deletion src/main/updater.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { BrowserWindow } from 'electron';
import { app } from 'electron';
import { autoUpdater, CancellationToken } from 'electron-updater';
import log from 'electron-log/main';
import log from 'electron-log/main.js';
import type {
Settings,
UpdateDownloadResult,
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/splash.html
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ <h1 class="app-title">ROSI</h1>
<div class="loading-label">Loading</div>
</div>
</div>
<div class="version" id="version-display">v4.0.7</div>
<div class="version" id="version-display">v4.0.10</div>
<script>
setTimeout(function () {
var label = document.querySelector('.loading-label');
Expand Down
2 changes: 1 addition & 1 deletion src/tests/deno.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ vi.mock('../main/platform', () => ({
buildEnhancedPath: () => process.env.PATH || '',
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
error: logErrorMock,
warn: logWarnMock,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/downloader.errorPaths.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
dialog: { showMessageBox: showMessageBoxMock },
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
error: logErrorMock,
warn: logWarnMock,
Expand Down Expand Up @@ -188,7 +188,7 @@
buildYtdlpArgsMock.mockReturnValueOnce({
args: ['--print', 'after_move:filepath', 'https://example.com/video'],
statusMessages: ['ℹ️ builder status'],
} as any);

Check warning on line 191 in src/tests/downloader.errorPaths.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type

startDownload(
'/tmp/ytdlp',
Expand Down
2 changes: 1 addition & 1 deletion src/tests/downloader.fetchFormats.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
},
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
warn: logWarnMock,
},
Expand Down Expand Up @@ -249,7 +249,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 252 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'not-a-url', outputPath: '/tmp/downloads' },
null
);
Expand All @@ -265,7 +265,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 268 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com', outputPath: '' },
null
);
Expand All @@ -283,7 +283,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 286 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com', outputPath: '/tmp/downloads' },
null
);
Expand All @@ -304,7 +304,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 307 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com', outputPath: '/tmp/not-a-dir' },
null
);
Expand All @@ -326,7 +326,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 329 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com/video', outputPath: '/tmp/downloads' },
null
);
Expand Down Expand Up @@ -354,7 +354,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 357 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com/video', outputPath: '/tmp/downloads' },
null,
onComplete
Expand All @@ -378,7 +378,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 381 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com/video', outputPath: '/tmp/downloads' },
null,
onComplete
Expand All @@ -405,7 +405,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 408 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com/video', outputPath: '/tmp/new-downloads' },
null
);
Expand All @@ -428,7 +428,7 @@
{
isDestroyed: () => false,
send,
} as any,

Check warning on line 431 in src/tests/downloader.fetchFormats.test.ts

View workflow job for this annotation

GitHub Actions / Lint & Format

Unexpected any. Specify a different type
{ url: 'https://example.com/video', outputPath: '/tmp/downloads' },
null
);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/gpu.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ vi.mock('../main/platform', () => ({
spawnWithEnv: spawnWithEnvMock,
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
error: logErrorMock,
warn: logWarnMock,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/platform.bundledFfmpeg.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async function loadPlatformModule(resourcesPath: string) {
},
}));

vi.doMock('electron-log/main', () => ({
vi.doMock('electron-log/main.js', () => ({
default: {
info: vi.fn(),
error: vi.fn(),
Expand Down
2 changes: 1 addition & 1 deletion src/tests/platform.env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ async function loadPlatform(
},
}));

vi.doMock('electron-log/main', () => ({
vi.doMock('electron-log/main.js', () => ({
default: {
info: mocks.logInfoMock,
warn: mocks.logWarnMock,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/platform.resolveYtdlp.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function loadPlatformModule(
},
}));

vi.doMock('electron-log/main', () => ({
vi.doMock('electron-log/main.js', () => ({
default: {
info: mocks.logInfoMock,
error: mocks.logErrorMock,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/platform.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ vi.mock('electron', () => ({
},
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
info: vi.fn(),
error: vi.fn(),
Expand Down
2 changes: 1 addition & 1 deletion src/tests/settings.extended.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ vi.mock('electron', () => ({
},
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
error: logErrorMock,
warn: logWarnMock,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/settings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ vi.mock('electron', () => ({
},
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
error: logErrorMock,
warn: vi.fn(),
Expand Down
2 changes: 1 addition & 1 deletion src/tests/updaterEvents.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ vi.mock('electron-updater', () => ({
},
}));

vi.mock('electron-log/main', () => ({
vi.mock('electron-log/main.js', () => ({
default: {
info: logInfoMock,
error: logErrorMock,
Expand Down
Loading