1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-25 17:55:50 +05:30

refactor: switched to self-contained yt-dlp on flatpak

This commit is contained in:
2026-03-23 15:39:05 +05:30
Verified
parent dcd5cb61fb
commit 8f5607c171
5 changed files with 9 additions and 6 deletions

View File

@@ -23,9 +23,10 @@ export function useYtDlpUpdater() {
LOG.info('NEODLP', 'Updating yt-dlp to latest version');
try {
const command = currentPlatform === 'linux' && isFlatpak
? ytDlpUpdateChannel === 'nightly'
? Command.create('sh', ['-c', `PYTHONUSERBASE=${xdgDataDir}/pip python3 -m pip install --user --upgrade --pre "yt-dlp[default,curl-cffi]"`])
: Command.create('sh', ['-c', `PYTHONUSERBASE=${xdgDataDir}/pip python3 -m pip install --user --upgrade "yt-dlp[default,curl-cffi]"`])
// ? ytDlpUpdateChannel === 'nightly'
// ? Command.create('sh', ['-c', `PYTHONUSERBASE=${xdgDataDir}/pip python3 -m pip install --user --upgrade --pre "yt-dlp[default,curl-cffi]"`])
// : Command.create('sh', ['-c', `PYTHONUSERBASE=${xdgDataDir}/pip python3 -m pip install --user --upgrade "yt-dlp[default,curl-cffi]"`])
? Command.create('sh', ['-c', `${xdgDataDir}/yt-dlp/yt-dlp --update-to ${ytDlpUpdateChannel}`])
: currentPlatform === 'linux'
? Command.create('pkexec', ['yt-dlp', '--update-to', ytDlpUpdateChannel])
: Command.sidecar('binaries/yt-dlp', ['--update-to', ytDlpUpdateChannel]);