From 2d5e336777172a922f383b761fb19a36a859b9c9 Mon Sep 17 00:00:00 2001 From: MrS0m30n3 Date: Thu, 24 Nov 2016 16:28:14 +0200 Subject: [PATCH] Keep savepath on item reload --- youtube_dl_gui/mainframe.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/youtube_dl_gui/mainframe.py b/youtube_dl_gui/mainframe.py index 8eb0a2d..52e0328 100644 --- a/youtube_dl_gui/mainframe.py +++ b/youtube_dl_gui/mainframe.py @@ -614,7 +614,10 @@ class MainFrame(wx.Frame): if not selected_rows: for index, item in enumerate(self._download_list.get_items()): if item.stage in ("Paused", "Completed", "Error"): + # Store the old savepath because reset is going to remove it + savepath = item.path item.reset() + item.path = savepath self._status_list._update_from_item(index, item) else: for selected_row in selected_rows: @@ -622,7 +625,10 @@ class MainFrame(wx.Frame): item = self._download_list.get_item(object_id) if item.stage in ("Paused", "Completed", "Error"): + # Store the old savepath because reset is going to remove it + savepath = item.path item.reset() + item.path = savepath self._status_list._update_from_item(selected_row, item) self._update_pause_button(None)