diff --git a/README.md b/README.md
index 2e54b26..c0647af 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ This is a Google Colab notebook with QBittorrent and Rclone, which can download
Usage:
-
+
1. Click on the "Open in Colab" button and press ctrl+f9
For the people not familiar with the webUI, this is what it looks like:
diff --git a/Torrents_to_Google_Drive_(tunnelto_ver_).ipynb b/Torrents_to_Google_Drive_(tunnelto_ver_).ipynb
new file mode 100644
index 0000000..91d09c4
--- /dev/null
+++ b/Torrents_to_Google_Drive_(tunnelto_ver_).ipynb
@@ -0,0 +1,479 @@
+{
+ "nbformat": 4,
+ "nbformat_minor": 0,
+ "metadata": {
+ "colab": {
+ "name": "Torrents to Google Drive (tunnelto ver.)",
+ "provenance": [],
+ "collapsed_sections": [
+ "4E-uzYrv5o0B",
+ "fkaNFMaxHDWz",
+ "6I2huqscJEPn"
+ ],
+ "toc_visible": true,
+ "include_colab_link": true
+ },
+ "kernelspec": {
+ "name": "python3",
+ "display_name": "Python 3"
+ },
+ "accelerator": "GPU"
+ },
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "view-in-github",
+ "colab_type": "text"
+ },
+ "source": [
+ ""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "HGctdySsIGFS"
+ },
+ "source": [
+ "# ** Torrents to Google Drive - Shared by [Cheems](https://github.com/cheems) and slightly modified by [jericjan](https://github.com/jericjan) **\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "4E-uzYrv5o0B"
+ },
+ "source": [
+ "---\n",
+ "#Mount Google Drive with Rclone "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "iroeLPFdXbif",
+ "cellView": "form"
+ },
+ "source": [
+ "#@markdown
đ Note: Run this before using Rclone.
\n",
+ "#@markdown đ Upload an rclone profile4>\n",
+ "Setup_Time_Zone = False \n",
+ "\n",
+ "import os; from google.colab import files; from IPython.display import HTML, clear_output\n",
+ "\n",
+ "def upload_conf():\n",
+ " try:\n",
+ " display(HTML(\"Please upload the config file of rclone (rclone.conf) from your computer.
\"))\n",
+ " UploadConfig = files.upload().keys()\n",
+ " clear_output(wait=True)\n",
+ " if len(UploadConfig) == 0:\n",
+ " return display(HTML(\"File upload has been cancelled during upload file.
\"))\n",
+ " elif len(UploadConfig) == 1:\n",
+ " for fn in UploadConfig:\n",
+ " if os.path.isfile(\"/content/\" + fn) == True:\n",
+ " os.environ[\"rclone_conf\"] = fn\n",
+ " !mv -f \"$rclone_conf\" /root/.rclone.conf\n",
+ " !chmod 666 /root/.rclone.conf\n",
+ " if Setup_Time_Zone == True:\n",
+ " !sudo dpkg-reconfigure tzdata\n",
+ " clear_output(wait=True)\n",
+ " if os.path.isfile(\"/usr/bin/rclone\") == True:\n",
+ " return display(HTML(\"Config has been changed.
\"))\n",
+ " else:\n",
+ " !rm -rf /content/sample_data/\n",
+ " !curl -s https://rclone.org/install.sh | sudo bash\n",
+ " clear_output(wait=True)\n",
+ " return display(HTML(\"Installation has been successfully completed.
\"))\n",
+ " else:\n",
+ " return display(HTML(\"File upload has been failed during upload file.
\"))\n",
+ " else:\n",
+ " for fn in UploadConfig:\n",
+ " os.environ[\"rclone_conf\"] = fn\n",
+ " !rm -f \"$rclone_conf\"\n",
+ " return display(HTML(\"Please uploading only one file at a time.
\"))\n",
+ " except:\n",
+ " clear_output(wait=True)\n",
+ " return display(HTML(\"Error occurred during upload file.
\"))\n",
+ "\n",
+ "upload_conf()"
+ ],
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "mp6XoynaX4HN",
+ "cellView": "form"
+ },
+ "source": [
+ "# ============================= FORM ============================= #\n",
+ "#@markdown đ Run this to mount the drive with rclone
\n",
+ "rclone_config_name = \"YourDrive\" #@param {type:\"string\"}\n",
+ "local_mount_location = \"/content/udrive/\" #@param {type:\"string\"}\n",
+ "#@markdown The default qBittorrent download location is '/content/udrive/qBittorrent/' (they get downloaded to '/content/qBittorrent/' first)\n",
+ "# ============================= FORM ============================= #\n",
+ "import time\n",
+ "import os\n",
+ "\n",
+ "# clear nohup\n",
+ "open(\"nohup.out\", 'w').close()\n",
+ "\n",
+ "\n",
+ "# unmount first\n",
+ "\n",
+ "!fusermount -u $local_mount_location 2>/dev/null\n",
+ "\n",
+ "\n",
+ "# mount without waiting for the command to complete\n",
+ "!mkdir $local_mount_location 2>/dev/null\n",
+ "!nohup rclone mount $rclone_config_name: $local_mount_location --buffer-size 96M & \n",
+ " \n",
+ "\n",
+ "\n",
+ "# Show the output that was written to nohup\n",
+ "time.sleep(3)\n",
+ "f = open(r\"nohup.out\", \"r\")\n",
+ "nohupText = f.read()\n",
+ "f.close()\n",
+ "\n",
+ "\n",
+ "dirs = os.listdir(local_mount_location)\n",
+ "\n",
+ "if len(dirs) > 0:\n",
+ " clear_output(wait=True)\n",
+ " print(\"Succeeded. \", str(len(dirs)), \"dirs found at\", local_mount_location)\n",
+ "\n",
+ "else:\n",
+ " print(\"\\n\\nNot succeeded. No files or directories in mounted location. \\nCheck your config name and content. If the rclone command was not found, run the cell above.\\n\\n\")\n",
+ " print(\"log:\\n\", nohupText)"
+ ],
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "fkaNFMaxHDWz"
+ },
+ "source": [
+ "---\n",
+ "# \n",
+ "\n",
+ "###**Update - replaced localtunnel with tunnelto**\n",
+ "After running, it will say something like: \"Success! Remote tunnel created on: https://ecuy6tjy.tunnelto.dev\"\n",
+ "
That will be the link you open.
\n",
+ "*Sometimes*, it won't be able to download the config file and you will get a login screen. If that happens, run the cell again or login with \"admin\" as username and \"adminadmin\" as password"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "ELoHkXE1Xnms",
+ "cellView": "form"
+ },
+ "source": [
+ "# ============================= FORM ============================= #\n",
+ "#@markdown đ INSTALL QBITTORRENT
\n",
+ "\n",
+ "import os, time, urllib.request, json; from IPython.display import clear_output\n",
+ "import json\n",
+ "import subprocess\n",
+ "\n",
+ "\n",
+ "if os.path.isfile(\"/usr/bin/qbittorrent-nox\") == False:\n",
+ " get_ipython().system_raw(\"apt update -qq -y && yes \"\" | add-apt-repository ppa:qbittorrent-team/qbittorrent-stable\")\n",
+ " get_ipython().system_raw(\"apt install qbittorrent-nox\")\n",
+ " get_ipython().system_raw(\"mkdir -p -m 666 /{content/qBittorrent,root/{.qBittorrent_temp,.config/qBittorrent}} && curl -s https://pastebin.com/raw/7TEALGNz -o /root/.config/qBittorrent/qBittorrent.conf\")\n",
+ " print(\"qBittorrent successfully installed.\")\n",
+ " clear_output(wait=True)\n",
+ "else:\n",
+ " print(\"qBittorrent already installed. Skipping...\")\n",
+ " !curl -s https://pastebin.com/raw/7TEALGNz -o /root/.config/qBittorrent/qBittorrent.conf #added to redownload config file\n",
+ " clear_output(wait=True)\n",
+ " !pkill qbittorrent-nox\n",
+ "if not os.path.isfile(\"/usr/bin/tunnelto\"): \n",
+ " !wget 'https://github.com/agrinman/tunnelto/releases/latest/download/tunnelto-linux.tar.gz'\n",
+ " !tar xvf '/content/tunnelto-linux.tar.gz'\n",
+ " !mv '/content/tunnelto' '/usr/bin'\n",
+ " clear_output(wait=True)\n",
+ "else:\n",
+ " print(\"tunnelto already installed. Skipping...\")\n",
+ " clear_output(wait=True)\n",
+ "\n",
+ "!qbittorrent-nox -d --webui-port=4646\n",
+ "print(\"qBittorrent started \")\n",
+ "clear_output(wait=True)\n",
+ "\n",
+ "if os.path.isfile(\"/usr/bin/rclone\") == False:\n",
+ " get_ipython().system_raw('curl https://rclone.org/install.sh | sudo bash &')\n",
+ " print(\"Rclone successfully installed\")\n",
+ " clear_output(wait=True)\n",
+ "else:\n",
+ " print(\"Rclone already installed. Skipping...\")\n",
+ " clear_output(wait=True)\n",
+ "\n",
+ "!tunnelto --port 4646"
+ ],
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "6I2huqscJEPn"
+ },
+ "source": [
+ "---\n",
+ "# "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "metadata": {
+ "id": "RIr3CXMAGNdy",
+ "cellView": "form"
+ },
+ "source": [
+ "# ============================= FORM ============================= #\n",
+ "Mode = \"Move\" #@param [\"Off\",\"Config\", \"Copy\", \"Move\", \"Sync\", \"Checker\", \"Deduplicate\", \"Remove Empty Directories\", \"Empty Trash\", \"qBittorrent\"]\n",
+ "Compare = \"Size & Mod-Time\" #@param [\"Size & Mod-Time\", \"Size & Checksum\", \"Only Mod-Time\", \"Only Size\", \"Only Checksum\"]\n",
+ "Source = \"/content/udrive/qBittorrent\" #@param {type:\"string\"}\n",
+ "Destination = \"\" #@param {type:\"string\"}\n",
+ "Transfers = 4 #@param {type:\"slider\", min:1, max:20, step:1}\n",
+ "Checkers = 20 #@param {type:\"slider\", min:1, max:40, step:1}\n",
+ "#@markdown ---\n",
+ "\n",
+ "#@markdown âī¸ Global Configuration âī¸
\n",
+ "\n",
+ "#@markdown ---\n",
+ "Simple_Ouput = True #@param {type:\"boolean\"}\n",
+ "Skip_files_that_are_newer_on_the_destination = True #@param {type:\"boolean\"}\n",
+ "Skip_all_files_that_exist = True #@param {type:\"boolean\"}\n",
+ "Do_not_cross_filesystem_boundaries = False\n",
+ "Do_not_update_modtime_if_files_are_identical = False #@param {type:\"boolean\"}\n",
+ "Large_amount_of_files_optimization = False\n",
+ "Google_Drive_optimization = True #@param {type:\"boolean\"}\n",
+ "Dry_Run = False #@param {type:\"boolean\"}\n",
+ "Output_Log_File = \"OFF\" #@param [\"OFF\", \"NOTICE\", \"INFO\", \"ERROR\", \"DEBUG\"]\n",
+ "Extra_Arguments = \"\" #@param {type:\"string\"}\n",
+ "#@markdown ---\n",
+ "\n",
+ "#@markdown âĒī¸ Sync Configuration âŠī¸
\n",
+ "\n",
+ "#@markdown ---\n",
+ "Sync_Mode = \"Delete during transfer\" #@param [\"Delete during transfer\", \"Delete before transfering\", \"Delete after transfering\"]\n",
+ "Track_Renames = False #@param {type:\"boolean\"}\n",
+ "#@markdown ---\n",
+ "\n",
+ "#@markdown đ Deduplicate Configuration đ
\n",
+ "\n",
+ "#@markdown ---\n",
+ "Deduplicate_Mode = \"Interactive\" #@param [\"Interactive\", \"Skip\", \"First\", \"Newest\", \"Oldest\", \"Largest\", \"Rename\"]\n",
+ "Deduplicate_Use_Trash = True #@param {type:\"boolean\"}\n",
+ "# ================================================================ #\n",
+ "\n",
+ "import os; from IPython.display import HTML, clear_output\n",
+ "import sys\n",
+ "\n",
+ "\n",
+ "if Mode != \"Off\":\n",
+ "\n",
+ " # Optimized for Google Colaboratory\n",
+ " os.environ[\"bufferC\"] = \"--buffer-size 96M\"\n",
+ "\n",
+ " if Compare == \"Size & Checksum\":\n",
+ " os.environ[\"compareC\"] = \"-c\"\n",
+ " elif Compare == \"Only Mod-Time\":\n",
+ " os.environ[\"compareC\"] = \"--ignore-size\"\n",
+ " elif Compare == \"Only Size\":\n",
+ " os.environ[\"compareC\"] = \"--size-only\"\n",
+ " elif Compare == \"Only Checksum\":\n",
+ " os.environ[\"compareC\"] = \"-c --ignore-size\"\n",
+ " else:\n",
+ " os.environ[\"compareC\"] = \"\"\n",
+ "\n",
+ " os.environ[\"sourceC\"] = Source\n",
+ " os.environ[\"destinationC\"] = Destination\n",
+ " os.environ[\"transfersC\"] = \"--transfers \"+str(Transfers)\n",
+ " os.environ[\"checkersC\"] = \"--checkers \"+str(Checkers)\n",
+ "\n",
+ " if Skip_files_that_are_newer_on_the_destination == True:\n",
+ " os.environ[\"skipnewC\"] = \"-u\"\n",
+ " else:\n",
+ " os.environ[\"skipnewC\"] = \"\"\n",
+ "\n",
+ " if Skip_all_files_that_exist == True:\n",
+ " os.environ[\"skipexistC\"] = \"--ignore-existing\"\n",
+ " else:\n",
+ " os.environ[\"skipexistC\"] = \"\"\n",
+ "\n",
+ " if Do_not_cross_filesystem_boundaries == True:\n",
+ " os.environ[\"nocrossfilesystemC\"] = \"--one-file-system\"\n",
+ " else:\n",
+ " os.environ[\"nocrossfilesystemC\"] = \"\"\n",
+ "\n",
+ " if Do_not_update_modtime_if_files_are_identical == True:\n",
+ " os.environ[\"noupdatemodtimeC\"] = \"--no-update-modtime\"\n",
+ " else:\n",
+ " os.environ[\"noupdatemodtimeC\"] = \"\"\n",
+ "\n",
+ " if Large_amount_of_files_optimization == True:\n",
+ " os.environ[\"filesoptimizeC\"] = \"--fast-list\"\n",
+ " else:\n",
+ " os.environ[\"filesoptimizeC\"] = \"\"\n",
+ "\n",
+ " if Google_Drive_optimization == True:\n",
+ " os.environ[\"driveoptimizeC\"] = \"--drive-chunk-size 32M --drive-acknowledge-abuse --drive-keep-revision-forever --disable copy\"\n",
+ " else:\n",
+ " os.environ[\"driveoptimizeC\"] = \"\"\n",
+ "\n",
+ " if Dry_Run == True:\n",
+ " os.environ[\"dryrunC\"] = \"-n\"\n",
+ " else:\n",
+ " os.environ[\"dryrunC\"] = \"\"\n",
+ "\n",
+ " if Output_Log_File != \"OFF\":\n",
+ " os.environ[\"statsC\"] = \"--log-file=/root/.rclone_log/rclone_log.txt\"\n",
+ " else:\n",
+ " if Simple_Ouput == True:\n",
+ " os.environ[\"statsC\"] = \"-v --stats-one-line --stats=5s\"\n",
+ " else:\n",
+ " os.environ[\"statsC\"] = \"-v --stats=5s\"\n",
+ "\n",
+ " if Output_Log_File == \"INFO\":\n",
+ " os.environ[\"loglevelC\"] = \"--log-level INFO\"\n",
+ " elif Output_Log_File == \"ERROR\":\n",
+ " os.environ[\"loglevelC\"] = \"--log-level ERROR\"\n",
+ " elif Output_Log_File == \"DEBUG\":\n",
+ " os.environ[\"loglevelC\"] = \"--log-level DEBUG\"\n",
+ " else:\n",
+ " os.environ[\"loglevelC\"] = \"\"\n",
+ "\n",
+ " os.environ[\"extraC\"] = Extra_Arguments\n",
+ "\n",
+ " if Sync_Mode == \"Delete during transfer\":\n",
+ " os.environ[\"syncmodeC\"] = \"--delete-during\"\n",
+ " elif Sync_Mode == \"Delete before transfering\":\n",
+ " os.environ[\"syncmodeC\"] = \"--delete-before\"\n",
+ " elif Sync_Mode == \"Delete after transfering\":\n",
+ " os.environ[\"syncmodeC\"] = \"--delete-after\"\n",
+ "\n",
+ " if Track_Renames == True:\n",
+ " os.environ[\"trackrenamesC\"] = \"--track-renames\"\n",
+ " else:\n",
+ " os.environ[\"trackrenamesC\"] = \"\"\n",
+ "\n",
+ " if Deduplicate_Mode == \"Interactive\":\n",
+ " os.environ[\"deduplicateC\"] = \"interactive\"\n",
+ " elif Deduplicate_Mode == \"Skip\":\n",
+ " os.environ[\"deduplicateC\"] = \"skip\"\n",
+ " elif Deduplicate_Mode == \"First\":\n",
+ " os.environ[\"deduplicateC\"] = \"first\"\n",
+ " elif Deduplicate_Mode == \"Newest\":\n",
+ " os.environ[\"deduplicateC\"] = \"newest\"\n",
+ " elif Deduplicate_Mode == \"Oldest\":\n",
+ " os.environ[\"deduplicateC\"] = \"oldest\"\n",
+ " elif Deduplicate_Mode == \"Largest\":\n",
+ " os.environ[\"deduplicateC\"] = \"largest\"\n",
+ " elif Deduplicate_Mode == \"Rename\":\n",
+ " os.environ[\"deduplicateC\"] = \"rename\"\n",
+ "\n",
+ " if Deduplicate_Use_Trash == True:\n",
+ " os.environ[\"deduplicatetrashC\"] = \"\"\n",
+ " else:\n",
+ " os.environ[\"deduplicatetrashC\"] = \"--drive-use-trash=false\"\n",
+ "\n",
+ " ### rclone Execution\n",
+ "\n",
+ " if Output_Log_File != \"OFF\" and Mode != \"Config\":\n",
+ " !mkdir -p -m 666 /root/.rclone_log/\n",
+ " display(HTML(\"Logging enables, rclone will not output log through the terminal, please wait until finished.
\"))\n",
+ "\n",
+ "\n",
+ " if Mode == \"Config\":\n",
+ " !rclone --config=/root/.rclone.conf config\n",
+ " elif Mode == \"Copy\":\n",
+ " !rclone --config=/root/.rclone.conf copy \"$sourceC\" \"$destinationC\" $transfersC $checkersC $statsC $loglevelC $compareC $skipnewC $skipexistC $nocrossfilesystemC $noupdatemodtimeC $bufferC $filesoptimizeC $driveoptimizeC $dryrunC $extraC\n",
+ " elif Mode == \"Move\":\n",
+ " !rclone --config=/root/.rclone.conf move \"$sourceC\" \"$destinationC\" $transfersC $checkersC $statsC $loglevelC --delete-empty-src-dirs $compareC $skipnewC $skipexistC $nocrossfilesystemC $noupdatemodtimeC $bufferC $filesoptimizeC $driveoptimizeC $dryrunC $extraC\n",
+ " elif Mode == \"Sync\":\n",
+ " !rclone --config=/root/.rclone.conf sync \"$sourceC\" \"$destinationC\" $transfersC $checkersC $statsC $loglevelC $syncmodeC $trackrenamesC $compareC $skipnewC $skipexistC $nocrossfilesystemC $noupdatemodtimeC $bufferC $filesoptimizeC $driveoptimizeC $dryrunC $extraC\n",
+ " elif Mode == \"Checker\":\n",
+ " !rclone --config=/root/.rclone.conf check \"$sourceC\" \"$destinationC\" $checkersC $statsC $loglevelC $compareC $skipnewC $skipexistC $nocrossfilesystemC $noupdatemodtimeC $bufferC $filesoptimizeC $driveoptimizeC $dryrunC $extraC\n",
+ " elif Mode == \"Deduplicate\":\n",
+ " !rclone --config=/root/.rclone.conf dedupe \"$sourceC\" $checkersC $statsC $loglevelC --dedupe-mode $deduplicateC $deduplicatetrashC $compareC $skipnewC $skipexistC $nocrossfilesystemC $noupdatemodtimeC $bufferC $filesoptimizeC $driveoptimizeC $dryrunC $extraC\n",
+ " elif Mode == \"Remove Empty Directories\":\n",
+ " !rclone --config=/root/.rclone.conf rmdirs \"$sourceC\" $statsC $loglevelC $dryrunC $extraC\n",
+ " elif Mode == \"Empty Trash\":\n",
+ " !rclone --config=/root/.rclone.conf cleanup \"$sourceC\" $statsC $loglevelC $dryrunC $extraC\n",
+ " elif Mode == \"qBittorrent\":\n",
+ " !chmod -R 666 /content/qBittorrent/\n",
+ " !rclone --config=/root/.rclone.conf move \"/content/qBittorrent/\" \"$destinationC\" $transfersC $checkersC $statsC $loglevelC --delete-empty-src-dirs --exclude **/.unwanted/ $compareC $skipnewC $skipexistC $nocrossfilesystemC $noupdatemodtimeC $bufferC $filesoptimizeC $driveoptimizeC $dryrunC $extraC\n",
+ "\n",
+ " ### Log Output\n",
+ "\n",
+ " if Output_Log_File != \"OFF\" and Mode != \"Config\":\n",
+ " ### Rename log file and output settings.\n",
+ " !mv /root/.rclone_log/rclone_log.txt /root/.rclone_log/rclone_log_$(date +%Y-%m-%d_%H.%M.%S).txt\n",
+ " with open(\"/root/.rclone_log/\" + Mode + \"_settings.txt\", \"w\") as f:\n",
+ " f.write(\"Mode: \" + Mode + \\\n",
+ " \"\\nCompare: \" + Compare + \\\n",
+ " \"\\nSource: \\\"\" + Source + \\\n",
+ " \"\\\"\\nDestination: \\\"\" + Destination + \\\n",
+ " \"\\\"\\nTransfers: \" + str(Transfers) + \\\n",
+ " \"\\nCheckers: \" + str(Checkers) + \\\n",
+ " \"\\nSkip files that are newer on the destination: \" + str(Skip_files_that_are_newer_on_the_destination) + \\\n",
+ " \"\\nSkip all files that exist: \" + str(Skip_all_files_that_exist) + \\\n",
+ " \"\\nDo not cross filesystem boundaries: \" + str(Do_not_cross_filesystem_boundaries) + \\\n",
+ " \"\\nDo not update modtime if files are identical: \" + str(Do_not_update_modtime_if_files_are_identical) + \\\n",
+ " \"\\nDry-Run: \" + str(Dry_Run) + \\\n",
+ " \"\\nOutput Log Level: \" + Output_Log_File + \\\n",
+ " \"\\nExtra Arguments: \\\"\" + Extra_Arguments + \\\n",
+ " \"\\\"\\nSync Moden: \" + Sync_Mode + \\\n",
+ " \"\\nTrack Renames: \" + str(Track_Renames) + \\\n",
+ " \"\\nDeduplicate Mode: \" + Deduplicate_Mode + \\\n",
+ " \"\\nDeduplicate Use Trash: \" + str(Deduplicate_Use_Trash))\n",
+ " ### Compressing log file.\n",
+ " !rm -f /root/rclone_log.zip\n",
+ " !zip -r -q -j -9 /root/rclone_log.zip /root/.rclone_log/\n",
+ " !rm -rf /root/.rclone_log/\n",
+ " !mkdir -p -m 666 /root/.rclone_log/\n",
+ " ### Send Log\n",
+ " if os.path.isfile(\"/root/rclone_log.zip\") == True:\n",
+ " try:\n",
+ " files.download(\"/root/rclone_log.zip\")\n",
+ " !rm -f /root/rclone_log.zip\n",
+ " display(HTML(\"Sending log to your browser...
\"))\n",
+ " except:\n",
+ " !mv /root/rclone_log.zip /content/rclone_log_$(date +%Y-%m-%d_%H.%M.%S).zip\n",
+ " display(HTML(\"You can use file explorer to download the log file.
\"))\n",
+ " else:\n",
+ " clear_output(wait=True)\n",
+ " display(HTML(\"There is no log file.
\"))\n",
+ "\n",
+ " ### Operation has been successfully completed.\n",
+ " if os.path.isfile(\"/usr/bin/rclone\") == False:\n",
+ " clear_output(wait=True)\n",
+ " display(HTML(\"â Please run the installation cell above first.
\"))\n",
+ " elif Mode != \"Config\":\n",
+ " display(HTML(\"â
Operation has been successfully completed.
\"))\n",
+ "else:\n",
+ " !echo \"doing nothing because the mode is set to off\""
+ ],
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "id": "_T-A9oteyW14"
+ },
+ "source": [
+ "### đ Follow me on GitHub for more: [_@cheems_](https://github.com/cheems)\n",
+ "##### đĻ Repo: [Github](https://github.com/cheems/Torrents-to-Google-Drive)"
+ ]
+ }
+ ]
+}
\ No newline at end of file