Skip to content

Commit

Permalink
Update CoLab_Torrent_Downloader_Pro.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
akhi07rx committed Jun 5, 2023
1 parent 5c622dc commit a68f13c
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion CoLab_Torrent_Downloader_Pro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
],
Expand Down

0 comments on commit a68f13c

Please sign in to comment.