This Python script provides a simple graphical user interface (GUI) using tkinter
to manage and download torrents via a Transmission server. The script allows users to configure their Transmission server settings, including enabling or disabling authorization (username and password), specifying the host and port, and selecting a folder containing .torrent
files for downloading.
- Authorization Toggle: Enable or disable authentication for the Transmission server.
- Folder Browsing: Select a folder that contains
.torrent
files. - Host and Port Configuration: Specify the host and port for the Transmission server.
- Automatic Dependency Installation: The script will automatically install missing dependencies (
tkinter
,requests
,transmission-rpc
) if they are not already installed. - Torrent Download: Automatically adds
.torrent
files from the selected folder to the Transmission server for downloading.
- Python 3.x
pip
(Python package installer)
The script requires the following Python packages:
tkinter
(built-in for most Python distributions)requests
transmission-rpc
If any of these packages are not installed, the script will automatically install them.
-
Run the Script: Execute the script using Python:
python your_script_name.py
-
Interface Usage:
- Authorization:
- Check the "Enable Authorization" checkbox if your Transmission server requires a username and password.
- Enter the required credentials in the provided fields.
- Folder Selection:
- Use the "Browse" button to select the folder containing your
.torrent
files.
- Use the "Browse" button to select the folder containing your
- Host and Port:
- Specify the host (default is
localhost
) and port (default is9091
) for your Transmission server.
- Specify the host (default is
- Download:
- Click the "Download" button to add the
.torrent
files in the selected folder to the Transmission server for downloading.
- Click the "Download" button to add the
- Authorization:
-
Authorization:
- If authorization is enabled, you will need to provide the correct username and password.
- If authorization is disabled, the username and password fields will be grayed out and inactive.
-
Download Process:
- The script will scan the selected folder for
.torrent
files and add them to the Transmission server. - It will print the status of the authorization, folder path, host, port, and each added torrent to the console.
- The script will scan the selected folder for
-
Dependencies: If the script fails to install a dependency, you may need to manually install it using
pip
:pip install requests transmission-rpc
-
tkinter Not Found: If
tkinter
is not installed, follow the instructions for your operating system to install it:- Linux:
sudo apt-get install python3-tk
- Windows/MacOS:
tkinter
usually comes pre-installed with Python. If not, reinstall Python with thetkinter
option enabled.
- Linux:
You can modify the script to suit your specific needs, such as changing default host and port values, or adding additional functionality to handle torrent files differently.
If you encounter any issues or have suggestions for improvements, please feel free to reach out. Or open an issue. i'll try to add content as people tell me.