From a68f13ca495ec71143964a68e7b6775b2af18c5e Mon Sep 17 00:00:00 2001 From: akhi07rx <89210430+akhi07rx@users.noreply.github.com> Date: Mon, 5 Jun 2023 16:18:06 +0530 Subject: [PATCH] Update CoLab_Torrent_Downloader_Pro.ipynb --- CoLab_Torrent_Downloader_Pro.ipynb | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CoLab_Torrent_Downloader_Pro.ipynb b/CoLab_Torrent_Downloader_Pro.ipynb index fccebe1..2070cfe 100644 --- a/CoLab_Torrent_Downloader_Pro.ipynb +++ b/CoLab_Torrent_Downloader_Pro.ipynb @@ -156,7 +156,34 @@ "with open(resume_data_file, 'wb') as f:\n", " pickle.dump(resume_data, f)\n", "\n", - "\n" + "while True:\n", + " print(\"\\nFile Options:\")\n", + " print(\"1. Show File Details\")\n", + " print(\"2. Exit to Main Menu\")\n", + "\n", + " file_choice = input(\"Select an option (1 or 2): \")\n", + "\n", + " if file_choice == '1':\n", + " for i in range(torrent_info.num_files()):\n", + " file_path = os.path.join(save_path, torrent_info.files().file_path(i))\n", + " if os.path.exists(file_path):\n", + " file_size = os.path.getsize(file_path)\n", + " file_size_mb = file_size / (1024 ** 2)\n", + " file_size_gb = file_size / (1024 ** 3)\n", + " file_size_str = f\"{file_size_mb:.2f} MB / {file_size_gb:.2f} GB\"\n", + " print(f\"\\nFile name: {torrent_info.files().file_path(i)}\")\n", + " print(f\"File size: {file_size_str}\")\n", + " print(f\"File link: {link}\")\n", + " elif file_choice == '2':\n", + " break\n", + " else:\n", + " print(\"Invalid choice. Please select a valid option.\")\n", + " continue\n", + "\n", + "\n", + "\n", + "#added file menu\n", + "#23" ] } ],