1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-22 23:55:48 +05:30

refactor: disable linux registration and fix yt-dlp updater on flatpak

This commit is contained in:
2026-02-24 10:00:51 +05:30
Verified
parent 1ba035e14b
commit 32d63be13e
2 changed files with 10 additions and 10 deletions

View File

@@ -17,10 +17,11 @@ export function useYtDlpUpdater() {
const updateYtDlp = async () => {
const CURRENT_TIMESTAMP = Date.now();
const isFlatpak = await invoke<boolean>('is_flatpak');
setIsUpdatingYtDlp(true);
LOG.info('NEODLP', 'Updating yt-dlp to latest version');
try {
const command = currentPlatform === 'linux' ? Command.create('pkexec', ['yt-dlp', '--update-to', ytDlpUpdateChannel]) : Command.sidecar('binaries/yt-dlp', ['--update-to', ytDlpUpdateChannel]);
const command = currentPlatform === 'linux' && !isFlatpak ? Command.create('pkexec', ['yt-dlp', '--update-to', ytDlpUpdateChannel]) : Command.sidecar('binaries/yt-dlp', ['--update-to', ytDlpUpdateChannel]);
const output = await command.execute();
if (output.code === 0) {
console.log("yt-dlp updated successfully:", output.stdout);