From b8f36cc59f92d62a7cabe87013eb4ba685c6bc09 Mon Sep 17 00:00:00 2001 From: zuckerberg <5-zuckerberg@users.noreply.git.neet.dev> Date: Fri, 24 Sep 2021 18:20:57 -0400 Subject: [PATCH] debug --- downloader.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/downloader.py b/downloader.py index 890787b..e182500 100644 --- a/downloader.py +++ b/downloader.py @@ -100,16 +100,16 @@ def mountTorrent(magnet): o.communicate() # wait for it to finish def umountTorrent(): - print("mock unmounting torrent...") - # if os.path.isdir(fuseTorrentLocation): - # o = subprocess.Popen([ - # "fusermount", - # "-u", fuseTorrentLocation - # ]) - # o.communicate() # wait for it to finish - # os.rmdir(fuseTorrentLocation) - # if os.path.isdir(btfsDataLocation): - # shutil.rmtree(btfsDataLocation) + print("unmounting torrent...") + if os.path.isdir(fuseTorrentLocation): + o = subprocess.Popen([ + "fusermount", + "-u", fuseTorrentLocation + ]) + o.communicate() # wait for it to finish + os.rmdir(fuseTorrentLocation) + if os.path.isdir(btfsDataLocation): + shutil.rmtree(btfsDataLocation) def getTorrentMedia(): print("Getting torrent media...")