Skip to content
This repository has been archived by the owner on Nov 28, 2024. It is now read-only.
/ magnet2torrent Public archive

A python based utility to monitor and convert magnet links to torrents.

License

Notifications You must be signed in to change notification settings

usma0118/magnet2torrent

Repository files navigation

Magnet2Torrent

pre-commit CodeFactor Quality Gatekeeper CI Build Release

A Python based tool that converts magnet links to .torrent files.

Looking for a way to contribute? Please find issues with the help-wanted label or to improve documentation docs-needed, thank you.

Features

  • Monitors blackhole folder for new magnet links and convert them to torrents
  • Adds torrent trackers to torrents to increase download chances

Setup and installation

The script has been tested to work with Python 3.xx versions

Recommended way is to run it as docker container

Environment Variables

Environment variables are fetched via dotenv, this gives you option to configure your variables either as env variables or in .env file (located in installation directory)

  • log_level (optional, defaults to info) : can be set to info,warning, error
  • trackers (optional, default is using ngosang/trackerslist)
  • tracker_sync_interval (optional, defaults to 30 mins)

Blackhole

  • magnet_watch (defaults to /torrent as volume) Directory path to monitor for new magnet links
  • torrent_blackhole (optional, defaults to same value as magnet_watch) must be set to same blackhole directory as your torrent client.

Web server

  • webserver_basepath (defaults to /)
  • webserver_port (defaults to 8080)
  • webserver_secret (defaults to randmon generated value))
  • web_username (defaults to admin)
  • web_userpassword (required)

Proxy

Application supports http proxy for fetching torrent info

  • proxy_hostname (required if proxy port is set)
  • proxy_port (required if proxy hostname is set)
  • proxy_username (optional)
  • proxy_password (optional)

Supported clients

  • Transmission

    • transmission_host (required empty value will disbale this functionality)
    • transmission_port (optional defaults to 9091)
    • transmission_path (optional defaults to /transmission)
    • transmission_user (optional)
    • transmission_password (optional)

Docker

Docker image runs as non-root with uid 1001

Licenses

All code is licensed under the GPL version 3

This has been greatly inspired by Magnet2Torrent