mirror of
https://github.com/KeksPirates/SoftwareManager.git
synced 2026-08-03 17:39:42 +02:00
fix: open folder because state.download_path is None in gui.py
This commit is contained in:
@@ -273,13 +273,14 @@ class MainWindow(QtWidgets.QMainWindow, QWidget):
|
|||||||
status = magnetdl.status()
|
status = magnetdl.status()
|
||||||
|
|
||||||
if status.state == lt.torrent_status.seeding:
|
if status.state == lt.torrent_status.seeding:
|
||||||
if state.download_path and os.path.exists(state.download_path):
|
save_path = magnetdl.save_path()
|
||||||
|
if save_path and os.path.exists(save_path):
|
||||||
if platform.system() == "Windows":
|
if platform.system() == "Windows":
|
||||||
os.startfile(os.path.normpath(state.download_path))
|
os.startfile(os.path.normpath(save_path))
|
||||||
elif platform.system() == "Linux":
|
elif platform.system() == "Linux":
|
||||||
subprocess.Popen(["xdg-open", state.download_path])
|
subprocess.Popen(["xdg-open", save_path])
|
||||||
elif platform.system() == "Darwin":
|
elif platform.system() == "Darwin":
|
||||||
subprocess.Popen(["open", state.download_path])
|
subprocess.Popen(["open", save_path])
|
||||||
return
|
return
|
||||||
|
|
||||||
if status.paused:
|
if status.paused:
|
||||||
|
|||||||
Reference in New Issue
Block a user