Skip to main content

A CLI tool to search and add magnet into your real-debrid account

Project description

Debrify

License Version

Table of Contents


Overview

Debrify is a Python-based command-line application designed to help users efficiently search and add torrent magnets to Real Debrid. It focuses exclusively on adding cached torrents to Real Debrid for instant availability.

Debrify utilizes a local database created with DuckDB, populated from the open-source torrentcsv dataset. This approach enables fast and reliable torrent searches. When adding a torrent magnet, the tool attempts to add the largest file in the magnet to Real Debrid. If the file is not cached and instantly available, it will not be added, ensuring only ready-to-stream files are processed.

Features

  • Search Torrents: Quickly search for torrents using keywords from the locally created database.
  • Batch Add Torrents: Add all torrents matching a specific keyword or phrase to Real Debrid in one go.
  • Selective Range Adding: Choose a specific range of results when adding torrents to Real Debrid, providing better control over what is added.
  • Efficient Database Handling: Uses DuckDB for fast and optimized database queries based on the torrentcsv dataset.
  • Cached Torrents Only: Ensures only instantly available torrents are added to Real Debrid, improving user experience.

Installation

For Developers

  1. Clone the repository:

    git clone https://github.com/varunsalian/debrify.git
    cd debrify
    
  2. Install the application (Make sure you have python 3.8 or above):

    pip install .
    
    debrify --help
    

    Refer to the Usage and Commands sections for available commands.

    OR

    Run the application directly:

    python main.py --help
    

    Refer to the Usage and Commands sections for available commands.

For Users

On Windows, macOS, and Linux

  1. Download the appropriate release for your operating system from the links below:

  2. Unzip the downloaded file.

  3. Open a terminal or command prompt in the extracted folder.

  4. Run the following command:

    ./main --help
    

    Refer to the Usage and Commands sections for available commands.

On Android

  1. Install Termux from the Google Play Store OR Download APK and Install
  2. Open Termux and update the package list:
    pkg update
    
  3. Install Python within Termux:
    pkg install python
    
  4. Install Debrify using pip:
    pip install debrify
    
  5. Run Debrify using:
    debrify --help
    
    Refer to the Usage and Commands sections for available commands.

This process allows you to efficiently run Debrify on Android devices.

Usage

Note: If you have downloaded the release(for windows, mac, linux) , use ./main instead of debrify for the following commands.

  1. Update the Database:

    debrify --force-update
    

    This updates the local database with the latest data from the torrentcsv dataset.

  2. Set Real Debrid API Key: Obtain your Real Debrid API key from Real Debrid API Token and set it:

    debrify --set-debrid-api-key YOUR_DEBRID_API_KEY
    
  3. Add Torrents Based on Keywords: To add all torrents matching specified keywords to your Real Debrid account:

    debrify --keywords keyword1, keyword2
    
  4. List Torrents Without Adding: To list torrents matching specific keywords without adding them to Real Debrid:

    debrify --keywords keyword1 --download-to-debrid false
    
  5. Add Torrents in a Specific Range: After listing torrents, you can specify a range to add:

    debrify --keywords keyword1 --download-range 0-100
    

    This will attempt to check and add cached torrents from the specified range.

Commands

  • --force-update: Deletes the existing database and updates it with the latest data from torrentcsv.
    debrify --force-update
    
  • --set-debrid-api-key: Sets the Real Debrid API key for your account.
    debrify --set-debrid-api-key YOUR_DEBRID_API_KEY
    
  • --keywords: Specifies keywords to search in the database. Keywords can be comma-separated, and space within groups is preserved.
    debrify --keywords keyword1, keyword2
    
  • --download-to-debrid: Specifies whether to attempt adding torrents to Real Debrid. Accepts true or false.
    debrify --keywords keyword1 --download-to-debrid false
    
  • --download-range: Specifies a range of results (start-end) to attempt adding to Real Debrid.
    debrify --keywords keyword1 --download-range 0-100
    
  • --print-results: Enables or disables printing of results. Accepts true or false.
    debrify --keywords keyword1 --print-results true
    
  • -v or --version: Displays the current version of the application.
    debrify -v
    

Examples

  1. Update the Database:

    debrify --force-update
    

    Updates the local database with the latest data from the torrentcsv dataset.

  2. Set Real Debrid API Key:

    debrify --set-debrid-api-key YOUR_DEBRID_API_KEY
    

    Sets the Real Debrid API key for the application.

  3. Add Torrents Based on Keywords:

    debrify --keywords ubuntu
    

    Adds all torrents matching the keyword "ubuntu" to your Real Debrid account.

  4. List Torrents Without Adding:

    debrify --keywords ubuntu --download-to-debrid false
    

    Lists all torrents matching the keyword "ubuntu" without adding them to Real Debrid.

  5. Add Torrents in a Specific Range:

    debrify --keywords ubuntu --download-range 0-100
    

    Adds cached torrents from the search results for "ubuntu" in the specified range (0-100).

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository.
  2. Create a new branch for your feature or bug fix:
    git checkout -b feature/your-feature-name
    
  3. Make your changes and commit them:
    git commit -m "Add your feature description"
    
  4. Push to your branch:
    git push origin feature/your-feature-name
    
  5. Open a pull request and describe your changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • torrentcsv: For providing the open-source dataset used to build the database.
  • DuckDB: For its powerful and efficient database capabilities.
  • Real Debrid: For enabling seamless torrent management.
  • rd-api-py: For providing wrapper for the real debrid APIs
  • The open-source community for their invaluable contributions and support.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

debrify-0.0.2.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

debrify-0.0.2-py3-none-any.whl (14.2 kB view details)

Uploaded Python 3

File details

Details for the file debrify-0.0.2.tar.gz.

File metadata

  • Download URL: debrify-0.0.2.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for debrify-0.0.2.tar.gz
Algorithm Hash digest
SHA256 99d7732ba9b6bbbec2ae9c0a9ab41e44cb490b83d191a24535bee176de159504
MD5 6f51cd486926426f873a6269ba6e9e92
BLAKE2b-256 f29b95ad442193d1f2454b5ee0dac4caafc8a6c5820e08d0e8dc1c2a9ad59eed

See more details on using hashes here.

File details

Details for the file debrify-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: debrify-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for debrify-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4404898643f63c8f2fa8ea6a211569f352cc7b5136e1e0fb50aa7f00fc03bb07
MD5 c79b6bdf1546e54cfbd7bfd45ebcdfe2
BLAKE2b-256 bbb7843b7615e124271cf76201e51ec4ef25c8c7c9db04ce81806a84450cf63a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page