mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2026-03-22 16:05:50 +05:30
refactor: use pip3 yt-dlp in flatpak
This commit is contained in:
@@ -21,7 +21,13 @@ export function useYtDlpUpdater() {
|
||||
setIsUpdatingYtDlp(true);
|
||||
LOG.info('NEODLP', 'Updating yt-dlp to latest version');
|
||||
try {
|
||||
const command = currentPlatform === 'linux' && !isFlatpak ? Command.create('pkexec', ['yt-dlp', '--update-to', ytDlpUpdateChannel]) : Command.sidecar('binaries/yt-dlp', ['--update-to', ytDlpUpdateChannel]);
|
||||
const command = currentPlatform === 'linux' && isFlatpak
|
||||
? ytDlpUpdateChannel === 'nightly'
|
||||
? Command.create('sh', ['-c', 'pip3 install -U --pre "yt-dlp[default,curl-cffi]"'])
|
||||
: Command.create('sh', ['-c', 'pip3 install -U "yt-dlp[default,curl-cffi]"'])
|
||||
: currentPlatform === 'linux'
|
||||
? 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);
|
||||
|
||||
Reference in New Issue
Block a user