1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-03-22 19:25:49 +05:30

refactor: use pip3 yt-dlp in flatpak

This commit is contained in:
2026-03-05 21:35:30 +05:30
Verified
parent 2e6dc6ab25
commit d7f2f7b867
5 changed files with 25 additions and 11 deletions

View File

@@ -257,7 +257,10 @@ export default function App({ children }: { children: React.ReactNode }) {
const fetchYtDlpVersion = async () => {
setIsFetchingYtDlpVersion(true);
try {
const command = Command.sidecar('binaries/yt-dlp', ['--version']);
const isFlatpak = await invoke<boolean>('is_flatpak');
const command = isFlatpak
? Command.create('sh', ['-c', `yt-dlp --version`])
: Command.sidecar('binaries/yt-dlp', ['--version']);
const output = await command.execute();
if (output.code === 0) {
const version = output.stdout.trim();