Skip to content

Commit

Permalink
Fix for using selected_files from previous downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
egbertbouman committed Jan 24, 2025
1 parent 2618ff8 commit b2ad380
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/tribler/ui/src/dialogs/SaveAs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default function SaveAs(props: SaveAsProps & JSX.IntrinsicAttributes & Di
setError(undefined);
setDisabled(false);
setExists(false);
setFiles([])
setFiles([]);
const newSettings = await triblerService.getSettings();
if (newSettings === undefined) {
setError(`${t("ToastErrorGetSettings")} ${t("ToastErrorGenNetworkErr")}`);
Expand All @@ -135,13 +135,14 @@ export default function SaveAs(props: SaveAsProps & JSX.IntrinsicAttributes & Di
const safeSeeding = !!newSettings?.libtorrent?.download_defaults?.safeseeding_enabled;
const safeDownloading = !!newSettings?.libtorrent?.download_defaults?.anonymity_enabled;
setSettings(newSettings);
setParams({
...params,
setParams(prev => ({
...prev,
destination: newSettings?.libtorrent.download_defaults.saveas ?? '',
completed_dir: newSettings?.libtorrent.download_defaults.completed_dir ?? '',
anon_hops: safeDownloading ? newSettings.libtorrent.download_defaults.number_hops : 0,
safe_seeding: safeSeeding,
});
selected_files: []
}));
setMoveCompleted((newSettings?.libtorrent?.download_defaults.completed_dir ?? '').length > 0);

// Retrieve metainfo
Expand Down

0 comments on commit b2ad380

Please sign in to comment.